diff --git a/TPKeyboardAvoiding/TPKeyboardAvoidingCollectionView.m b/TPKeyboardAvoiding/TPKeyboardAvoidingCollectionView.m index 2475512..8bb7a3a 100644 --- a/TPKeyboardAvoiding/TPKeyboardAvoidingCollectionView.m +++ b/TPKeyboardAvoiding/TPKeyboardAvoidingCollectionView.m @@ -15,7 +15,7 @@ @implementation TPKeyboardAvoidingCollectionView #pragma mark - Setup/Teardown -- (void)setup { +- (void)setupKeyboardAvoiding { if ( [self hasAutomaticKeyboardAvoidingBehaviour] ) return; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(TPKeyboardAvoiding_keyboardWillShow:) name:UIKeyboardWillChangeFrameNotification object:nil]; @@ -26,19 +26,19 @@ - (void)setup { -(id)initWithFrame:(CGRect)frame { if ( !(self = [super initWithFrame:frame]) ) return nil; - [self setup]; + [self setupKeyboardAvoiding]; return self; } - (id)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout { if ( !(self = [super initWithFrame:frame collectionViewLayout:layout]) ) return nil; - [self setup]; + [self setupKeyboardAvoiding]; return self; } -(void)awakeFromNib { [super awakeFromNib]; - [self setup]; + [self setupKeyboardAvoiding]; } -(void)dealloc { diff --git a/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.m b/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.m index e811391..60aff64 100644 --- a/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.m +++ b/TPKeyboardAvoiding/TPKeyboardAvoidingScrollView.m @@ -15,7 +15,7 @@ @implementation TPKeyboardAvoidingScrollView #pragma mark - Setup/Teardown -- (void)setup { +- (void)setupKeyboardAvoiding { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(TPKeyboardAvoiding_keyboardWillShow:) name:UIKeyboardWillChangeFrameNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(TPKeyboardAvoiding_keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(scrollToActiveTextField) name:UITextViewTextDidBeginEditingNotification object:nil]; @@ -24,13 +24,13 @@ - (void)setup { -(id)initWithFrame:(CGRect)frame { if ( !(self = [super initWithFrame:frame]) ) return nil; - [self setup]; + [self setupKeyboardAvoiding]; return self; } -(void)awakeFromNib { [super awakeFromNib]; - [self setup]; + [self setupKeyboardAvoiding]; } -(void)dealloc { diff --git a/TPKeyboardAvoiding/TPKeyboardAvoidingTableView.m b/TPKeyboardAvoiding/TPKeyboardAvoidingTableView.m index 7eefa23..a210289 100644 --- a/TPKeyboardAvoiding/TPKeyboardAvoidingTableView.m +++ b/TPKeyboardAvoiding/TPKeyboardAvoidingTableView.m @@ -15,7 +15,7 @@ @implementation TPKeyboardAvoidingTableView #pragma mark - Setup/Teardown -- (void)setup { +- (void)setupKeyboardAvoiding { if ( [self hasAutomaticKeyboardAvoidingBehaviour] ) return; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(TPKeyboardAvoiding_keyboardWillShow:) name:UIKeyboardWillChangeFrameNotification object:nil]; @@ -26,19 +26,19 @@ - (void)setup { -(id)initWithFrame:(CGRect)frame { if ( !(self = [super initWithFrame:frame]) ) return nil; - [self setup]; + [self setupKeyboardAvoiding]; return self; } -(id)initWithFrame:(CGRect)frame style:(UITableViewStyle)withStyle { if ( !(self = [super initWithFrame:frame style:withStyle]) ) return nil; - [self setup]; + [self setupKeyboardAvoiding]; return self; } -(void)awakeFromNib { [super awakeFromNib]; - [self setup]; + [self setupKeyboardAvoiding]; } -(void)dealloc {