1.经常打注释
2.导航条背景颜色的设置
BINMeViewController *meVC = [[BINMeViewControlleralloc]init];
UINavigationController *meNav = [[UINavigationControlleralloc]initWithRootViewController:meVC];
meNav.navigationBar.barTintColor = [UIColorgreenColor];//这里是barTinColor不是backGroundColor
3.pch文件的生成和配置
当你处在工程中cmd+N弹出新窗口
选择PCH---->next选中target选项---->在PCH中添加你想公用的头文件---->选择PCH路径
1.选择项目中的buildSetting---->搜索prefix header---->选择LLVM7.0那个双击----->把pch文件拖进去
4.取消cell的选中状态
cell.selectionStyle = UITableViewCellSelectionStyleNone;
5.取消导航栏的自动扩展
self.navigationController.automaticallyAdjustsScrollViewInsets = NO;
self.navigationController.navigationBar.translucent = NO;
self.edgesForExtendedLayout = UIRectEdgeNone;
6.取消textField第一响应者
[self.viewendEditing:YES];
[textField resignFirstResponder];
7.cell右侧小箭头显示
cell.accessoryType = UITableviewCellAccessoryDisclosureIndicator;
8.当textfield设为不可编辑时,默认边框消失
_textfield.layer.borderWidth = 2.0;
9.想修改tableview的HeaderView时
1.重写titleForHeaderInSection
2.重写viewForHeaderInSection
如果不重写1,2重写无效
10.导航控制器push到新页面,要让后面的控制器不显示tabbar
[a push b]; b.hidesBottomBarWhenPushed = YES;