再編譯時就一直出現Error
This generally means that another instance of this process was already running or is hung in the debugger
實體機上沒有看到在跑任何程式丫~
但就是重編不了~
最後是裝置關機重開才行~
| 設備 | CPU | 螢幕顯示 | 內存 | ||
| 1代 | 412MHz | 480X320 | 128MB | ||
| iPhone3G | 412MHz | 480X320 | 128MB | ||
| iPod Touch | 532MHz | 480X320 | 128MB | ||
| iPhone3GS | 600MHz | 480X320 | 256MB | ||
| iPad | 1GHz | 1024X768 | 256MB | ||
| iPhone4 | 1GHz | 960X640 | 512MB | ||
| ipad2 | 1GHz 雙核心 Apple A5 | 1024X768 | 512MB | ||
typedef enum {
OSMemoryNotificationLevelAny = -1,
OSMemoryNotificationLevelNormal = 0,
OSMemoryNotificationLevelWarning = 1,
OSMemoryNotificationLevelUrgent = 2,
OSMemoryNotificationLevelCritical = 3
} OSMemoryNotificationLevel;
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
[[CCDirector sharedDirector] purgeCachedData];
}
// Set the opacity of all of our children that support it
-(void) setOpacity: (GLubyte) opacity
{
for( CCNode *node in [self children] )
{
if( [node conformsToProtocol:@protocol( CCRGBAProtocol)] )
{
[(id) node setOpacity: opacity];
}
}
}
//================================================================
-(void) registerWithTouchDispatcher
{
[[CCTouchDispatcher sharedDispatcher] addTargetedDelegate:self priority:INT_MIN+1 swallowsTouches:YES];
}
- (BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event
{
return YES;
}
NSLog(@"**************************************************");
//內容都是nsstring的
NSMutableArray *arrData = [NSMutableArray new];
[arrData addObject:@"A4"];
[arrData addObject:@"A2"];
[arrData addObject:@"a2"];
[arrData addObject:@"A2"];
[arrData addObject:@"A1"];
NSLog(@"------------- original:");
for (id obj in arrData) NSLog(@"arrData:%@", obj);
NSLog(@"------------- sorted:");
NSArray * sortedData =
[arrData sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
for (id obj in sortedData) NSLog(@"sortedData:%@", obj);
NSLog(@"------------- sorted:");
NSArray * sortedData2 =
[arrData sortedArrayUsingSelector:@selector(localizedCompare:)];
for (id obj in sortedData2) NSLog(@"sortedData2:%@", obj);
NSLog(@"**************************************************");
//內容都是NSNumber的
NSMutableArray *arrNum = [NSMutableArray new];
[arrNum addObject:[[NSNumber alloc] initWithInt:5]];
[arrNum addObject:[[NSNumber alloc] initWithInt:1]];
[arrNum addObject:[[NSNumber alloc] initWithInt:3]];
[arrNum addObject:[[NSNumber alloc] initWithInt:2]];
NSLog(@"------------- original:");
for (id obj in arrNum) NSLog(@"arrNum:%@", obj);
NSLog(@"------------- sorted:");
NSArray * sortedNum = [arrNum sortedArrayUsingSelector:@selector(compare:)];
for (id obj in sortedNum) NSLog(@"sortedNum:%@", obj);