Reputation: 474
In xcode4.2, I have a UiViewController bundled with a same name xib file. In the UiViewController, I have some IBOutlets as below connect to the xib.
@property (retain, nonatomic) IBOutlet UIButton *topButton;
@property (retain, nonatomic) IBOutlet UIButton *hotButton;
@property (retain, nonatomic) IBOutlet UIButton *newButton;
@property (retain, nonatomic) IBOutlet UIButton *starredButton;
Now, I want to create a iPad version xib file of the UIViewController, what shall I do? i.e. how to connect one IBOutlet to two version's xib. Any help will be appreciated! thanks advanced!
Upvotes: 1
Views: 1499
Reputation: 38728
You just need two nibs with the appropriate naming
MyView~iphone.xib
MyView~ipad.xib
Then just make sure they both have the same file's owner and hook up the connections you want.
Upvotes: 4
Reputation: 1489
In xcode 4 we can't do that for a single xib,but we can create respective ipad versions all at once.Right click on target and click on duplicate.Then select "duplicate and transition to ipad".A new target and new set of xibs are created. This might help you.
Upvotes: 0
Reputation: 1489
Go to New File -> Choose User Interface from left hand side -> Select Empty -> Select ipad in device Family drop down.
Upvotes: 1