ios - after dismissing View one subview hast different place -
hello have problem un/showing tableviewcontroller.
i have scrollview 4subviews (the lastly subview optionally, if button clicked or not). in optionally subview button. if button clicked new view tableview open. if click cell in tableview want go lastly view.
everything works fine, optionally view shown in middle of screen instead of lastly view on scrollview.
function show tableview:
- (void)categorybuttonclicked:(id)sender { [self presentviewcontroller:advancedsearchtableviewcontroller animated:yes completion:nil]; advancedsearchtableviewcontroller.sourceview = @"category";} function dismiss table view:
- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { [self dismissviewcontrolleranimated:yes completion:nil];}
use container view pattern , add together tableviewcontroller kid view controller. here reference: https://developer.apple.com/library/ios/featuredarticles/viewcontrollerpgforiphoneos/creatingcustomcontainerviewcontrollers/creatingcustomcontainerviewcontrollers.html
ios objective-c iphone uitableview presentviewcontroller
No comments:
Post a Comment