@@ -261,6 +261,7 @@ -(instancetype)init
261
261
[self setShouldAdoptDefaultKeyboardAnimation: YES ];
262
262
[self setShouldRestoreScrollViewContentOffset: NO ];
263
263
[self setToolbarManageBehaviour: IQAutoToolbarBySubviews];
264
+ [self setLayoutIfNeededOnUpdate: YES ];
264
265
265
266
// Initializing disabled classes Set.
266
267
_disabledClasses = [[NSMutableSet alloc ] initWithObjects: [UITableViewController class ], nil ];
@@ -432,9 +433,13 @@ -(void)setRootViewFrame:(CGRect)frame
432
433
// Setting it's new frame
433
434
[controller.view setFrame: frame];
434
435
435
- // Animating content (Bug ID: #160)
436
- [controller.view setNeedsLayout ];
437
- [controller.view layoutIfNeeded ];
436
+ // Animating content if needed (Bug ID: #204)
437
+ if (_layoutIfNeededOnUpdate)
438
+ {
439
+ // Animating content (Bug ID: #160)
440
+ [controller.view setNeedsLayout ];
441
+ [controller.view layoutIfNeeded ];
442
+ }
438
443
439
444
_IQShowLog ([NSString stringWithFormat: @" Set %@ frame to : %@ " ,[controller _IQDescription ],NSStringFromCGRect(frame)]);
440
445
} completion: NULL ];
@@ -1076,9 +1081,13 @@ - (void)keyboardWillHide:(NSNotification*)aNotification
1076
1081
// Setting it's new frame
1077
1082
[_rootViewController.view setFrame: _topViewBeginRect];
1078
1083
1079
- // Animating content (Bug ID: #160)
1080
- [_rootViewController.view setNeedsLayout ];
1081
- [_rootViewController.view layoutIfNeeded ];
1084
+ // Animating content if needed (Bug ID: #204)
1085
+ if (_layoutIfNeededOnUpdate)
1086
+ {
1087
+ // Animating content (Bug ID: #160)
1088
+ [_rootViewController.view setNeedsLayout ];
1089
+ [_rootViewController.view layoutIfNeeded ];
1090
+ }
1082
1091
1083
1092
} completion: NULL ];
1084
1093
_rootViewController = nil ;
0 commit comments