Skip to content

Commit d891e1e

Browse files
committed
Fixed issue with non-UITableViewController view controllers
1 parent 38a3080 commit d891e1e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

TPKeyboardAvoiding/TPKeyboardAvoidingTableView.m

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@ -(void)dealloc {
4848

4949
-(BOOL)hasAutomaticKeyboardAvoidingBehaviour {
5050
#if defined(__IPHONE_8_3)
51-
// Apps built using the iOS 8.3 SDK (probably: older SDKs not tested) seem to handle keyboard
52-
// avoiding automatically. This doesn't seem to be documented anywhere by Apple. Note: this only
53-
// applies to UITableView.
54-
return YES;
51+
if ( [self.delegate isKindOfClass:[UITableViewController class]] ) {
52+
// Theory: Apps built using the iOS 8.3 SDK (probably: older SDKs not tested) seem to handle keyboard
53+
// avoiding automatically with UITableViewController. This doesn't seem to be documented anywhere
54+
// by Apple, so results obtained only empirically.
55+
return YES;
56+
}
5557
#endif
5658

5759
return NO;

0 commit comments

Comments
 (0)