FlatButton
FlatButton copied to clipboard
how to use in swift 4.0 ?
can not use in swift 4.0 When's the new version?
Add the dependency in CocoaPods and then change the Swift version just for the FlatButton target (config.build_settings['SWIFT_VERSION'] = '3.4'
).
I successfully got it to work on Swift 4.2:
Steps I did:
replace NSOnState
with .on
replace NSOffState
with .off
in this Line specify the variable to:
let nextState: NSControl.StateValue = isOn ? .on : .off
For all other changes, Xcode will give you the right suggestion anyway.
The when building, at least for me, Xcode showed an error in the buildscript:
What you need to do is go to the affected script (framework.sh)
And change one Line:
EXPANDED_CODE_SIGN_IDENTITY
to EXPANDED_CODE_SIGN_IDENTITY:-
See this Link