首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

IOS基础知识记要四(Master-Detail Application)

2012-11-15 
IOS基础知识记录四(Master-Detail Application)1.在创建主-从视图的应用程序时,Master-Detail Application

IOS基础知识记录四(Master-Detail Application)
1.在创建主-从视图的应用程序时,Master-Detail Application无疑是一个良好的想法,
它结和表视图和详细视图,而且还能调整内容的大小。 主要还能在ipad和iphone上面跑起来
不过在ipad上面用到是弹出层(竖屏)

2.在使用xcode 4.5,ios6时,一些基本重要的方法都自动生成,只需要你填入适当的数据即可



3.在DetailViewController中实现代码
- (void)viewDidLoad{    [super viewDidLoad];// Do any additional setup after loading the view, typically from a nib.    self.navigationItem.leftBarButtonItem = self.editButtonItem;    UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];   self.navigationItem.rightBarButtonItem = addButton;}

热点排行