1
我正在使用下面的代码来检查视图控制器。比较类是给出不正确的输出
NSLog(@"addProductClicked 1===%@", self.class);
NSLog(@"addProductClicked 2===%@", [CategoriesViewController class]);
if ([self.class isKindOfClass:[CategoriesViewController class]]) {
NSLog(@"you go it right");
} else {
NSLog(@"you go it wrong");
}
我得到的输出如下。
addProductClicked 1===CategoriesViewController
addProductClicked 2===CategoriesViewController
you go it wrong
任何想法是什么问题?
只是为了更新,下面就是我定义我的视图控制器...
@interface CategoriesViewController : GlobalViewController {
现在GlobalViewController
我有方法,其中,我上面的检查......