DKLiveBlur icon indicating copy to clipboard operation
DKLiveBlur copied to clipboard

EXC_BAD_ACCESS using ScrollViews

Open nicorsm opened this issue 11 years ago • 2 comments

Hi, How can I use DKLiveBlur with UIScrollViews? I've downloaded it from Cocoapods and I'm using it:


- (void)viewDidLoad
{
    [super viewDidLoad];

    [self buildUI]; //Here I insert graphical elements into UIScrollView - inserted in the UIView via xib

    DKLiveBlurView *backgroundView = [[DKLiveBlurView alloc] initWithFrame:self.scrollView.frame]; 

    backgroundView.originalImage = [UIImage imageNamed:@"Mountain Range.jpg"];
    backgroundView.contentMode = UIViewContentModeScaleAspectFill;
    backgroundView.tableView = self.scrollView;
    backgroundView.isGlassEffectOn = YES;

    // Do any additional setup after loading the view from its nib.
}


The view opens without the image I've set, and when I try to scroll down the view, an EXC_BAD_ACCESS is thrown. Where I'm wrong? Ty

Nicola

(ps: excellent library!)

nicorsm avatar Jan 28 '14 23:01 nicorsm

Hi Nicola,

  1. Have you seen my demo app?
  2. background view needs to be initialized with self.scrollview.bounds not frame
  3. did you add backgroundView to your main view or scrollview?

Hope this will be helpful.

kronik avatar Jan 29 '14 01:01 kronik

I forgot adding backgroundView to the main view :| Thanks!!

On 29 Jan 2014, at 02:24, Dmitry Klimkin [email protected] wrote:

Hi Nicola,

Have you seen my demo app? background view needs to be initialized with self.scrollview.bounds not frame did you add backgroundView to your main view or scrollview? Hope this will be helpful.

— Reply to this email directly or view it on GitHub.

nicorsm avatar Jan 29 '14 09:01 nicorsm