当我使用这段代码时,Xcode 给了我一个错误:
NSArray *buttonsFiles = [NSArray arrayWithObject:@"button_plus.png",@"button_minus.png",@"button_multiple.png",@"button_div.png",@"button_eq.png",@"button_percent.png",@"button_sqrt.png",@"button_back.png",@"button_pointer.png",@"button_c.png",@"button_0.png",@"button_1.png",@"button_2.png",@"button_3.png",@"button_4.png",@"button_5.png",@"button_6.png",@"button_7.png",@"button_8.png",@"button_9.png",nil];
我应该使用它来避免错误吗?
NSString *myfile1 = [@"button_plus.png"];
NSString *myfile2 = [@"button_minus.png"];
...
NSString *myfile20 = [@"button_9.png"];
NSArray* myArray = [NSArray arrayWithObjects:myfile1, myfile2... myfile20r, nil];