IOS开发小技巧
1.隐藏多余的tableView的cell分割线
self.tableView.tableFooterView= [[UIViewalloc]init];
2.取消系统自带的返回字样
[[UIBarButtonItemappearance]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.按钮点击发光效果
button.showsTouchWhenHighlighted =YES;
7.长按手势只执行一次
if(sender.state == UIGestureRecognizerState)
8.隐藏状态栏
- (BOOL)prefersStatusBarHidden
{
returnYES;
}
9.在使用view的缩放的时候,layer.border.width随着view的放大,会出现锯齿化的问题。
self.layer.allowsEdgeAntialiasing = YES;