XAM1 - IOS Flashcards

1
Q

What is AppDelegate?

A
  • where you can override system events
  • loaded by Main.cs which normally isn’t touched
  • inherits from UIApplicationDelegate
  • FinishedLaunching kicks off first view
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does iOS page structure look like?

A
  • starts with UIWindow with a single UIView then hierarchical structure of children
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is First Responder?

A
  • the control that handles a Touch Event
  • buttons and labels are not eligible to be First Responder
  • making keyboard go away on an event call ResignFirstResponder
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Touch events in iOS are handled through what?

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

What happens when iOS starts getting low on memory?

A
  • a DidReceiveMemoryWarning

- if received need to start cleaning up memory and killing caches that can be recreated

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

What is the order of View events?

A
  • LoadView
  • ViewDidLoad
  • ViewWillAppear
  • ViewDidAppear
  • ViewWillDisappear
  • ViewDidDisappear
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What do you use in iOS for positioning?

A
  • Set positioning with Frame using CGRect

- use Bounds to get positioning of elements

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

What do you use in code to add Views to screen?

A
  • AddSubView or AddSubViews
  • adds to array
  • order does matter
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

In iOS what does everything visual build off of?

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

Where do you set the main storyboard?

A
  • info.plist

- under Main Interface

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

What is naming convention for iOS ViewController?

A
  • [ClassName]ViewController
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

If manually creating a ViewController cs file what do you need to be sure is added?

A
  • Register attribute to designer file
  • [Register (“DetailViewController”)]
  • registers that class with iOS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is required on iOS ViewController?

A
  • custom constructor is required and must always be added

- public MyViewController (IntPtr handle) : base (handle) {}

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

What does iOS use to map controls to properties in VC class?

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

How do UI Views send events to VC?

A
  • using Action / IBAction
  • pub/sub kind of thing
  • event handlers always use “partial” keyword
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you add a new VC using designer?

A
  • just drag new ViewController on to designer

- must set ViewController class and StoryboardID (same)

17
Q

How do you open a new view over existing view from VC?

A
  • this.PresentViewController
18
Q

How do you remove view?

A
  • this.DismissViewController
19
Q

How do you change transition of opening new view?

A
  • in calling VC set this.ModalTransitionStyle = UIModalTransitionStyle.whatever
20
Q

What is segue?

A
  • set transitions to other views in designer
  • starter segue only one per storyboard
  • use PerformSegue in code