Writing iOS7 code that compiles against iOS 6 Base SDK
问题 We have an iOS app on-sale now, and we're developing the iOS 7 version on XCode 5 DP using the same code base. We really need to release an update right now for existing iOS 5/6 customers but, of course, when we re-load the project into XCode 4, it complains about non-existing properties since the Base SDK then becomes iOS6, not 7: // Only run this bit on iOS 7 if ([self respondsToSelector:@selector(setFooForExtendedLayout:)]) { self.fooForExtendedLayout = UIFooEdgeLeft | UIFooEdgeRight; }