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 變量

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。

推薦閱讀更多精彩內容