objective c - How to go from a view to another view controller (iphone) -


i have table view in view controller (view based application), once user selects 1 of cells should load view.. tried navigation controller thing resulted in huge failure along 5-6 hours wasted (it crashes when try pushviewcontroller onto nav. controller). there anyway move 1 view controller other? keeping in mind need send on selected cell (a string)

thanks

edit:for curious, created project navigation based application. working now.

thanks help.

you want implement uitableview delegate method didselectrowatindex. here's example:

- (void)tableview:(uitableview *)atableview didselectrowatindexpath:(nsindexpath *)indexpath {         detailviewcontroller *detailviewcontroller = [[detailviewcontroller alloc] init];         [detailviewcontroller setdata:[tableviewdata objectatindex:[indexpath row]]];         [[self navigationcontroller] pushviewcontroller:detailviewcontroller animated:yes];              [detailviewcontroller release]; } 

in detailviewcontroller.m file, once you're finished it, use

[self dismissmodalviewcontrolleranimated:yes]; 

to pop off stack.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -