Reputation: 66320
I would like to make a universal project that works both on iPhone and iPad. According to the docs, in order to have a different xib file for the iPad, all I have to do is to create a new xib file and name it with a ~ipad
extension.
WhereamiViewController.h
WhereamiViewController.m
WhereamiViewController.xib
WhereamiViewController~ipad.xib
It works infact. However I need to bind the controls on the new ~ipad.xib
to the same instance variables and methods on WhereamiViewController.h
. But how do I achieve this?
How do I set the File's Owner of the new xib to that existing header file?
Upvotes: 1
Views: 2075
Reputation: 61
do in this way
File's Owner > Identity Inspector tab > Custom Class : your class name
Upvotes: 0
Reputation: 3345
I hope your looking to add XIB file for IPad and same .h and .m file which is already existed for IPhone. check below picture to connect your file's owner once finished according to picture connect your view to file's owner view reference. Then you can give all components reference as you like.
Upvotes: 0
Reputation: 35636
Same way you do it in your first xib
...
Click on File's Owner > Identity Inspector tab > Custom Class : WhereamiViewController
Upvotes: 2