读书人

UINavigation常见用法跟导航控制栏的定

发布时间: 2013-10-17 17:26:17 作者: rapoo

UINavigation常见用法和导航控制栏的定制

1.常用方法

UIButton *button=[[[UIButton alloc]initWithFrame:CGRectMake(5, 5, 30, 30)] autorelease]; [button addTarget:self action:@selector(clickedRight) forControlEvents:UIControlEventTouchUpInside]; [button setBackgroundColor:[UIColor yellowColor]]; UIBarButtonItem *rightItem=[[UIBarButtonItem alloc] initWithCustomView:button]; self.navigationItem.rightBarButtonItem=rightItem;





读书人网 >移动开发

热点推荐