我在TableViewCell
中创建UISwitch
。在非视网膜屏幕上的UISwitch
在视网膜显示屏上看起来很好。
但是当我在3GS上构建一个项目时,我的UISwitch
看起来像是一幅画得很糟糕的图片。
http://iwheelbuy.com/stackoverflow/asdf.png
我的代码
{
...
cell.textLabel.text = NSLocalizedString(@"settings model glare", nil);
UISwitch *cellSwitch = [self switchWithTitle:@"glare"];
[cellSwitch setCenter:CGPointMake(260.0f, cell.frame.size.height/2)];
[cell addSubview:cellSwitch];
...
}
- (UISwitch *) switchWithTitle:(NSString *)_title
{
BOOL switchState;
if ([[NSUserDefaults standardUserDefaults] boolForKey:_title] == NO)
{
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:_title];
[[NSUserDefaults standardUserDefaults] synchronize];
}
switchState = [[NSUserDefaults standardUserDefaults] boolForKey:_title];
UISwitch *switchForCell = [[UISwitch alloc] initWithFrame:CGRectZero];
if ([_title isEqualToString:@"glare"])
[switchForCell addTarget:self action:@selector(changedValueForGlare) forControlEvents:UIControlEventValueChanged];
else
[switchForCell addTarget:self action:@selector(changedValueForShadow) forControlEvents:UIControlEventValueChanged];
[switchForCell setOn:switchState];
return switchForCell;
}
您可能希望上传问题的照片。很难说什么“严重画的图片意味着”。 – Josiah
我上传了一张图片 – iWheelBuy
我明白你的意思了。 – Josiah