Container View Controller
2015-12-30 12:12
627 查看
有时候,我们的Controler中包含有另一个controler view的view时,可以使用这种方式。
https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/ImplementingaContainerViewController.html
把一个controller view 加入到 controler中
移除一个controller view
https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/ImplementingaContainerViewController.html
把一个controller view 加入到 controler中
[self addChildViewController:content]; //1 content.view.frame = [self frameForContentController]; [self.view addSubview:self.currentClientView]; //2 [content didMoveToParentViewController:self]; //3
移除一个controller view
[content willMoveToParentViewController:nil]; //1 [content.view removeFromSuperview]; //2 [content removeFromParentViewController]; //3
相关文章推荐
- Ubuntu 中sendmail 的安装、配置与发送邮件的具体实现
- 责任链模式 Chain of Responsibility
- cocoapods错误You cannot run CocoaPods as root. (CLAide::Help)解决办法
- 浅析 int main(int argc, char *argv[])
- smtp admin email 似乎可以考虑在
- Troubleshooting ‘RPC server unavailable’ 0x800706BA
- LR检查点的if (status == LR_FAIL)写法
- Failed to execute WebDAV PROPPATCH
- 有关adaboost中hartraining训练样本用来检测物体
- salt之grains组件
- symbol(s) not found for architecture x86_64 之 linker command failed with exit code 1 (use -v to see invocation)解决方案排查
- 【DP】BZOJ 1260: [CQOI2007]涂色paint
- Git之user.name&user.email配置的影响及修改+备份工作成果
- rails里routes配置文件里的resources和resource的区别
- LeetCode Contains Duplicate II(hash)
- 3D Constraints
- Level of detail
- 51NOD 1305 Pairwise Sum and Divide
- see 二分 again
- POJ-1273 Drainage Ditches 最大流Dinic