Hi all.
In my iPhone app, i am having a viewcontroller with a UITableview, whenever user select a row, i create an instance of same class, push that viewcontroller, but this time the table is loaded with new pair of data
If i am giving like this, if i click back button anytime, its calling the release of the dealloc of that viewController.
Is this approach is fine?
I didnt find any such approach in sample codes..
In my iPhone app, i am having a viewcontroller with a UITableview, whenever user select a row, i create an instance of same class, push that viewcontroller, but this time the table is loaded with new pair of data
Code:
in my [I]customViewController [/I]class if user select a row in the [I]myCustomTableView[/I] , i do the following...
// FILE: customViewController.m
if( isNextViewIsTableView)
{
customViewController *customViewObj = [[customViewController alloc]init];
customViewObj.itemArrayToReloadTable = ............ //assign a array
[[self navigationController]pushViewController: customViewObj animated:YES];
[customViewObj relelase];
}
// end of hierarchy view, navigation reached leaf node
else if( isNextViewIsProductView)
{
productView *productViewObj = [[productView alloc]init];
productView.textForLabel = ......//assign some string
prodyuctView.textForNextlabel = ....... //assign some string
[[self navigationController]pushViewController: productViewObj animated:YES];
[productViewObj relelase];
}
If i am giving like this, if i click back button anytime, its calling the release of the dealloc of that viewController.
Is this approach is fine?
I didnt find any such approach in sample codes..