Calios
Calios

Reputation: 846

How to turn a project with xib into a pure code one?

I tried to turn a xib project which is downloaded from iOS Developer Library of Apple, into a pure code one for further use, but it didn't work.

I wonder what should I pay attention to when I do this kind of conversion, and I wonder it will help me improve my skill of iOS developing.

Upvotes: 2

Views: 205

Answers (2)

mAc
mAc

Reputation: 2514

Converting the Xib file into pure code part is not a very big task, you just need to be carefully replace the items created via Interface builder by your code part. You can follow this sequence while converting such projects :-

1) Display the elements made via IB with your code.
2) Make sure the delegates and datasources to be connected via code if they were connected via     IB.
3) Check for the IBActions, if any to be replaced.
4) Lastly, if you are not using ARC or the Project that is being converted not using ARC then the dealloc part or viewDidUnload method, where we generally make the objects nil and release.

Hope it helps you :)

Upvotes: 1

Kirsteins
Kirsteins

Reputation: 27335

There are some tool available. For example, http://kosmaczewski.net/projects/nib2objc/

Upvotes: 1

Related Questions