Day-6 Flashcards
Auto Layout Programmatically
Less conflicts with Storyboards :)
1) Delete Main.storyboard
2) Delete Main.storyboard reference in project’s settings
3) Override loadView
4) Instantiate UIWindow
5) Set rootViewController
6) Make the window the keyWindow and Visible
LoadView is where we need to place the custom View.
VFL Visual Format Language
set the Auto constraints to false to prevent collisions/conflicts
VFL method provides us with an array
managedObjectModel (aka MOM)
Describes a Core Data database schema: Entities (objects), Attributes (object properties), Relationships, Validation (e.g. regex for email address), Storage rules (e.g. separate file for binary data)
Entities (Core Data)
Are simply the pieces/objects that store data.
Attributes (Core Data)
- For integers, you will see 3 types based on how many bits it uses: int16 :-32768 to 32767, int32 : -2147483648 to 2147483648, int64: -9223372036854775808 to 9223372036854775808
- Double and Float for numbers with decimals
- Decimal for currency
- Binary Data for for saving instances of NSData
Relationships
- If the destination object is a single entity, its considered a to-one relationship
- If there may be more than one object, then its a called a to-many relationship
- Relationships can be optional or required
Slideshow
https://www.icloud.com/keynote/0KF1EHcCYjQlGj3VBCWdoyJaQ#Week8_Day1
Core data belongs to which parent class?
NSManagedObject
NS Fetched Results Controller
Add extra results to our object. We can add sections to each part of our app. Like the example from Lab: Hotel’s name and the rooms individually in sections.