- (id)objectAtIndexSafe:(NSUInteger)index
{
if (index < [self count]) {
return [self objectAtIndexSafe:index];
}else {
TTSafeKitAssert(NO, @"unsafe");
return nil;
}
}
TTSafeKitAssert :发送转储的线程信息(使用PlCashReporter)来切断,但是当objectAtIndexSafe调用时,TTSafeKitAssert将发送这么多次。在这种情况下我怎么才能发送一次!
答案 0 :(得分:0)
如果是类别:
- (id)objectAtIndexSafe:(NSUInteger)index
{
if (index < [self count]) {
return [self objectAtIndex:index];
}else {
TTSafeKitAssert(NO, @"unsafe");
return nil;
}
}