1.隱藏多余的tableView的cell分割線?
self.tableView.tableFooterView= [[UIView alloc]init];
2.取消系統自帶的返回字樣
[[UIBarButtonItem appearance]setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault];
3.滑動時隱藏navigation
self.navigationController.hidesBarsOnSwipe=YES;
4.頁面跳轉是隱藏tabBar
TwoViewController *twoVC = [[TwoViewController alloc] init];
twoVC.hidesBottomBarWhenPushed =YES;
5.ScrollView不能滑到頂
self.automaticallyAdjustsScrollViewInsets=NO;
6.按鈕點擊發(fā)光效果
button.showsTouchWhenHighlighted =YES;
7.長按手勢只執(zhí)行一次
if(sender.state == UIGestureRecognizerState)
8.隱藏狀態(tài)欄
- (BOOL)prefersStatusBarHidden
{
returnYES;
}
9.在使用view的縮放的時候,layer.border.width隨著view的放大,會出現鋸齒化的問題瑞佩。
self.layer.allowsEdgeAntialiasing = YES;
10竖般、在自定義返回按鈕的時候认然,側滑手勢返回往往默認失效了饺汹,怎么讓側滑有效呢
????UIButton? *btn =[UIButton buttonWithType:UIButtonTypeCustom];
??? [btn setTitle:@"返回" forState:UIControlStateNormal];
? ? [btn addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
??? btn.frame=CGRectMake(0, 0, 60, 40);
??? [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
??? UIBarButtonItem? *item =[[UIBarButtonItem alloc]initWithCustomView:btn];
??? self.navigationItem.leftBarButtonItem=item;
添加下面這一句代碼即可
?self.navigationController.interactivePopGestureRecognizer.delegate=(id)self;