Ekhoo / Device

Light weight tool for detecting the current device and screen size written in swift.
MIT License
1.7k stars 202 forks source link

Conversion to Swift 4 and generally more modern syntax #58

Closed thebluepotato closed 6 years ago

thebluepotato commented 7 years ago

Hi there! I’ve run the conversation to Swift 4 command and only one thing changes (the parenthesis disappeared for NSScreen.main). Mostly, I’ve changed the static public or open funds to vars, since it makes more sense syntactically. We’re accessing device properties so it makes sense to have them be properties of the Device object too! These are some very minor changes but nonetheless source-breaking (people will only need to remove the ()).

Please tell me what you think!

Jonas

EDIT: oh my, I've just seen that #57 has the same starting point... The changes are the same as my PR, with the nuance that on one line mine is more concise and I also bring the syntax change from funcs to vars.