how can I change the position of a UITableViewCell content view without subclassing ‘UITableViewCell’?
putting cell.contentView.bounds = CGRectMake(20, 50, 10, 10); inside cellForRowAtIndexPath did not work.
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.
It seems you want to add multiple columns to your tableView, just see
iPhone Multiple Columns in UITableView
and
TableView with 2 colums by row , iphone/ipad
They use the way that subclassing your UITalbeViewCell, it’s convenient to customize the cell’s style. And the
official docmay helps more.However, you can create a new view and set it as the
cell.contentView, it’ll replace the cell’s contentView. Don’t forget to set the cell’s rowHeight if you want a smaller height one.