ios - Dismiss UIview form the popup IOS7 -


In my application I'm displaying UIView as a popup when the user is now on the button The problem is that when you click somewhere in the application, please tell me how to dismiss UIView popup.

Here's the code for the user to popup.

  - (zero) showPopView {self.popview.alpha = 1; [Self. POPView Setframe: CGRactMake (15, 100, 300, 300)]; // [self-rejecting papermeer: ​​not]; }   

Popup button code.

  - (IBAction) click: (ID) sender {[self showpiece View1]; }   

in viewDidLoad I have used this code.

  self.popview.alpha = 0;   

The above code I used to display as UIView as a popup, please tell that when users click out to dismiss the popup .

Thank you.

What will I do that adds a tactile overlay behind your popup.

In your .h

  @interface yourController: UIViewController {UIView * overlay; }   

Loaded in your view

  overlay = [[UIView alloc] initWithFrame: self.view.frame]; Overlay.bakcgroundColor = [UIColor clear collar]; UITapGestureRecognizer * singleFingerTap = [[UITapGestureRecognizer alloc] initWithTarget: Self Action: @Selector (HandtingTalap)]; [Overlay addEngistizer: singleFingerTap];   

And then you will look like your ways:

  - Showpop view ({self.view addSubview: overlay}; Self.popview.alpha = 1; [Self. POPView Setframe: CGRactMake (15, 100, 300, 300)]; // [self-rejecting papermeer: ​​not]; } - (Zero) HandlingTap {{Overlay RemovalFrowspaceview]; self.popview.alpha = 0; [Self ..popview setframe: cgttezeiro]; }    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -