首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

UINavigation自定义回来按钮

2013-08-11 
UINavigation自定义返回按钮UIButton *imageButton [UIButton buttonWithType:UIButtonTypeCustom][ima

UINavigation自定义返回按钮

UIButton *imageButton = [UIButton buttonWithType:UIButtonTypeCustom];[imageButton setFrame:CGRectMake(15, 0, 57, 44)];[imageButton setBackgroundImage:[UIImage imageNamed:@"someImage.png"] forState:UIControlStateNormal];UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(140, 0, 250, 44)];[titleLabel setText:@"some title"];[titleLabel setBackgroundColor:[UIColor clearColor]];[titleLabel setTextColor:[UIColor whiteColor]];[titleLabel setFont:[UIFont boldSystemFontOfSize:20]];[self.navigationController.navigationBar addSubview:imageButton];[self.navigationController.navigationBar addSubview:titleLabel];self.navigationItem.leftBarButtonItem = nil;

热点排行