Giter VIP home page Giter VIP logo

distanceconverter's People

Contributors

craiggrummitt avatar

Stargazers

William Spanfelner avatar

Watchers

James Cloos avatar iOS App Development with Swift avatar

Forkers

tsmith60 yg37

distanceconverter's Issues

Comple error when following step 3

@IBAction func convertToMiles(_ sender: Any) {

In step 3 under "CONNECTING ACTIONS FROM CODE" you say:

You could also remove the @IBAction keyword from the convertToMiles()
method because this is called from code now, and isn’t connected to an event in
Interface Builder. If you forget to do this, don’t worry; it’s not strictly necessary.

But if you remove @IBAction you get the following compiler error:

[...]/DistanceConverter/DistanceConverter/ViewController.swift:25:45: Argument of '#selector' refers to instance method 'convertToMiles' that is not exposed to Objective-C
[...]/DistanceConverter/DistanceConverter/ViewController.swift:35:10: Add '@objc' to expose this instance method to Objective-C

If you use the fix button and to add @objc it works again. Not sure if that's worth mentioning in there? Or If I've just set things up wrong somewhere.

I'm enjoying the book, thanks!

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.