When I make UIViewController, I need to display list , so I think I can use UITableView in UIViewController , but I found it is not possible because of mechanism of iOS.
They provide another way. That is using UIContainerView.
In Storyboard,
1) Drag UIViewController
2) Drag UIContainerView into UIViewController( step.1)
segue and default view controller will be created.
3) Drag UITableViewController ( not UITableView)
4) delete segue and default view controller (step.2)
5) Link container to UITableViewController (step.3)
- (how to link?: click container with control key and drag to UITableViewController)
** Additional step
If you have a existing segue with other viewcontroller, you may meet error. So you must check segue.identifier.
They provide another way. That is using UIContainerView.
In Storyboard,
1) Drag UIViewController
2) Drag UIContainerView into UIViewController( step.1)
segue and default view controller will be created.
3) Drag UITableViewController ( not UITableView)
4) delete segue and default view controller (step.2)
5) Link container to UITableViewController (step.3)
- (how to link?: click container with control key and drag to UITableViewController)
** Additional step
If you have a existing segue with other viewcontroller, you may meet error. So you must check segue.identifier.
댓글 없음:
댓글 쓰기