I have textLabel, detailTextLabel, UISwitch in tableview cell.
I want to adjust y position of them. How can I do that?
I already adjusted height of cell.
UISwitch *switchView = [[UISwitch alloc] initWithFrame:CGRectMake(200, 10, 50, 30);
cell.accessoryView = switchView;
Above code doesn’t work for switch. It always shows at the same position.
You will need to add it as subView to cell ‘s content view like this:
[[cell contentView] addSubView:switchView];and switchView’s x,y should be relative to tableViewCell.