iOS 开发知识点汇总

每个都会涉及到一个知识点,后期会整理成一个一个模块

  • static inline void

HSNumbersViewCell.m文件中

static inline void HSNumbersAdjustRowView(UIView *self, HSNumbersRowView *rowView) {
    if (@available(iOS 11.0, *)) {
        rowView.frame =
            CGRectMake(self.bounds.origin.x + rowView.edgeInsets.left, self.bounds.origin.y + rowView.edgeInsets.top,
                       self.bounds.size.width - rowView.edgeInsets.left - rowView.edgeInsets.right - self.safeAreaInsets.right - self.safeAreaInsets.left,
                       self.bounds.size.height - rowView.edgeInsets.top - rowView.edgeInsets.bottom);
    } else {
        rowView.frame = CGRectMake(self.bounds.origin.x + rowView.edgeInsets.left, self.bounds.origin.y + rowView.edgeInsets.top,
                                   self.bounds.size.width - rowView.edgeInsets.left - rowView.edgeInsets.right,
                                   self.bounds.size.height - rowView.edgeInsets.top - rowView.edgeInsets.bottom);
    }
};

复制代码
  • gitflow 流

  • AsyncDisplayKit文档

AsyncDisplayKit文档
AsyncDisplayKit文档

  • uiview 刷新机制 生命周期

iOS view如何刷新
ios uiview 如何刷新_IOS刷新view的几个方法

    CGRect VIXLabelRect = [self.VIXLabel.text boundingRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:self.VIXLabel.font} context:nil];
[self.VIXLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.VIXBGView.mas_top);
        make.left.equalTo(self.VIXBGView.mas_left);
        make.bottom.equalTo(self.VIXBGView.mas_bottom);
        make.width.mas_equalTo(ceilf(VIXLabelRect.size.width));
    }];
复制代码

计算字符串的宽度和高度

  • masonry 更新及高阶使用

自动布局与Masonry使用注意事项
iOS Masonry控件等比例\等间距布局
使用Masonry代码进行屏幕适配的详细介绍

  • git 中忽略 UserInterfaceState.xcuserstate

git 中忽略 UserInterfaceState.xcuserstate

参考创建gitignore

iOS架构模式(MVC/MVCS/MVP/MVVM/VIPER)

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享