PDA

View Full Version : release view from NavViewController




Nnavick
Apr 18, 2011, 05:37 AM
Hi,

When a tableView cell is selected i did

[naccontroller pushViewController:newView animated:YES];

and when the newView's viewDidLoad method lunching I did
NsLog(@"Bla");

but it's happening only one time at runtime,

When I clicked on the back button and did
[self.navigationController popViewControllerAnimated:YES];

the view disappear but when I click again on the cell and the newView popup again ,
the "viewDidLoad,viewWillAppear or the viewDidAppear method don't work
even I did on the dealoc method
self.view release;

what is the problem?

thanks

EDIT:

I solved it,
When the back button is hit I changed the view property to nil :)



jnoxx
Apr 18, 2011, 08:21 AM
You know what the problem is.
Viewdidload and viewwillappear :)
Viewdidload will only launch once in a navigation, because it gets added on the stack.
A viewwillappear will show up each time, without setting properties to nil ;)

- (void) viewWillAppear:(BOOL)animated {
}