Advertisement
Guest User

Untitled

a guest
Sep 13th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
  2.  
  3. self.overlay = [[UIVisualEffectView alloc] init];
  4. [self.overlay setFrame:[[UIScreen mainScreen] bounds]];
  5.  
  6. CGRect newFrame = [self convertRect:self.bounds toView:self.overlay];
  7. NSLog(@"newFrame.origin.x: %f", newFrame.origin.x);
  8. NSLog(@"newFrame.origin.y: %f", newFrame.origin.y);
  9. self.frame = newFrame;
  10. NSLog(@"self.frame: %f", self.frame.origin.x);
  11. NSLog(@"self.frame: %f", self.frame.origin.y);
  12. [self.overlay.contentView addSubview:self];
  13. NSLog(@"self.frame: %f", self.frame.origin.x);
  14. NSLog(@"self.frame: %f", self.frame.origin.y);
  15. self.frame = newFrame;
  16.  
  17. [self.overlay.contentView addSubview:self.dropdown];
  18.  
  19. [[[UIApplication sharedApplication] keyWindow] addSubview:self.overlay];
  20. [UIView animateWithDuration:0.4 animations:^{
  21. self.overlay.effect = blurEffect;
  22. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement