stoprocent/VGParallaxHeader

Unrecognized selector sent to instance when using StoryBoard

Closed this issue · 3 comments

Hello,

I'm using the Storyboard feature but I'm getting this error

  1. I added the view to the table and change the class to VGParallaxHeader

  2. On my viewDidLoad: [self.tableView setParallaxHeaderView:self.parallaxHeader mode:VGParallaxHeaderModeFill // For more modes have a look in UIScrollView+VGParallaxHeader.h height:200 shadowBehaviour:VGParallaxHeaderShadowBehaviourDisappearing]; // For more behaviours have a look in UIScrollView+VGParallaxHeader.h

  3. Added also as a method - (void)scrollViewDidScroll:(UIScrollView *)scrollView { [self.tableView shouldPositionParallaxHeader]; NSLog(@"Progress: %f", scrollView.parallaxHeader.progress); }

    -[VGParallaxHeader autoPinEdgeToSuperviewEdge:withInset:]: unrecognized selector sent to instance 0x7f8719c7a1b0 2014-10-16 20:08:42.638 Rave[1697:31290] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[VGParallaxHeader autoPinEdgeToSuperviewEdge:withInset:]: unrecognized selector sent to instance 0x7f8719c7a1b0'

Please advice.

Clarification : Getting the same error using the example with Table 1. (Using a XIB)

Hi

There is a comment inside initWithCoder method that storyboarda are not yet supported.
Also if using storyboard header view you should not use setParallaxHeaderView inside viewDidLoad.

I will try to add Storyboard support this week. Have a look around example project to understand what is the correct way of adding parallax header.

I will also write more docs to explain better.

Yo, did you install it via CocoaPods? Sorry that day i was replying i had a terrible hangover :)
"autoPinEdgeToSuperviewEdge" is a method from PureLayout library. It's one of dependencies in podspec :)