I am developing an application. I am creating the Universal Application using the Single View Based application model. So, I need to create a new class. But, it gives only a single xib. I need two xibs for iPhone and iPad. Please tell me how to create the two xibs for a single class.
I am developing an application. I am creating the Universal Application using the Single
Share
Create a new one with same name .. lets suppose your view controller name is “NewViewController” .. your xib will be
NewViewController~ipadfor the iPad andNewViewController~iPhonefor the iphone .. so when you implementinitWithNibNamejust write the basic name for you xib which isNewViewControllerand the iOS will take care about calling the match xib based on current used platform .. and don’t forget to assign the custom class for the file owner in the new xib to be your new class like the image below.For Create new xib check these images :