Skip to content

Instantly share code, notes, and snippets.

@bimawa
Created October 28, 2014 05:56
Show Gist options
  • Save bimawa/f4e63b06f9cff37ba47c to your computer and use it in GitHub Desktop.
Save bimawa/f4e63b06f9cff37ba47c to your computer and use it in GitHub Desktop.
This method block size request for cells for ios8 and pass for less or eqal ios7.1 Needs for autolayouts cells for iOS8
- (BOOL)respondsToSelector:(SEL)aSelector
{
static BOOL useSelector;
static dispatch_once_t predicate = 0;
dispatch_once(&predicate, ^{
useSelector = SYSTEM_VERSION_LESS_THAN(@"8.0");
});
if (aSelector == @selector(tableView:heightForRowAtIndexPath:))
{
return useSelector;
}
return [super respondsToSelector:aSelector];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment