Code Monkey home page Code Monkey logo

Comments (4)

batuhansk avatar batuhansk commented on July 23, 2024

Look at my repository for LLSimpleCamera on Swift.

On Friday, 12 February 2016, Kevin Nguy [email protected] wrote:

Does anyone know how to set onError on Swift? I know in Objective-C, you
can do:

[self.camera setOnError:^(LLSimpleCamera *camera, NSError *error) {
// Something
}];

but on Swift, I don't have access to setOnError. I tried doing:

self.camera.onError = ({(camera : LLSimpleCamera!, error : NSError!) -> Void! in
// Something
})

but I would get an error. I just started working with Swift so this might
be a syntax issue. Thanks for the great library and for the help!

โ€”
Reply to this email directly or view it on GitHub
#82.

from llsimplecamera.

kevinnguy avatar kevinnguy commented on July 23, 2024

Thanks for the help @strawb3rryx7 ! Been learning Swift and so far, so good!

from llsimplecamera.

kevinnguy avatar kevinnguy commented on July 23, 2024

This is how it can be done on Swift:

self.camera.onError = {(camera, error) -> Void in
    // Something
}

from llsimplecamera.

batuhansk avatar batuhansk commented on July 23, 2024

Keep coding mate! ๐Ÿ‘๐Ÿผ

from llsimplecamera.

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.