iOS Apprentice Flashcards
What happens when you press Run?
The compiler is the part of Xcode that converts your Swift source code into executable binary code
The complete set of frameworks for iOS is known collectively as?
Cocoa Touch
With what UIKit works to represente size on screen
Points
Three possible scope levels in Swift
Global scope: These objects exist for the duration of the app and are accessible from anywhere.
Instance scope: This is for variables such as currentValue. These objects are alive for as long as the object that owns them stays alive.”
“Local scope: Objects with a local scope, such as the slider parameter of sliderMoved(), only exist for the duration of that method. As soon as the execution of the program leaves this method, the local objects are no longer accessible.”
What is info.plist?
Info.plist is a configuration file inside the application bundle that tells iOS how the app will behave. It also describes certain characteristics of the app, such as the version number, that don’t really fit anywhere else.
What happens if you don’t add any constraints to your views?
In that case, Xcode will automatically add constraints when it builds the app.”
In order to allow Xcode to put an app on your iPhone?
the app must be digitally signed with your Development Certificate. A certificate is an electronic document that identifies you as an iOS application developer and is valid only for a specific amount of time.
Apps that you want to submit to the App Store must
be signed with the Distribution Certificate.
Xcode uses this to sign the app for use on your particular device (or devices)
Provisioning Profile
you need a provisioning profile or the app won’t go on your device.
What the difference is between the terms property and instance variable?
In Swift terminology, a property is a variable or constant that is used in the context of an object. That’s exactly what an instance variable is.
(In Objective-C, properties and instance variables are closely related but not quite the same thing. In Swift they are the same.)”
Cleaning code flow
When write code until it becomes messy and then you clean it up. After a little while it becomes a big mess again and you clean it up again.
NSRange vs. Range
NSRange is an Objective-C structure whereas Range is its Swift equivalent - they are similar, but not exactly the same. So, while an NSRange parameter is used by the UITextField (which internally, and historically, is Objective-C based) in its delegate method, in our Swift code, if we wanted to do any String operations, such as replacingCharacters, then we need a Range value instead. Swift methods generally use Range values and do not understand NSRange values, which is why we converted the NSRange value to a Swift-understandable Range value.
Segue flow in steps
Equal vs identical
If you use ==, you’re checking whether two variables have the same value.”
“With === you’re checking whether two variables refer to the exact same object.
UInt vs Int
The U stands for unsigned, meaning the data type can hold positive values only. It’s called unsigned because it cannot have a negative sign (-) in front of the number.