Reputation: 608
I need to copy xib files from one project to another project. This may be basic thing but I am new to xib file usage.
I manually copied the xxx.h, xxx.m & xxx.xib from project-1 and kept in one folder and included them in another project as "Right click on the Project-2 folder -> Add files to Project-2" option.
(1) I lost some IBOutlet connections after copying
(2) Xib not allowing to have new IBOutlet variables.
Then I copied the files from original location (Project-1 folder) but then
(3) If I create new IBOutlet connections the reference variable if I access I am getting nil value.
Could somebody help me the basics of how to move/copy the xib files and its sources.
Upvotes: 2
Views: 1505
Reputation: 5782
There may be two issues I sense in your copying.
1) While you are copying check option : "Copy selected items to destination folder". refer screenshot!
2) Also in your .xib file select File's owner --> Go to Identity Inspector in right top corner and select suitable class for that xib. When you add xib independently you have to set it's class manually like this.
Upvotes: 3
Reputation: 107231
When copying you need to setup the class and outlet connections.
Follow these steps:
Upvotes: 1
Reputation: 2461
May be it will help you....
Click your .xib file and add the class name. Like this
Upvotes: 2