1

我从我的发布版本中得到了这个崩溃日志,但很难弄清楚这意味着什么。

这个 UIKit 是否因为在动画制作时标签从超级视图中删除而崩溃?

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000001, 0x000000000000defe
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   UIKit                           0x36011c7e -[UIView release] + 54
1   UIKit                           0x3603d12c -[UIView dealloc] + 292
2   TestApp                         0x0011fb0e -[ValueLabel .cxx_destruct] (ValueLabel.m:47)
3   libobjc.A.dylib                 0x3beeff26 object_cxxDestructFromClass(objc_object*, objc_class*) + 54
4   libobjc.A.dylib                 0x3beed0de objc_destructInstance + 30
5   libobjc.A.dylib                 0x3beed3ae object_dispose + 10
6   UIKit                           0x3603d2e2 -[UIView dealloc] + 730
7   TestApp                         0x0011fa48 -[ValueLabel dealloc] (ValueLabel.m:306)
8   libsystem_blocks.dylib          0x3c32bab0 _Block_release + 220
9   UIKit                           0x360255e0 -[UIViewAnimationBlockDelegate dealloc] + 56
10  CoreFoundation                  0x341406da CFRelease + 98
11  CoreFoundation                  0x34161d78 -[__NSDictionaryI dealloc] + 128
12  libobjc.A.dylib                 0x3beed490 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 164
13  CoreFoundation                  0x3414282c _CFAutoreleasePoolPop + 12
14  CoreFoundation                  0x341d31b2 __CFRunLoopRun + 1290
15  CoreFoundation                  0x34146238 CFRunLoopRunSpecific + 352
16  CoreFoundation                  0x341460c4 CFRunLoopRunInMode + 100
17  GraphicsServices                0x37d24336 GSEventRunModal + 70
18  UIKit                           0x360622b4 UIApplicationMain + 1116
19  TestApp                         0x000e6cae main (main.m:16)
20  TestApp                         0x000e6c64 start + 36
4

1 回答 1

3

如果要删除在 Storyboard 或 NIB 中实例化的视图,请确保 IBOutlet 属性是strongretain而不是weakassign,否则一旦从父视图中删除它们就会被释放。

这是

@property (nonatomic, strong) IBOutlet UILabel* labelToRemove;

而不是

@property (nonatomic, weak) IBOutlet UILabel* labelToRemove;
于 2013-02-20T15:59:30.243 回答