我正在做一些非常简单的事情。试图 pushViewController。它在 iPhone 上运行良好,但在 iPad 上,它崩溃了!信号:
libsystem_kernel.dylib`__pthread_kill:
0x35d85324: mov r12, #328
0x35d85328: svc #128
0x35d8532c: blo 0x35d85344 ; __pthread_kill + 32
0x35d85330: ldr r12, [pc, #4] ; __pthread_kill + 24
0x35d85334: ldr r12, [pc, r12]
0x35d85338: b 0x35d85340 ; __pthread_kill + 28
0x35d8533c: stmibeqr4, {r5, r6, r7, r10, r11}
0x35d85340: bx r12
0x35d85344: bx lr
有什么想法吗?谢谢!
Principal *cvc;
NSString *deviceType = [UIDevice currentDevice].model;
if([deviceType isEqualToString:@"iPhone"] || [deviceType isEqualToString:@"iPod touch"]) {
cvc = [[Principal alloc] initWithNibName:@"Principal" bundle:nil];
} else {
cvc = [[Principal alloc] initWithNibName:@"Principal_iPad" bundle:nil];
}
[cvc setImg:flippedImage];
if([deviceType isEqualToString:@"iPhone"] || [deviceType isEqualToString:@"iPod touch"]) {
[self.navigationController pushViewController:cvc animated:YES];
} else {
[self.navigationController pushViewController:cvc animated:YES];
}
[cvc release];