Hi
I am trying to position a UISwitch inside a UITableViewCell, so that it is positioned correctly for iPhone 3/4, iPod Touch and iPad, no matter the orientation. I have tried with this code:
Code:
CGRect switchFrame = CGRectMake(cell.frame.size.width - cell.frame.origin.x - 94 - 10, 8, 94, 27);
self.repeatSwitch = [[UISwitch alloc] initWithFrame:switchFrame];
[cell addSubview:self.repeatSwitch];
My code fails totally, even producing different results on iPhone and iPad. It seems the width of the cell is the same for iPhone and iPad??
Any ideas on how to do this?
Thank you
Søren