ios - How to check whether the ViewController is popped or pushed without using the BOOL variable? -
how check whether viewcontroller popped or pushed without using bool variable ? there inbuilt method tells whether si popped or pushed ??
if (self.navigationcontroller != nil) { // can pop } or views.
nsarray* views = [mynavigationcontroller viewcontrollers]; [views objectatindex:0] //will root and can check current root or not
if(self == [views objectatindex:0]) //yes root
Comments
Post a Comment