Skip to content

Website tutorial issues: access modifiers, completion observers, swift 4 #688

Open
@andrewDworschak

Description

@andrewDworschak

addCompletionObserver warning: probably something it doesn't like about C4's implementation
screen shot 2017-09-15 at 4 24 58 pm

Hack a UI switch errors:
When importing the "hack a UI switch" tutorial files, there are a number of errors.
Access modifier error that SwitchThumb cannot inherit from Circle because Circle is public, not open. Can be fixed by changing Circle class to open, but I suspect there are many such issues in the framework (ellipse is also a public class, but shape is open)
addTarget method needs to be changed to the following:
self.addTarget(self, action:#selector(toggle), for: UIControlEvents.valueChanged)
toggle function needs to be exposed to objective-C -> @objc func toggle() { ... }

Swift 4 is out, and Xcode wants to upgrade it. There are ~8 warnings from not upgrading, but once it is upgraded, there will likely be more warnings/errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions