인터페이스 빌더에서 UIView를 만들었습니다. 버튼이 있습니다. UIView의 Button을 탭하여 모든 ViewController를로드 할 수 있습니까? 내 UIView가 탐색 컨트롤러 아래에 없습니다.UIView (.xib)에서 UIViewController 불러 오기
0
A
답변
0
당신은 다른의 ViewController을 제시하기위한의 ViewController를 알리기 위해 NSNotification을 사용할 수있는이
YourViewController *aView = [[YourViewController alloc]
initWithNibName:@"xibName" bundle:nil];
[self presentViewController:aView animated:YES completion:nil];
0
같이 할 수 있습니다. 여기
더 많은 정보 : 당신의 버튼에서 대리자를 호출
ViewController *viewController = ...;
[self presentViewController:viewController animated:YES completion:NULL];
또 다른 옵션은 다음과 같습니다
가와의 ViewController를 표시합니다.관련 문제
- 1. UITableViewCell의 XIB에서 여러 UIView
- 2. XIB에서 UIView로 UIView
- 3. UIView 내부에 UIViewController 배치
- 4. UIView 대 UIViewController 드로잉
- 5. UIView 또는 UIViewController 바꿔야합니까?
- 6. UIView 대 UIViewController
- 7. 강제 UIView/UIVIewController 방향
- 8. 컨테이너/UIViewController UIView 중
- 9. UIView에서 UIViewController 가져 오기
- 10. UITabBarController의 UIViewController 사이에 UIView 공유
- 11. 다른보기 위에 UIViewController/UIView 표시
- 12. UIView 또는 UIViewController 하위 클래스?
- 13. 프로그래밍 방식으로 UIViewController 통해 UIView
- 14. 상속을위한 UIView 및 UIViewController 연습
- 15. UIView 및 UIViewController desing 패턴
- 16. 위임 양식 UIView to UIViewController
- 17. UIView/UIViewController 서브 클래 싱
- 18. 파일 가져 오기/불러 오기
- 19. 방법 불러 오기
- 20. 기존 활동 불러 오기
- 21. 방법 불러 오기 AST
- 22. 인터넷에서 어레이 불러 오기
- 23. GCM 웨이크 불러 오기
- 24. J2ME 불러 오기 연락처
- 25. 동적으로 활동 불러 오기
- 26. 100 UIImages 불러 오기
- 27. 색상 팔레트 불러 오기
- 28. 불러 오기 배열에서 업데이트
- 29. 3D 터치에서보기 불러 오기
- 30. 모범 사례 : 여러 UIView 또는 여러 UIViewController
UIView.UIView에서 UIViewController를로드하려고하는데 presentViewController 메서드가 없습니다. – Sofeda
다음과 같이 할 수 있습니다 [yourViewObject addSubview : aView.view]; – Rajesh
이 경우에는 UIViewController.view가 visible.I입니다. ViewController가 rootviewController로 필요합니다. – Sofeda