iphone - calling [self removeFromSuperview]; from subview doesnot give back control to parent view -
i have created custom popup view using ui view.this popupview contains button , image.
my parent view (with controller) contains button.on button click, adding popup view subview(see below) -
[self.view addsubview:popup]; in popup view have handled click of button below -
- (ibaction)taphabitaturebutton:(id)sender { [self removefromsuperview]; } so on click of popup button,i close popup.
after popup close can see parent view. parent view no longer interacts events.
please me solution.
use [popup removefromsuperview ] instead of [self removefromsuperview]
well here providing need 1. make instance of popup view suppose popup *view = [popup alloc]init]; or create via iboutlet add doing while removing popup (uiview) take advantage of delegate create protocol in popup class inherits uiview , implement in superview
then use in function [popup removefromsuperview ] means remove popup instance superview, need that.
Comments
Post a Comment