Giter Site home page Giter Site logo

Comments (5)

diego1199 avatar diego1199 commented on August 19, 2024

Have you try this:

UIImageView *headerView = //YOUR HEADER VIEW
UIButton *dismissButton = [[UIButton alloc]initWithFrame:CGRectMake(8, 20, 30, 30)]; [dismissButton setImage:[UIImage imageNamed:@"dismissIcon"] forState:UIControlStateNormal]; [dismissButton addTarget:self action:@selector(dismissView) forControlEvents:UIControlEventTouchUpInside]; [headerView addSubview:dismissButton];

from mxparallaxheader.

akkshay avatar akkshay commented on August 19, 2024

I tried the above solution and it didn't work. Anyone know if this issue has been resolved yet?

from mxparallaxheader.

Gantaios avatar Gantaios commented on August 19, 2024

Hi any Resolved the issue can you tell me the solution @akkshay @diego1199 @Jackson0111

from mxparallaxheader.

hongzhou85 avatar hongzhou85 commented on August 19, 2024

In the header view controller (parallax header), try store the reference to the scrollview, collectionview or tableview controller. When I set the gesture recognizer, make sure you target the "parent", the view which set the parallax header and have the gesture recognizer function in the "parent". That way the touch will be send to parent and it will work.

`let tapGestureRecognizer = UITapGestureRecognizer(target:self.parent!, action:#selector(ParentViewController.functionGesture(_:)))

headerButton.userInteractionEnabled = true
headerButton.addGestureRecognizer(tapGestureRecognizer)`

from mxparallaxheader.

maxep avatar maxep commented on August 19, 2024

You can refer to #36.

from mxparallaxheader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.