if (@available(iOS 12.0, *)) {
//Xcode 10 适配
self.codeField.textContentType = UITextContentTypeOneTimeCode;
//非Xcode 10 适配
self.codeField.textContentType = @"one-time-code";
}
if (@available(iOS 12.0, *)) {
//Xcode 10 适配
self.codeField.textContentType = UITextContentTypeOneTimeCode;
//非Xcode 10 适配
self.codeField.textContentType = @"one-time-code";
}