Refactored '-(id)init' to '- (instancetype)init'
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
|
||||
@implementation XLFormBaseCell
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
@implementation XLFormButtonCell
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
return [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
#pragma mark - XLFormStepCounterCell
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
|
||||
if (self) {
|
||||
// Initialization code
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
return [[XLFormOptionsObject alloc] initWithValue:value displayText:displayText];
|
||||
}
|
||||
|
||||
-(id)initWithValue:(id)value displayText:(NSString *)displayText
|
||||
-(instancetype)initWithValue:(id)value displayText:(NSString *)displayText
|
||||
{
|
||||
self = [super init];
|
||||
if (self){
|
||||
@@ -94,7 +94,7 @@
|
||||
[encoder encodeObject:self.formDisplayText
|
||||
forKey:@"formDisplayText"];
|
||||
}
|
||||
-(id)initWithCoder:(NSCoder *)decoder
|
||||
-(instancetype)initWithCoder:(NSCoder *)decoder
|
||||
{
|
||||
if ((self=[super init])) {
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
|
||||
@interface XLFormOptionsViewController : UITableViewController<XLFormRowDescriptorViewController, XLFormRowDescriptorPopoverViewController>
|
||||
|
||||
- (id)initWithStyle:(UITableViewStyle)style;
|
||||
- (instancetype)initWithStyle:(UITableViewStyle)style;
|
||||
|
||||
|
||||
- (id)initWithStyle:(UITableViewStyle)style
|
||||
- (instancetype)initWithStyle:(UITableViewStyle)style
|
||||
titleHeaderSection:(NSString *)titleHeaderSection
|
||||
titleFooterSection:(NSString *)titleFooterSection;
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
@synthesize rowDescriptor = _rowDescriptor;
|
||||
@synthesize popoverController = __popoverController;
|
||||
|
||||
- (id)initWithStyle:(UITableViewStyle)style
|
||||
- (instancetype)initWithStyle:(UITableViewStyle)style
|
||||
{
|
||||
self = [super initWithStyle:style];
|
||||
if (self){
|
||||
@@ -57,7 +57,7 @@
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithStyle:(UITableViewStyle)style titleHeaderSection:(NSString *)titleHeaderSection titleFooterSection:(NSString *)titleFooterSection
|
||||
- (instancetype)initWithStyle:(UITableViewStyle)style titleHeaderSection:(NSString *)titleHeaderSection titleFooterSection:(NSString *)titleFooterSection
|
||||
{
|
||||
self = [self initWithStyle:style];
|
||||
if (self){
|
||||
|
||||
@@ -68,12 +68,12 @@
|
||||
|
||||
#pragma mark - Initialization
|
||||
|
||||
-(id)initWithForm:(XLFormDescriptor *)form
|
||||
-(instancetype)initWithForm:(XLFormDescriptor *)form
|
||||
{
|
||||
return [self initWithForm:form style:UITableViewStyleGrouped];
|
||||
}
|
||||
|
||||
-(id)initWithForm:(XLFormDescriptor *)form style:(UITableViewStyle)style
|
||||
-(instancetype)initWithForm:(XLFormDescriptor *)form style:(UITableViewStyle)style
|
||||
{
|
||||
self = [self initWithNibName:nil bundle:nil];
|
||||
if (self){
|
||||
|
||||
@@ -580,7 +580,7 @@ CGFloat XLFormRowInitialHeight = -2;
|
||||
}
|
||||
|
||||
|
||||
-(id)initWithLeftValue:(NSString *)leftValue httpParameterKey:(NSString *)httpParameterKey rightOptions:(NSArray *)rightOptions
|
||||
-(instancetype)initWithLeftValue:(NSString *)leftValue httpParameterKey:(NSString *)httpParameterKey rightOptions:(NSArray *)rightOptions
|
||||
{
|
||||
self = [super init];
|
||||
if (self){
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
@implementation XLFormRightDetailCell
|
||||
|
||||
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
|
||||
{
|
||||
return [super initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:reuseIdentifier];
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
@synthesize doneButton = _doneButton;
|
||||
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
self = [super initWithFrame:CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 44.0)];
|
||||
if (self) {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame
|
||||
- (instancetype)initWithFrame:(CGRect)frame
|
||||
{
|
||||
if((self = [super initWithFrame:frame])){
|
||||
self.scrollsToTop = NO;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
@property NSString *msg;
|
||||
@property NSString *regex;
|
||||
|
||||
- (id)initWithMsg:(NSString*)msg andRegexString:(NSString*)regex;
|
||||
- (instancetype)initWithMsg:(NSString*)msg andRegexString:(NSString*)regex;
|
||||
+ (XLFormRegexValidator *)formRegexValidatorWithMsg:(NSString *)msg regex:(NSString *)regex;
|
||||
|
||||
@end
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
@implementation XLFormRegexValidator
|
||||
|
||||
-(id)initWithMsg:(NSString*)msg andRegexString:(NSString*)regex {
|
||||
-(instancetype)initWithMsg:(NSString*)msg andRegexString:(NSString*)regex {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.msg = msg;
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
@property BOOL isValid;
|
||||
@property (nonatomic, weak) XLFormRowDescriptor *rowDescriptor;
|
||||
|
||||
//-(id)initWithMsg:(NSString*)msg andStatus:(BOOL)isValid;
|
||||
-(id)initWithMsg:(NSString*)msg status:(BOOL)isValid rowDescriptor:(XLFormRowDescriptor *)row;
|
||||
//-(instancetype)initWithMsg:(NSString*)msg andStatus:(BOOL)isValid;
|
||||
-(instancetype)initWithMsg:(NSString*)msg status:(BOOL)isValid rowDescriptor:(XLFormRowDescriptor *)row;
|
||||
|
||||
//+(XLFormValidationStatus *)formValidationStatusWithMsg:(NSString *)msg status:(BOOL)status;
|
||||
+(XLFormValidationStatus *)formValidationStatusWithMsg:(NSString *)msg status:(BOOL)status rowDescriptor:(XLFormRowDescriptor *)row;
|
||||
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
@implementation XLFormValidationStatus
|
||||
|
||||
-(id)initWithMsg:(NSString*)msg andStatus:(BOOL)isValid {
|
||||
-(instancetype)initWithMsg:(NSString*)msg andStatus:(BOOL)isValid {
|
||||
return [self initWithMsg:msg status:isValid rowDescriptor:nil];
|
||||
}
|
||||
|
||||
-(id)initWithMsg:(NSString*)msg status:(BOOL)isValid rowDescriptor:(XLFormRowDescriptor *)row {
|
||||
-(instancetype)initWithMsg:(NSString*)msg status:(BOOL)isValid rowDescriptor:(XLFormRowDescriptor *)row {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.msg = msg;
|
||||
|
||||
Reference in New Issue
Block a user