Kevin

Results 6 comments of Kevin

UICollectionView在RTL下的适配 继承UICollectionViewFlowLayout 重写两个方法 -(UIUserInterfaceLayoutDirection)effectiveUserInterfaceLayoutDirection { if (isRTL()) { return UIUserInterfaceLayoutDirectionRightToLeft; } return UIUserInterfaceLayoutDirectionLeftToRight; } - (BOOL)flipsHorizontallyInOppositeLayoutDirection{ return YES; } 链接:https://www.jianshu.com/p/4fcf4a6710a1

xcode 11.3.1 swift 项目也碰到同样的问题

延迟加载就可以了 DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { //修改导航栏背景图片(使用代码动态生成的纯色图片) let image = self.createImageWithColor(.orange, frame: CGRect(x: 0, y: 0, width: 1, height: 1)) self.navigationController?.navigationBar.setBackgroundImage(image, for: .default) }

文件:BuiltInBasicType fileprivate let formatter: NumberFormatter = { let formatter = NumberFormatter() formatter.usesGroupingSeparator = false formatter.numberStyle = .decimal formatter.maximumFractionDigits = 16 //强行使用英语模式 formatter.locale = NSLocale(localeIdentifier: "en_US") as Locale return formatter }()

class IMRequestModel:BaseModel 去掉泛型,就不崩溃了