Skip to content

Commit

Permalink
Merge pull request John-Lluch#317 from balord/master
Browse files Browse the repository at this point in the history
removes some 'respondsToSelector' and 'performSelector' calls since the minimum SDK is iOS7
  • Loading branch information
John Lluch Zorrilla committed Aug 21, 2014
2 parents ad0562e + 16949fe commit 09422d4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions SWRevealViewController/SWRevealViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -1384,9 +1384,8 @@ - (void)_setFrontViewPosition:(FrontViewPosition)newPosition withDuration:(NSTim
void (^animations)() = ^()
{
// Calling this in the animation block causes the status bar to appear/dissapear in sync with our own animation
if ( [self respondsToSelector:@selector(setNeedsStatusBarAppearanceUpdate)])
[self performSelector:@selector(setNeedsStatusBarAppearanceUpdate) withObject:nil];

[self setNeedsStatusBarAppearanceUpdate];

// We call the layoutSubviews method on the contentView view and send a delegate, which will
// occur inside of an animation block if any animated transition is being performed
[_contentView layoutSubviews];
Expand Down Expand Up @@ -1586,9 +1585,9 @@ - (void)_performTransitionOperation:(SWRevealControllerOperation)operation withV
controllerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
controllerView.frame = frame;

if ( [controller respondsToSelector:@selector(automaticallyAdjustsScrollViewInsets)] && [controllerView isKindOfClass:[UIScrollView class]] )
if ( [controllerView isKindOfClass:[UIScrollView class]] )
{
BOOL adjust = (BOOL)[controller performSelector:@selector(automaticallyAdjustsScrollViewInsets) withObject:nil];
BOOL adjust = controller.automaticallyAdjustsScrollViewInsets;

if ( adjust )
{
Expand Down

0 comments on commit 09422d4

Please sign in to comment.