适用于iPhone模拟器,但不适用于设备
问题描述:
这里我添加了视图(UIImageViews),这一切都可以在模拟器上运行但不在设备上(iOS 4.1)wtf!?
Here I addsubviews (UIImageViews) it all works on the simulator but not on the device (iOS 4.1) wtf!?
- (void)addChips:(int)value {
UIImage *chipImage;
switch (value) {
case 5:
chipImage = [UIImage imageNamed:@"5chip"];
break;
case 25:
chipImage = [UIImage imageNamed:@"25chip"];
break;
case 100:
chipImage = [UIImage imageNamed:@"100chip"];
break;
case 500:
chipImage = [UIImage imageNamed:@"500chip"];
break;
default:
break;
}
int chipCount = [chipsOnBet count];
UIImageView *addChip = [[UIImageView alloc] initWithImage:chipImage];
addChip.opaque = YES;
addChip.frame = CGRectMake((kStackOffset * chipCount) + 131, 268, 57, 57);
[self.view addSubview:addChip];
[chipsOnBet addObject:addChip];
[addChip release];
}
答
- 确保你写的文件名正确,iOS区分大小写,模拟器不是。
- 如果你在iPhone4上测试,请确保你有合适的视网膜文件