2013-11-23 3 views
1

내 UIButton이 내 루비 모션 앱에 표시되지 않습니다. 버튼 텍스트 만 나타납니다.Rubymotion에 UIButton이 나타나지 않습니다.

@containerView = UIView.alloc.initWithFrame([[0, 50], [self.view.frame.size.width, 100]]) 

@loginButton = UIButton.buttonWithType(UIButtonTypeRoundedRect) 
@loginButton.frame = [[(self.view.frame.size.width/2) + 5, 65], [(self.view.frame.size.width/2) - 15, 40]] 
@loginButton.setTitle('Login', forState: UIControlStateNormal) 
@loginButton.addTarget(self, 
         action:'login', 
         forControlEvents:UIControlEventTouchUpInside) 

@containerView.addSubview(@loginButton) 
self.view.addSubview(@containerView) 

내가 RubyMotion의 2.16 버전을 사용하고, 추진 1.0.4, 1.3.5을 sugarcube, 모션 레이아웃 0.0.1 및 뽁뽁이 나 '1.4.0

: 여기

코드입니다 프로모션 방법, sugarcube 방법 및 bubblewrap 방법을 사용하여 버튼을 렌더링하려고 시도했지만 일반 뷰 컨트롤러에서 문제 해결을 위해 원시 루비 모션 방식 (위)으로 분해하기로 결정했습니다. 이것에 대한 아이디어가 있습니까?

답변

관련 문제