开发者

iPhone: Nib files not working correctly when copied with *.m & *.h files from 1 project to another

I've been building projects in pieces, prototyping different aspects of the whole in separate demo projects. I'm now in the process of migrating class and nib files from the prototypes into the target project and when I do so the nib files aren't behaving as they did in the prototype. I've been doing the migration by using the "Add Existing Files" item in the menu available in the hierarchical project file view.

Has anyone experienced behavior like this, and if you have do you have any suggestions for fixing the problem? In a number of cases I've simply recreated the nib file in the target and tha开发者_如何学JAVAt has worked, but I'm trying to migrate a fairly complicated nib file with 3 different views. I'd prefer not to recreate it by hand if I can avoid it.

I'm using Xcode 3.1.4 on Leopard with iPhone SDK 3.1.2.


When you migrate files in the manner you described. The hookups in IB aren't necessarily done for you automatically. You then have to go into IB and make sure all of the outlets are set, and the classes have the ownership you intend.


You have to set the main NIB file in your project Info.plist file.


I also had the same problem. I did following, may be helpful for you :: 1. Add the nib file to your new project along with your .h and .m file. 2. Break all the connection and remake all the connection and do save. 4. Also break connection with file owner and re make it. 5. And then make all connections again. This worked for me

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜