ipad 自定义UISplitViewController
【摘要】
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { //自定义UISplitViewController UISplitViewController *s...
-
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
-
-
//自定义UISplitViewController
-
-
UISplitViewController *splitController=[[UISplitViewController alloc] init];
-
-
-
//SplitDemoDetailViewController页面必需启用方向旋转功能
-
-
SplitDemoDetailViewController *rootController=[[SplitDemoDetailViewController alloc] init];
-
-
UINavigationController *nav=[[UINavigationController alloc] initWithRootViewController:rootController];
-
-
//UISplitViewController的详情页面
-
-
-
SplitDemo2ViewController *detailController=[[SplitDemo2ViewController alloc] init];
-
-
-
-
//设定UISplitViewController包含的页面
-
-
NSArray *arrControll=[NSArray arrayWithObjects:nav,detailController,nil];
-
-
splitController.viewControllers=arrControll;
-
-
-
//设定委托对象
-
-
splitController.delegate=detailController;
-
-
//把UISplitViewController添加到window中
-
-
-
self.window.rootViewController=splitController;
-
-
-
//释放对象
-
-
[rootController release];
-
-
[nav release];
-
-
[detailController release];
-
-
[splitController release];
-
-
-
[self.window makeKeyAndVisible];
-
-
-
-
return YES;
-
-
}
下载了一位达人自定义的UISplitViewController,灰常强,效果图片如下:
要demo下载:
http://dl.vmall.com/c0obw3n5hn
文章来源: zzzili.blog.csdn.net,作者:清雨小竹,版权归原作者所有,如需转载,请联系作者。
原文链接:zzzili.blog.csdn.net/article/details/8587712
【版权声明】本文为华为云社区用户转载文章,如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱:
cloudbbs@huaweicloud.com
- 点赞
- 收藏
- 关注作者
评论(0)