2016-11-23 13:41:07 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2016-11-23 13:41:07 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#import "RCTConvert+Text.h"
|
|
|
|
|
|
|
|
@implementation RCTConvert (Text)
|
|
|
|
|
|
|
|
+ (UITextAutocorrectionType)UITextAutocorrectionType:(id)json
|
|
|
|
{
|
|
|
|
return
|
|
|
|
json == nil ? UITextAutocorrectionTypeDefault :
|
|
|
|
[RCTConvert BOOL:json] ? UITextAutocorrectionTypeYes :
|
|
|
|
UITextAutocorrectionTypeNo;
|
|
|
|
}
|
|
|
|
|
2016-11-25 12:20:21 +00:00
|
|
|
+ (UITextSpellCheckingType)UITextSpellCheckingType:(id)json
|
|
|
|
{
|
|
|
|
return
|
|
|
|
json == nil ? UITextSpellCheckingTypeDefault :
|
|
|
|
[RCTConvert BOOL:json] ? UITextSpellCheckingTypeYes :
|
|
|
|
UITextSpellCheckingTypeNo;
|
|
|
|
}
|
|
|
|
|
2016-11-23 13:41:07 +00:00
|
|
|
@end
|