I’m using the iPhone SDK to build a simple application. I’ve created a brand new class which has a single variable. I need to make 5 instances of that class, which I have no trouble doing. I can create those instances and also set the variables without issue. What i do need to know is this:
How do I link each of the 5 different instances of the variable to different and specific UILabels?
Would I be better to create a method that dynamically creates and positions the labels?
Thanks for your help in advance, I’m now to this iphone programming thing. I’m serious about learning fast though so I have posted a bounty on this question here :
http://www.askearn.com/Responses.aspx?QuestionID=6542613f-7be8-4bb3-a950-aac218d47711
I’m assuming that you have a single view and associated view controller that contain the 5
UILabels? If so, set thetextproperty of each label in theviewDidLoadmethod of yourUIViewControllerWith regards to the second part of your question about positioning the labels, that’s up to you to decide the best way to set them. I would recommend starting out with Interface Builder first and only resorting to positioning them in code if you need to.