views:

167

answers:

1

Hello all,

I on the doorstep of a new learning curve .

I want to make reusable components / classes from my completed iphone project and with the mention of the following questions , If anyone want to redirect me to some useful reusable components or classes it will be useful to me .

And Also tell me which is the best way to make reusable classes or components ?

http://stackoverflow.com/questions/843167/is-there-a-gallery-of-reusable-iphone-components-on-the-web

http://stackoverflow.com/questions/640805/open-source-iphone-components-reusable-views-controllers-buttons-table-cells

http://stackoverflow.com/questions/200850/are-there-any-open-source-iphone-applications-around

Thanks .

+1  A: 

To make a reusable library on the iPhone, you should create a new target of type "Cocoa Touch Static Library". Add the source files that will go to make up the library to this new target, and remove them from your application(s)'s target(s). Now add the new target as a dependency of each application target (Ctrl-click the app target, get info, add direct dependency) and also add the library product (called yourtargetname.a) to the "link libraries and frameworks" phase of the app.

Graham Lee
Thanks Graham great job . But can you tell me that shouldn't we build the library for related classes . what about unrelated reusable classes . should we use just as it is .h and .m files ?
hib
@Hib do it either way. It probably doesn't make sense to lump unrelated classes together in a library, but there's no technical obstacle to doing so.
Graham Lee