navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObject:[UIColor yellowColor] forKey:UITextAttributeTextColor]; 更多的属性: UITextAttributeFont UITextAttributeTextShadowOffset UITextAttributeTextShadowColor…
交友:微信号 dwjluck2013 从iOS7开始,苹果对navigationBar进行了模糊处理,并把self.navigationController.navigationBar.translucent = YES 作为默认处理.对此苹果注释的解释为 // Default is NO on iOS 6 and earlier. Always YES if barStyle is set to UIBarStyleBlackTranslucent 这时候就会出现一个问题,当你push的控制器…
1.设置NavigationBar的背景色: self.navigationController.navigationBar.barTintColor = [UIColor redColor]; 2.设置NavigationBar上的标题 self.navigationItem.title = @"Test"; 3.设置NavigationBar上标题的字体大小和颜色(使用富文本) self.navigationController.navigationBar.titleTextAtt…
- (void)setRightBarButtonItem { // Create done Button UIBarButtonItem *doneButton = [[UIBarButtonItem alloc]initWithTitle:[NSString stringWithFormat:@"确定(%lu/%lu)", (unsigned long)self.selectedAssetURLs.count, (unsigned long)self.maximumNumberOf…
日常开发中少不了用到UINavigationController,但是很多情况都要自定义NavigationBar.依稀记得自己刚开始也踩了好多坑,凑今天有空,就把想到的写下来.有时间了,考虑再把自定义TabBar写一下. 1.修改Navigationbar navigationBar其实有三个子视图,leftBarButtonItem,rightBarButtonItem,以及titleView. 1.1  方法一:alloc一个UINavigationBar ,并给alloc出来的Navig…
navigationController.navigationBar.titleTextAttributes=@{NSForegroundColorAttributeName:[UIColor yellowColor]};…
1.navigationBar的设置 let navColor = UIColor(red: 41/255, green: 160/255, blue: 230/255, alpha: 1) func setNavibar() -> Void { self.navigationController?.navigationBar.barTintColor = navColor; self.navigationController?.navigationBar.tintColor = UIColor…
设置导航栏nav全透明 p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #ffffff } span.s1 { } span.s2 { color: #c2349b } - (void)viewDidLoad {里面添加 swift:版本 p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px "PingFang SC"; color: #4dbf56…
1:如何给表格单元列增加选择时的背影效果 if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; cell.backgroundColor = [UIColor clearColor]; cell.textLabel.font = [UIFont fontWithName:]; cell.textLab…