我後移動到10.12/Sierra和Xcode的8.1撞我的頭靠在一個奇數錯誤:瑣碎 「+ [的NSTimer scheduledTimerWithTimeInterval:重複:塊:]:無法識別選擇」 錯誤
+[NSTimer scheduledTimerWithTimeInterval:repeats:block:]:
unrecognized selector sent to class 0x7fff78f1fa88
最最小代碼(創建一個新項目的默認設置)重現此:
// AppDelegate.m
//
#import "AppDelegate.h"
@interface AppDelegate()
@property (weak) IBOutlet NSWindow *window;
@property (strong, nonatomic) NSTimer * timer;
@end
@implementation AppDelegate
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
self.timer = [NSTimer scheduledTimerWithTimeInterval:10
repeats:YES
block:^(NSTimer * _Nonnull timer)
{
NSLog(@"Ping from %@", timer);
}];
}
鏈接包括(核心)基礎類和'all_load'。必須是完全微不足道的東西 - 但不能達到目的。
任何和所有的幫助表示讚賞。
謝謝,
Dw。
不管它的價值,這些代碼不會崩潰,我(10.12.1時,Xcode 8.1)。 –