-2
我正在線程1:運行我的應用程序時發出SIGQUIT信號。但是當我點擊繼續執行時,應用程序正在恢復並完成任務。不知道爲什麼我收到此獲取線程1信號SIGQUIT
NSArray *keyNamesForKAV = [[NSArray alloc]initWithObjects:@"aKAV",@"bKAV",@"cKAV",@"dKAV",@"eKAV",@"fKAV",@"gKAV",@"hKAV",@"iKAV",@"jKAV",@"kKAV",@"lKAV",@"mKAV",@"nKAV",@"oKAV",@"pKAV",@"qKAV",@"rKAV",@"sKAV",@"tKAV",@"uKAV",@"vKAV",@"wKAV",@"xKAV",@"yKAV",@"zKAV", nil];
NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
KAVTrie *kavTree = [defaults rm_customObjectForKey:@"zKAV"];
NSMutableArray *KAVArray = [[NSMutableArray alloc]init];
if (!kavTree){
for (int i = 0 ; i < 26; i++){
KAVTrie *trie = [[KAVTrie alloc]init];
KAVTrie *trieLoad = [[KAVTrie alloc]init];
NSString *path = [[NSBundle mainBundle] pathForResource:[NSString stringWithFormat:@"%c",[[keyNamesForKAV objectAtIndex:i] characterAtIndex:0]] ofType:@"plist"];
NSDictionary *tempDict = [[NSDictionary alloc] initWithContentsOfFile:path];
NSArray *array = [tempDict allKeys];
trie = [trieLoad storeTrieInArray:array];
[KAVArray addObject:trie];
}
NSLog(@"KAV objects created");
for (int i = 0 ; i < 26; i++){
[defaults rm_setCustomObject:[KAVArray objectAtIndex:i] forKey:[keyNamesForKAV objectAtIndex:i]];
[defaults synchronize];
}
NSLog(@"KAV objects loaded in user defaults");
}
我收到錯誤在第二個for循環
因爲你做錯了什麼。想要更多細節?提供更多。 –
我想加載userdefaults中的自定義對象。如果需要,我可以提供代碼 –
屏幕上是否顯示任何需要鍵盤控制的文本框。如果是,請嘗試清除所有使用鍵盤的應用程序並重新加載Xcode並重新構建。如果不是,請儘可能提供代碼。 –