我是iOS编程的初学者,我正在寻找我的问题的答案。UISlider更改宽度取决于设备
我有一个UISlider内的UITableViewCell,我试图得到这种处置:Label-Slider-DetailLabel(动态)。
这是我的代码:
cell = [tableView dequeueReusableCellWithIdentifier:@"SelectedMeetingCell"];
[cell.textLabel setText:@"Duration"];
[cell.detailTextLabel setText:[Utilities StringFromDuration:Agenda.InitialDuration.doubleValue]];
sliderCell = (SliderCell*)[[UIViewController alloc] initWithNibName:@"SliderCell" bundle:nil].view;
[sliderCell setDelegate:self];
[sliderCell.slider setValue:Agenda.InitialDuration.doubleValue];
[cell.contentView addSubview:sliderCell];
sliderCell.slider.frame = CGRectMake(100, 0, 500, 44);
最后一行是我曾经把我的滑块我想是这样的方式。它适用于iPad,但不适用于iPhone版本。有没有办法根据设备自动调整滑块的宽度?
(SliderCell是一个UISlider @property一个UITableViewCell)
谢谢大家提前!
附加随机virew控制器的视图高度动态的UITableViewCell不是一个好主意。 – 2012-10-14 16:49:51
有什么办法可以有这种性格? – Hetana
有没有人有想法? – Hetana