ios - How to know the viewController already visited or not? -


i've multiple view controllers in iphone application, , i'm using navigation controller starting.

my question is: when going first viewcontroller. go second viewcontroller, , go first viewcontroller. here how can know have seen first view. means want know whether visited first viewcontroller or not?

how can know this? because have 1 functionality in 1 viewcontroller in want functionality should run 1 time not again , again.

anyone can please me problem.

thanks,

there stack managed uinavigationcontroller of uiviewcontroller there in navigation controller,

as have not mentioned language tag, posting code in objective-c

nsarray *viewcontrollers = [[self navigationcontroller] viewcontrollers]; for( int i=0;i<[viewcontrollers count];i++){     id obj=[viewcontrollers objectatindex:i];     if([obj iskindofclass:[yourviewcontroller class]]){        // view controller visited user , in stack     } } 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -