Skip to content

1.4.0

Compare
Choose a tag to compare
@LinXunFeng LinXunFeng released this 25 Oct 16:28
· 9 commits to master since this release

更新内容

开放参照尺寸参数

/// 适配方法
/// - Parameters:
///   - size: 大小
///   - fitType: 适配方式
///   - referenceWidth: 参照的宽度
///   - referenceHeight: 参照的高度
///   - isIPhoneXSeriesHeight: 参照的高度是否为iPhoneX系列
///   - reduceValue: 要额外减少的数值
///   - calcResultType: 计算结果类型(默认: 跟随全局配置)
/// - Returns: 适配后的数值
@objc public static func fit(
    size: CGFloat,
    fitType: SwiftyFitType,
    referenceWidth: CGFloat = SwiftyFitsize.shared.referenceW,
    referenceHeight: CGFloat = SwiftyFitsize.shared.referenceH,
    isIPhoneXSeriesHeight: Bool = SwiftyFitsize.shared.isIPhoneXSeriesHeight,
    reduceValue: CGFloat = 0,
    calcResultType: SwiftyFitCalcResultType = .globalConfig
) -> CGFloat