Little Tip

1:导航条返回键带的title太讨厌了,怎么让它消失!

[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60) forBarMetrics:UIBarMetricsDefault];

2:怎么像safari一样滑动的时候隐藏navigationbar?

navigationController.hidesBarsOnSwipe = Yes

3:怎么播放GIF的时候这么卡,有没有好点的库?

FlipBoard出品的太适合你了:https://github.com/Flipboard/FLAnimatedImage

4:怎么把tableview里cell的小对勾的颜色改成别的颜色?

_mTableView.tintColor = [UIColor redColor];

5:本来我的statusbar是lightcontent的,结果用UIImagePickerController会导致我的statusbar的样式变成黑色,怎么办?

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated

{

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

}

6:怎么把我的navigationbar弄成透明的而不是带模糊的效果?

[self.navigationBar setBackgroundImage:[UIImage new]

forBarMetrics:UIBarMetricsDefault];

self.navigationBar.shadowImage = [UIImage new];

self.navigationBar.translucent = YES;

7:怎么改变uitextfield placeholder的颜色和位置?

继承uitextfield,重写这个方法

- (void) drawPlaceholderInRect:(CGRect)rect {

[[UIColor blueColor] setFill];

[self.placeholder drawInRect:rect withFont:self.font lineBreakMode:UILineBreakModeTailTruncation alignment:self.textAlignment];

}

8:tableviewCell 只显示高亮状态 不设置选中状态,只要重写

- (void)setSelected:(BOOL)selected animated:(BOOL)animated{

}

9:当设置navigationBar的背景图片时移除黑线的方法,该方法会使translucent属性失效

-(void)useShadowImageRemoveBlackLine

{

//通过设置shadowImage移除黑线

[self.navigationController.navigationBar setShadowImage:[UIImage new]];

}

你可能感兴趣的:(Little Tip)