Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.93 KB

Swift.md

File metadata and controls

38 lines (27 loc) · 1.93 KB

Swift

Calculate the value of a number raised to a power.

https://iswift.org/cookbook/calculate-power-of-a-number

Code block highlighting

Double-clicking on a curly bracket in Xcode 10 highlights the affected block of code. Cool!

Rounding numbers and manipulating data types

Discovered the rounded() instance method today (https://developer.apple.com/documentation/swift/floatingpoint/2295900-rounded#discussion) and how creating a constant can allow the casting of data types more easily.

var numberOfBottles = totalVolume / volumeEachBottles numberOfBottles.rounded(.up) or numberOfBottles.rounded(.down)

Why "override func"? Overriding declaration requires an 'override' keyword. -

Answer: https://docs.swift.org/swift-book/LanguageGuide/Inheritance.html#//apple_ref/doc/uid/TP40014097-CH17-ID196

Xcode Intellisence - explained

Ever wondered what those funny symbols mean? https://stackoverflow.com/questions/6662395/xcode-intellisense-meaning-of-letters-in-colored-boxes-like-f-t-c-m-p-c-k-etc

JSON Editor

Courtesy of #LondonAppBrewer this little gem of a link will bring clarity to the JSON objects you work with. http://jsoneditoronline.org/

Swift development tutorial

https://developer.apple.com/library/archive/referencelibrary/GettingStarted/DevelopiOSAppsSwift/

Apple developer archive

https://developer.apple.com/library/archive/navigation/

Side-load with WiFi

How cool is that?! You can now side-load apps with WiFi! No more cables. Wa Hoo! @LondonAppBrewer #100DaysOfCode First connect the iPhone & computer with the lightning cable. Then in Simulator menu go to Hardware > Device > Manage Devices... then Tick Connect via Network. Do disconnect the cable from the iPhone and commence side-loading.

SQL-lite

Just installed Datum Free (https://itunes.apple.com/gb/app/datum-free/id901631046?mt=12 …) to get a view into SQL lite data in the ToDoey App exercise (& all that CRUD 😉) with @LondonAppBrewer #100DaysOfCode