UI
_zhangJ
iOS程序猿一枚
展开
-
图片的重绘不变形 用于设置阴影边框
UIImage *image = [UIImage imageNamed:@"ncf_rectangle"];/// 图片重绘UIGraphicsBeginImageContextWithOptions(sectionFrame.size, NO, 0.f);/// 设置重绘不变形区域image = [image resizableImageWithCapInsets:UIEdgeIns...原创 2018-09-13 14:35:06 · 330 阅读 · 0 评论 -
解决iOS11之后出现的scrollView顶部留白
iOS11之后我们创建tableView或者webView只要是继承于scrollView都会出现顶部有一块空白,造成页面错位,原因是因为iOS11废弃了automaticallyAdjustsScrollViewInsets属性,需要使用scrollview的contentInsetAdjustmentBehavior属性。- (void)viewWillAppear:(BOOL)ani...原创 2018-09-19 11:13:50 · 2654 阅读 · 0 评论 -
Button计时器(解决倒计时闪烁)
- (void)startWithTime:(NSInteger)timeLine title:(NSString *)title countDownTitle:(NSString *)subTitle { // 倒计时时间 __block NSInteger timeOut = timeLine; dispatch_queue_t queue = dispa...原创 2019-06-06 10:00:14 · 1169 阅读 · 0 评论 -
xib设置阴影和边框的颜色
#import "CALayer+XibConfiguration.h"@implementation CALayer (XibConfiguration)- (void)setBorderUIColor:(UIColor *)color{ self.borderColor = color.CGColor;}- (UIColor *)borderUIColor{ ...原创 2019-06-06 10:25:34 · 698 阅读 · 0 评论