iphone - modalViewController delegate callbacks - HowTo? -



iphone - modalViewController delegate callbacks - HowTo? -

i have view controller, , when click button create modalview (wrapped uinavigationcontroller) , nowadays it.

dscviewcontroller *enterdescription = [[[dscviewcontroller alloc] init] autorelease]; uinavigationcontroller* navcontroller = [[uinavigationcontroller alloc] initwithrootviewcontroller:enterdescription]; [self presentmodalviewcontroller:navcontroller animated:yes]; [navcontroller release];

the question is, how create (parent)view controller delegate, , when click on button @ modalviewcontroller (done example) phone call method in parent viewcontroller dismiss modal , savings modal input?

i don't think it's practice create 1 controller blame parent controller work should handel. can utilize self.parentviewcontroller dismiss modal in.

if reason handle storage in parentviewcontroller can point done button action method in current viewcontroller , utilize self.parentviewcontroller trigger parent method storage.

or set buttons delegate straight self.parentviewcontroller

[button addtarget:self.parentviewcontroller action:@selector(somemethodinparentviewcontroller) forcontrolevents:uicontroleventtouchupinside];

iphone objective-c ios uiviewcontroller modalviewcontroller

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -