Interactive App Building Flashcards
Which of the following segues adds a new view to the navigation stack? Present Modally, Present as popover, Show
Show
TF: When we want to show a view, we add the view to the navigation stack
False
Why do we use a navigation stack rather than a modal view for our information flow?
A modal view is used to display temporary information
A modal view is used to draw the users attention and prevents them from taking any action unless the modal is dismissed.
A navigation stack is used to display hierarchical or organized data like our story.
How does a navigation controller object manage the currently displayed screens?
Using the navigation stack, which is represented by an array of view controllers
TF: You cannot interact with the navigation bar. It is entirely managed by the system.
False
TF: When we want to show a view, we add the view to the navigation stack?
False
TF: A tuple in swift is also known as an anonymous struct.
True
What’s the difference if we add an image like this -> UIImage(named: “Home”) as opposed to the pic with the name( can’t put it in here but the image comes up in xcode)?
if we return the image like this -> UIImage(named: “Home”) -> This an optional and must be force unwrapped.
If you have 2 functions with the same name, but different parameters for the function, what is this called?
Method overloading
Under the hood in Swift a tuple is just:
Struct without a name
An optional is a(n) ________ under the hood with a ______ and _________ case
Enum
Some
None
What is a selector?
A name used to select a method to execute for an object
Why do we set a view’s translatesAutoresizingMaskIntoConstraints property to false?
The system adds its own constraints to views which might conflict with ours
TF: We can only apply styles to the entire attributed string. It is not possible to style a particular section of a string.
False
Before we can add constraints to any views we create, which of the following tasks is required:
Adding the created view as a subview of the main view.