Giter Club home page Giter Club logo

Comments (4)

nameleast2 avatar nameleast2 commented on September 15, 2024

How do you remove it by using the pod?

from paycards_ios.

bashirsk avatar bashirsk commented on September 15, 2024

You can't

from paycards_ios.

andi357 avatar andi357 commented on September 15, 2024

Sure you can easily do that by just iterating over the containers subviews (recursively) and finding the first UIButton occurrence. This can then simply be removed. For example like that:

recognizerContainer.findFirstSubview(ofType: UIButton.self)?.removeFromSuperview()

To get it short like that you need that simple UIView extension which is useful anyway:

extension UIView {

    func findFirstSubview<T: UIView>(ofType: T.Type) -> T? {
        return recursiveSubviews.first(where: { $0 is T }) as? T
    }

    var recursiveSubviews: [UIView] {
        return subviews + subviews.flatMap { $0.recursiveSubviews }
    }
}

Make sure to call this after the preview has been initialized, with recognizer.startCamera().

from paycards_ios.

bashirsk avatar bashirsk commented on September 15, 2024

Thanks

from paycards_ios.

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.