Skip to content

Commit 8b0361f

Browse files
committed
Remove @available guards for iOS 10
1 parent 2f4fb53 commit 8b0361f

File tree

2 files changed

+24
-28
lines changed

2 files changed

+24
-28
lines changed

Sources/InAppSettingsKit/Models/IASKSpecifier.m

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -408,31 +408,29 @@ - (UITextAutocorrectionType)autoCorrectionType {
408408

409409
- (nullable UITextContentType)textContentType {
410410
NSMutableDictionary *dict;
411-
if (@available(iOS 10.0, *)) {
412-
dict = @{kIASKTextContentTypeName: UITextContentTypeName,
413-
kIASKTextContentTypeNamePrefix: UITextContentTypeNamePrefix,
414-
kIASKTextContentTypeGivenName: UITextContentTypeGivenName,
415-
kIASKTextContentTypeMiddleName: UITextContentTypeMiddleName,
416-
kIASKTextContentTypeFamilyName: UITextContentTypeFamilyName,
417-
kIASKTextContentTypeNameSuffix: UITextContentTypeNameSuffix,
418-
kIASKTextContentTypeNickname: UITextContentTypeNickname,
419-
kIASKTextContentTypeJobTitle: UITextContentTypeJobTitle,
420-
kIASKTextContentTypeOrganizationName: UITextContentTypeOrganizationName,
421-
kIASKTextContentTypeLocation: UITextContentTypeLocation,
422-
kIASKTextContentTypeFullStreetAddress: UITextContentTypeFullStreetAddress,
423-
kIASKTextContentTypeStreetAddressLine1: UITextContentTypeStreetAddressLine1,
424-
kIASKTextContentTypeStreetAddressLine2: UITextContentTypeStreetAddressLine2,
425-
kIASKTextContentTypeAddressCity: UITextContentTypeAddressCity,
426-
kIASKTextContentTypeAddressState: UITextContentTypeAddressState,
427-
kIASKTextContentTypeAddressCityAndState: UITextContentTypeAddressCityAndState,
428-
kIASKTextContentTypeSublocality: UITextContentTypeSublocality,
429-
kIASKTextContentTypeCountryName: UITextContentTypeCountryName,
430-
kIASKTextContentTypePostalCode: UITextContentTypePostalCode,
431-
kIASKTextContentTypeTelephoneNumber: UITextContentTypeTelephoneNumber,
432-
kIASKTextContentTypeEmailAddress: UITextContentTypeEmailAddress,
433-
kIASKTextContentTypeURL: UITextContentTypeURL,
434-
kIASKTextContentTypeCreditCardNumber: UITextContentTypeCreditCardNumber}.mutableCopy;
435-
}
411+
dict = @{kIASKTextContentTypeName: UITextContentTypeName,
412+
kIASKTextContentTypeNamePrefix: UITextContentTypeNamePrefix,
413+
kIASKTextContentTypeGivenName: UITextContentTypeGivenName,
414+
kIASKTextContentTypeMiddleName: UITextContentTypeMiddleName,
415+
kIASKTextContentTypeFamilyName: UITextContentTypeFamilyName,
416+
kIASKTextContentTypeNameSuffix: UITextContentTypeNameSuffix,
417+
kIASKTextContentTypeNickname: UITextContentTypeNickname,
418+
kIASKTextContentTypeJobTitle: UITextContentTypeJobTitle,
419+
kIASKTextContentTypeOrganizationName: UITextContentTypeOrganizationName,
420+
kIASKTextContentTypeLocation: UITextContentTypeLocation,
421+
kIASKTextContentTypeFullStreetAddress: UITextContentTypeFullStreetAddress,
422+
kIASKTextContentTypeStreetAddressLine1: UITextContentTypeStreetAddressLine1,
423+
kIASKTextContentTypeStreetAddressLine2: UITextContentTypeStreetAddressLine2,
424+
kIASKTextContentTypeAddressCity: UITextContentTypeAddressCity,
425+
kIASKTextContentTypeAddressState: UITextContentTypeAddressState,
426+
kIASKTextContentTypeAddressCityAndState: UITextContentTypeAddressCityAndState,
427+
kIASKTextContentTypeSublocality: UITextContentTypeSublocality,
428+
kIASKTextContentTypeCountryName: UITextContentTypeCountryName,
429+
kIASKTextContentTypePostalCode: UITextContentTypePostalCode,
430+
kIASKTextContentTypeTelephoneNumber: UITextContentTypeTelephoneNumber,
431+
kIASKTextContentTypeEmailAddress: UITextContentTypeEmailAddress,
432+
kIASKTextContentTypeURL: UITextContentTypeURL,
433+
kIASKTextContentTypeCreditCardNumber: UITextContentTypeCreditCardNumber}.mutableCopy;
436434
if (@available(iOS 11.0, *)) {
437435
[dict addEntriesFromDictionary:@{kIASKTextContentTypeUsername: UITextContentTypeUsername,
438436
kIASKTextContentTypePassword: UITextContentTypePassword}];

Sources/InAppSettingsKit/Views/IASKTextField.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ - (void)setSpecifier:(IASKSpecifier *)specifier {
3535
if (specifier.isAddSpecifier) {
3636
self.returnKeyType = UIReturnKeyDone;
3737
}
38-
if (@available(iOS 10.0, *)) {
39-
self.textContentType = specifier.textContentType;
40-
}
38+
self.textContentType = specifier.textContentType;
4139
}
4240

4341
- (BOOL)becomeFirstResponder {

0 commit comments

Comments
 (0)