2013-04-10 2 views
0

UIViewpresentModalViewController을 호출하고 싶습니다.UIView에서 presentModalView 컨트롤러 호출

UIView이라는 하나의 모델 클래스 하위 클래스를 만들고 동작이있는 3 개의 버튼을 만들고 UIView에 추가하려고합니다. 나는 메시지를 보내는 것에 대해 작은 코드를 썼다. 그 중에서 나는 presentModalViewController라고 전화하고 그보기를 firstViewController에 추가합니다.

가능합니까?

난 당신이 UIViewpresentModalViewController를 호출 할 수 없습니다, MainViewController

NotifViewModel *remainderAlert = [[NotifViewModel alloc]initWithFrame:CGRectMake(40, 60, 250, 300)]; 



[remainderAlert showRemainderAlert1]; 

[self.viewController.view addSubview:remainderAlert]; 

답변

0

없음에이 뷰가 추가됩니다 통지를받은 후 AppDelegate->application:didReceiveLocalNotification 의 코드를 썼다.

'presentModalViewController'는 UIViewController 또는 그 하위 클래스 (UINavigationController, UITableViewController 등)에서만 가능합니다.