I want to add three labels into a cell dynamically, cell is created dynamically as well, but I don’t know how to create labels and add it into the cell in Objective-C (iPhone). Can anybody help me?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
By “dynamically” I assume you mean via code, not via Interface Builder. I also assume you know how to use
-tableView:cellForRowAtIndexPath:.Then things are simple. The UITableViewCell has a readonly
contentViewproperty. You can just add your three UILabel’s as a subview ofcontentView.