2014-08-28 4 views

답변

0

당신은 다른의 ViewController을 제시하기위한의 ViewController를 알리기 위해 NSNotification을 사용할 수있는이

YourViewController *aView = [[YourViewController alloc] 
           initWithNibName:@"xibName" bundle:nil]; 
[self presentViewController:aView animated:YES completion:nil]; 
+0

UIView.UIView에서 UIViewController를로드하려고하는데 presentViewController 메서드가 없습니다. – Sofeda

+0

다음과 같이 할 수 있습니다 [yourViewObject addSubview : aView.view]; – Rajesh

+0

이 경우에는 UIViewController.view가 visible.I입니다. ViewController가 rootviewController로 필요합니다. – Sofeda

0

같이 할 수 있습니다. 여기

더 많은 정보 : 당신의 버튼에서 대리자를 호출

ViewController *viewController = ...; 

[self presentViewController:viewController animated:YES completion:NULL]; 

또 다른 옵션은 다음과 같습니다

NSNotificationCenter Class Reference

가와의 ViewController를 표시합니다.

+0

UIView.UIView에서 UIViewController를로드하려고하는데 presentViewController 메서드가 없습니다. – Sofeda

+1

그래, NSNotification/Delegate와 함께 ViewController에 컨트롤러를 알려 주어야한다. – Matz

+0

당신은 맞습니다 @ 마츠 – Sofeda