开发者

One MainWindow.xib for Two Targets?

开发者 https://www.devze.com 2023-03-31 13:39 出处:网络
I am going to have two targets in one XCode project.These two targets are basically very similar except one is a full version and another is a lite version.

I am going to have two targets in one XCode project.These two targets are basically very similar except one is a full version and another is a lite version.

They are supposed to use the same MainWindow.xib an开发者_运维技巧d ViewController.

The full version target is already there (I created and implemented at first). Now I wish to add the 2nd target, but I can't add the existing MainWindow.xib and ViewController from the first target folder.

How can I include the existing xibs to my 2nd target?

Thanks


There should be a info.plist for each target. Have you tried setting the second XIB as the main window for the second target?

Another suggestion is use the UIViewController's initWithNib message, where you can pass the correct nib to the View controller initialization routine based on the version of the program you want to make.

0

精彩评论

暂无评论...
验证码 换一张
取 消