在我的Mac iPhone模擬器(iPhone模擬器4.0)我運行我的應用程序沒有問題,但是當我將其更改爲運行iPhone模擬器4.2的另一臺Mac時,它擊碎了一個按鈕,調試器的版本(4.0和4.2)會導致潛在的崩潰? THX提前:))[iOS]應用程序崩潰
編輯
這是代碼我有疑問,可能會導致死機「因爲我在它使用一個UIPickerView代碼:
- (void)viewDidLoad {
((UILabel *)[[[[[[switchCommerce subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:0]).text = @"oui";
((UILabel *)[[[[[[switchCommerce subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:1]).text = @"non";
((UILabel *)[[[[[[switchStationDeLavage subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:0]).text = @"oui";
((UILabel *)[[[[[[switchStationDeLavage subviews] lastObject] subviews] objectAtIndex:2] subviews] objectAtIndex:1]).text = @"non";
[rayonDeRechercheSlider setValue:35 animated:YES];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
CGAffineTransform transform=CGAffineTransformMakeTranslation(0,480);
pickerViewTypeCarburant.transform=transform;
pickerViewNomStation.transform=transform;
[UIView commitAnimations];
[super viewDidLoad];
typeCarburantTextField.delegate=self;
nomDeStationTextField.delegate=self;
pickerArrayTypeCarburant=[[NSMutableArray alloc] initWithObjects:@"Sans Plomb 95",@"Gazole",@"Super Gazole",@"GNV",@"Sans Plomb 98",@"SP95-E10",@"E85",nil];
pickerArrayNomStation=[[NSMutableArray alloc] initWithObjects:@"TOTAL",@"SHELL",@"ESSO",@"CARREFOUR",@"BP",@"AGIP",@"CASINO",@"LECLERC",@"AUCHAN",@"ELF",@"AVIA",@"SUPER U",nil];//added
}
向我們展示一些代碼。 – 2011-04-20 14:06:37
嗨,張貼編輯:) – Malloc 2011-04-20 14:11:56
史詩般的使用方括號。 – Stuart 2011-04-20 14:29:06