Summary: Swift
- This + 400k other summaries
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding
Read the summary and the most important questions on swift
-
applying mvc
This is a preview. There are 27 more flashcards available for chapter 12/02/2015
Show more cards here -
When you pass something other than a class to a function, what happens?
The "something" get's copied. When a class is copied i gets a reference -
Are arrays and dictionaries classes?
NO, structs -
Whats the difference between a struct and a class?
1. structs are passed by value, classes by reference
2. classes can have inheritance, structs cannot -
Are all non class passed vars to functions read-only by default?
YES, type var for them if you want to edit hem -
How doe you "get" values out of an enum?
With an enum -
How do you create a constant syntacticly in swift
By using the keyword "let" -
Does your program crash when you try to access a non existing element in an array?
YES -
how do you define a Dictionary
var myDict = Dictionary<String, Int>() //or
var myDict = [String"Int]() //or
var myDict: [String:Int] = [:] -
Is Range a struct?
Yes -
What is a range
Just two points of a sensible type. For i.e. an array a "sensible type" is an Int
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding