iOS Development Flashcards

1
Q

Core Data

A

allows us to take the objects we have created and save them into an internal database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

core data entity

A

The same as a class,

created in xcdatamodeld file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

ManagedObjectContext

A

acts as a bridge from app to database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Set initial view controller

A

View controller > Attributes > View Controller > Check off “Is initial View Controller”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

continue

A

tells our for loop to skip a value if

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

break

A

breaks out of a loop if a specific condition is met

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a Dictionary in swift?

A

An unordered collection of paired data. The paired data is commonly referred to as a key-value pair in which a key is a unique identifier for their associated value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What do you call a dictionary with no key-value pairs?

A

An Empty Dictionary

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what are if-let statements used for

A

To check if a real value exists inside of an optional. If the value exists, the optional will be unwrapped and assigned to a variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

the ___ operator has higher precedence over the ___ operator

A

&&, ||

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Instead of relying on the compiler to set operator precedence, we can do so ouselves with _____

A

Parentheses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

with regards to logical operators, in an ___ statement true takes priority over false but in a ___ statement false takes priority over true

A

||, &&

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The logical __ operator returnes true only when both operands are true, it returns false in all other cases.

A

&&

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The logical __ operator returns true when either operands are true. when both operands are false, the logical expression evaluates to false

A

||

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

The logical __ operator translates to NOT and negates a Boolean value

A

!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

inout

A
If you want a function to modify a parameter's value, you need to define the parameter as in-out parameter. You write an in-out parameter by placing the inout keyword right before a parameter's type. Behind the scenes, an in-out parameter has a value that is passed into the function, is modified by the function, and is passed back out of the function to replace the original value. Therefore the value passed in the function call cannot be a constant. You must declare it as a variable. The syntax of function with inout parameter is:
func funcname(parameterName:inout Type) -> Return Type {
    //statements
}
17
Q

What does swift “Control Flow” do?

A

It controls the flow of program execution. The term is used to describe the logic that dictates the execution path that is taken through the source code of an application as it runs.

18
Q

With regards to control flow what is “looping control”?

A

How often code is executed

19
Q

With regards to control flow what is “conditional control flow”?

A

Whether code is executed

20
Q

With regards to closure syntax, what does the “in” keyword indicate?

A

The start of the closure expression code.

21
Q

in reality functions are just named _____ expressions

A

closure

22
Q

In traditional computer science, what is a “closure” considered to be?

A

The combination of a self-contained block of code and one or more variables that exist in the context surrounding the code block.

23
Q

What data types are currently able to be used as keys in a Swift dictionary?

A

String, Int, Double, and Bool