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

UINavigation常见用法和导航控制栏的定制1.常用方法UIButton *button[[[UIButton alloc]initWithFrame:CG

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;