iOS常见知识点

1.滑动UIScrollView时不影响定时器NSTimer

[[NSRunLoop mainRunLoop] addTimer:_timer forMode:NSRunLoopCommonModes];

2.导航控制器透明效果

self.navigationController.navigationBar.translucent = YES;

UIColor * color = [UIColor clearColor];

CGRect rect = self.navigationController.navigationBar.frame;

UIGraphicsBeginImageContext(rect.size);

CGContextRef context = UIGraphicsGetCurrentContext();

CGContextSetFillColorWithColor(context, [color CGColor]);

CGContextFillRect(context, rect);

UIImage * image = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

[self.navigationController.navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];

self.navigationController.navigationBar.clipsToBounds = YES;

3.UIPickerView的高度设置

UIPickerView的高度只有三个:162、180、116

4.更新pod的本地库

pod repo update

5.检查podspec文件是否正确

pod spec lint

6.UIScroll 中上下左右拉伸弹簧效果设置

@property(nonatomic)BOOL  alwaysBounceVertical

@property  (nonatomic)  BOOL   alwaysBounceHorizontal

7.修改UITextField中的输入视图

修改  inputAccessoryView 变量

你可能感兴趣的:(iOS常见知识点)