Introduction & Assumptions about you Today I’d like to give you a tutorial on using Swift 3. I assume the following is true about you: *** You are a beginner to Swift (or even programming in general) *** You have a
Sometimes you want to execute some code in Swift 3 whenever a variable changes its value. And perhaps you’ve done this previously by creating a function that you call whenever it makes sense in your code. However, there’s a MUCH
The iOS map view is incredibly easy to implement and use. Let’s discover how to show our location with Apples own maps embedded into an iOS and Swift app. How to Use an iOS Map View 1. Drop an MKMapView into the
This one’s really quick and simple! First create a timer (at class level probably, so it doesn’t go out of scope):
var timer = Timer()
Then inside whatever function you need:
self.timer = Timer.scheduledTimer(
timeInterval: 1.0, //in seconds
target: self, //where you'll find the selector (next argument)
selector: #selector(MyClass.Tick), //MyClass is the current class
userInfo: nil, //no idea what this is, Apple, help?
repeats: true) //keep going!
Follow it by creating the ‘Tick’ selector specified in the above