ios - How can I present a UIViewController modally showing presented Controller in the Blured Background? -


having uiviewcontroller1 , uiviewcontroller2 want present uiviewcontroller2 in uiviewcontroller1 modally. can with:

self.presentviewcontroller:animated:completion 

what want present uiviewcontroller2 such has size: 100x100 , positioned in center of screen popup. when uiviewcontroller2 present surrounding of uiviewcontroller2 should show kind of glass layer can see uiviewcontroller1 blurred.

how can that?

add uiview2 100x100 in uiviewcontroller

.m

@property (weak, nonatomic) iboutlet uiview *view2; 

.h

- (void)viewdidload  {     [super viewdidload];      self.view2.hidden = yes; } 

call view2 button or code:

[self showview2]; 

and show it:

-(void) showview2 {     self.view2.hidden = no;       self.view.opaque = no;     self.view.alpha = 0.5;     self.view.backgroundcolor = [uicolor colorwithwhite:0.3 alpha:1]; } 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -