I want to know how can I display different data in each cell of table.
In my case, I have a uitable which has 4 rows. I want to display name in first row , in second row address , in third row phone no. , 4th row email . any suggestions ?
Thanks…
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.
When you implement your
tableView:cellForRowAtIndexPath:method, you can put a condition on theindexPath.rowvalue. This is assuming that you’re using the same view type for each row of the data.If you want different table view cell types for each row, you have to have different cell identifier for each one of them, and instantiate the
UITableViewCellwith a particular cell type that you need using aswitchstatement, or anifstatement.