I am using UICatalog example and trying to find whether it is possible to add a label next to a button. Please let me know how to approach this problem
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.
There are a couple of ways to do this, but I tend to create a UITableViewCell derivative with an associated XIB file. Modify the XIB in Interface Builder to include the button and the label. Hook those objects up to IBOutlets and IBActions in your UITableViewCell class.
When you implement your cellForRowAtIndexPath you can grab the top level object from your UITableViewCell XIB file like this:
You can then cast your cell object to your UITableViewCell class:
You can then use the YourCellClass to control (and receive events from) the cell in the UITableView.