I came across this code and I was wondering if the #ifdef check is redundant.
UIButton *doneButton = [[UIButton alloc] init];
...
#ifdef __IPHONE_7_0
if([self respondsToSelector:@selector(setEdgesForExtendedLayout:)])
[doneButton setContentEdgeInsets:UIEdgeInsetsMake(0, 12, 0, -12)];
#endif
I tried removing it and running it in iOS 6 and it ran fine. Is there some special case I need to be aware of in iOS 6/7 that causes it to not trigger or causes crashes?