equal
deleted
inserted
replaced
254 // need to offset this section (see format in CommodityFunctions.m and above) |
254 // need to offset this section (see format in CommodityFunctions.m and above) |
255 NSInteger gmSize = [self.gameModifierArray count]; |
255 NSInteger gmSize = [self.gameModifierArray count]; |
256 if (cell == nil) { |
256 if (cell == nil) { |
257 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 |
257 cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 |
258 reuseIdentifier:CellIdentifier1] autorelease]; |
258 reuseIdentifier:CellIdentifier1] autorelease]; |
259 UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(260, 12, 150, 23)]; |
259 |
|
260 int offset = 0; |
|
261 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) |
|
262 offset = 45; |
|
263 |
|
264 UISlider *slider = [[UISlider alloc] initWithFrame:CGRectMake(offset+260, 12, offset+150, 23)]; |
260 slider.maximumValue = [[detail objectForKey:@"max"] floatValue]; |
265 slider.maximumValue = [[detail objectForKey:@"max"] floatValue]; |
261 slider.minimumValue = [[detail objectForKey:@"min"] floatValue]; |
266 slider.minimumValue = [[detail objectForKey:@"min"] floatValue]; |
262 slider.tag = row+gmSize; |
267 slider.tag = row+gmSize; |
263 [slider addTarget:self action:@selector(sliderChanged:) forControlEvents:UIControlEventValueChanged]; |
268 [slider addTarget:self action:@selector(sliderChanged:) forControlEvents:UIControlEventValueChanged]; |
264 [cell.contentView addSubview:slider]; |
269 [cell.contentView addSubview:slider]; |