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