There is a bug in Xcode 5 in the Master Detail Template which manifests when you try and run it on iPads running iOS 6.x. The app will work fine on iOS 7 but won’t even start in iOS 6. The full error message is something like this:
Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[MasterViewController setPreferredContentSize:]: unrecognized selector sent to instance 0x7a95580’
The problem is with a code snippet in MasterViewController.m, first method. It looks like this:

Here we check if our current view controller (self) responds to preferredContentSize, and if it does, we’ll call what Apple recommend. If that’s not the case we simply won’t.
Adios exception!
The problem is, setPreferredContentSize is only available in IOS 7.0.
When you found the setPreferredContentSize you should do something like this :
at the header
now wherever u need to check whether ios version is greater or less and similarly set the contentsize
I love it! Thanks for sharing, Ankit!!