1

I am creating one custom uiview control that looks like alert view. I have user RKRichtexteditor on my custom control. I can not add my view inside alert control because alert control size is fixed.

My question is

when I have pressed button my custom view will shows just like alert view. I have done with using blur effect, I have facing one problem. My problem is my tab bar is not blur.

Image

enter image description here

Code is
=======
self.view.backgroundColor = [UIColor clearColor];

    self.blureEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
    self.visualEffectView = [[UIVisualEffectView alloc] initWithEffect:self.blureEffect];
    self.visualEffectView.frame = self.view.bounds;
    self.visualEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

    [self.view addSubview:self.visualEffectView];

How to blur my tab bar when my custom control is open. please help me guys or give me any link.

Thank you in advance.

Hardik1344
  • 2,917
  • 2
  • 15
  • 31
  • Possible duplicate of [Custom view which looks like UIAlertView](http://stackoverflow.com/questions/19118919/custom-view-which-looks-like-uialertview) – Marek R Apr 19 '17 at 14:01
  • But do not want to use UIAlert view that was my condition. – Hardik1344 Apr 19 '17 at 14:08
  • currently `UIAlertView` is deprecated (so you can't use it anyway) and `UIAlertController` suppose to be used. There is no way to do extensive customization of `UIAlertController`. – Marek R Apr 19 '17 at 14:59
  • Please kindly request you to read question again,I do not want to use Uialert view or UIAlertControlller For my specific requirement thank you – Hardik1344 Apr 20 '17 at 02:00

1 Answers1

2

Use this.

    self.blureEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
    self.visualEffectView = [[UIVisualEffectView alloc] initWithEffect:self.blureEffect];
    self.visualEffectView.frame = self.view.bounds;
    self.visualEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

    [[[UIApplication sharedApplication] keyWindow] addSubview:self.visualEffectView];
Sargis
  • 1,196
  • 1
  • 18
  • 31