美文网首页
iOS常见知识点

iOS常见知识点

作者: 多情刀客无情刀 | 来源:发表于2017-06-23 13:49 被阅读0次

    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常见知识点

          本文链接:https://www.haomeiwen.com/subject/zrsruttx.html