I usually do the initialization of the button through
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
It is necessary to get rid of duplicate lines, for this I want to make custom initialization through the method
- (instancetype)init { self = [super init]; if (self) {
} return self; }
Is it possible to initialize a button via buttonType , in the init method ??


[UIButton customButton]that will return the button instance to you? - Max Mikheyenko 2:21 pmUIButton * button = [[UIButton alloc] initWithCustomButton]- Victor Mishustin