クラスメソッドからインスタンスメソッドにアクセスしようとしています。私は、このエラーObjective-cクラスメソッドからメソッドを呼び出す
を取得しています+ [ActiveVC goToDashBoard]:「+ [ActiveVC goToDashBoard]: 認識されていないセレクタがキャッチされない例外により 'NSInvalidArgumentException'、理由にアプリを終了クラス0x112010
***に送信認識されていないセレクタは、クラス0x112010'
私のコードに送ら
+ (void) removeClosedVisitor:(NSString *) visitorID{
for (NSInteger i = activelist.count - 1; i >= 0 ; i--) {
ActiveItemObject *item = [activelist objectAtIndex:i];
if ([visitorID isEqualToString:item.VisitorId]) {
NSLog(@"Removing Visitor from Active List -- %@", visitorID);
[activelist removeObjectAtIndex:i];
//[self.incommingTable reloadData];
// NSDictionary *activeDictionary = [[NSDictionary alloc] init];
// activeDictionary = [activelist mutableCopy];
//
// [[NSNotificationCenter defaultCenter]
// postNotificationName:@"PassData"
// object:nil
// userInfo:activeDictionary];
[[self class] goToDashBoard];
}
}
}
- (void) goToDashBoard{
NSLog(@"Segue to Dashboard");
UITabBarController *dvc = [self.storyboard instantiateViewControllerWithIdentifier:@"id_tabView"];
[dvc setModalTransitionStyle:UIModalTransitionStyleCoverVertical];
[self presentViewController:dvc animated:YES completion:nil];
}
この問題を解決するお手伝いができます。 tnx。
' - (void)goToDashBoard'はインスタンスメソッドです。インスタンスを持たないAccessibleのクラスメソッドにしたい場合は、署名を '+(void)goToDashBoard'に変更してください – NSNoob