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
Post a Comment