I can't seem to get开发者_如何学编程 the number of view controllers in the view controller stack.
NSUInteger *viewControllerCount = self.navigationController.viewControllers.count;
I can loop through the view controllers and NSLog the objects within but I can't do a simple count. If I try to access this pointer, the ap crashes... no Log, no error message, nada. Please help!
I believe you want to remove the *:
NSUInteger viewControllerCount = self.navigationController.viewControllers.count;
The reason why this isn't working is because NSUInteger isn't an object type, it's a language type.
Therefore, you need to remove the * from the assignment and it should work just fine.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论