C4iOS icon indicating copy to clipboard operation
C4iOS copied to clipboard

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

Open andrewDworschak opened this issue 8 years ago • 0 comments

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.

andrewDworschak avatar Sep 15 '17 23:09 andrewDworschak