我必须调用这个方法:
[super initWithPNGFileName: "/Volumes/SAGITTER/Lavoro/Progetti xCode/IVBricker test/ball.png" andGame:game andCGRect:CGRectMake(x,y,16,16)];
所以当我把这个放到 iPhone 上的时候,路径不对。我知道我必须使用 NSBundle 但如果我这样做
[super initWithPNGFileName:[[NSBundle mainBundle] pathForResource:@"ball" ofType:@"png" inDirectory:@"/"] andGame:game andCGRect:CGRectMake(x,y,16,16)];
我收到警报:“从不兼容的指针类型传递 'initWithPNGFileName:andGame:andCGRect:' 的参数 1”
我应该如何继续使用 NSBundle?