I have a class managing the transiction between two views.
In the first view I have a table of chapter and in the second the text of each chapter. Now as my sqLite table is chapter(id,title,text) I'd like to pass to the second view the id of the clicked chapter in order to query the table in the second view and sort the right text of chapter.
Ther's my code:
void GoToView( UIViewController *from, UIViewController *to){
/*
* Preparo l'animazione e aggiungo la subview.
*/
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:from.view cache:YES];
[from.view addSubview:to.view];
[UIView commitAnimations];
}
How can I pass "1" for example if I click on "Chapter One"?
I am not sure the following is what you want. But I guess this may help you.
Create a
@property
in you view controllerto
, like,Pass the chapter number to the view controller
to
while you callGoToView
method.In you view controller
to
, either inloadView
ofviewWillAppear
method whichever suites you, do the reloading of the table.