3. Story Boards
Storyboards are the user interface elements of an App
n modern versions of Xcode this is integrated in the program.
4. Story Boards Explained
edit the file / element your working on. The Bottom allows you to choose
Choose the View Controller
Class that is associated
with this view (MVC)
Choose objects to add to a view such as
UITextField, UIButton or objects such
as a new View.
5. Delegation
behalf of, or in coordination with, another object when that obje
must fulfil some obligations (delegate methods) usually decla
Examples:
AppDelegate
UITableViewDelegate
6. Table Views
One of the most commonly used elements is UITable View
Two of Types of UI Table View
Plain Grouped
7. Table Views
A Table View consists of many parts all of which are
able to be customised.
Table View
Section
Section Header
with Label
Table View Cell
with Label
8. Table Views
Apple has created a controller for a UITableView
Called UITableViewController and if you subclass it
in your View Controller then it will set this stuff up for you.
Header file (.h)
Subclass UITableViewController
Declare the Delegate and Datasource Protocols
Implementation file (.m)
UITableView
Delegate Methods
13. Navigation Controller
By using the navigation controller iOS creates a container and then
automatically creates the bar at the top with the back button allowing users
to easily navigate. There is also a lot of performance enhancements behind
the scenes too.
To create a navigation stack you can easily do that in the storyboard.
Demo Linking Nav Controller
14. Persistence
In iOS there are a range of ways to persist data on and off the device.
On Device
• NSUserDefaults (max 300kb) - This is for small amounts of data, usually used for
saving settings / User data in apps
• Plist / Disk - This is for slightly larger data and doesn't really have a limit but can be
low on performance. Mainly used for media on disk.
• Core Data - This is the most common way for storing data and is the iOS internal DB.
It runs on a NO-SQL basis.
• SQL Lite - This is another option for a DB and uses SQL.
Off Device
• Web Service - Third party API’s allow you to easily store data off device and usually
charge based on concurrent requests to the server. Some examples are below.
1. AWS
2. Parse
3. Other 3rd Party
15. Persistence
File System: Property Lists
- NSArray and NSDictionary can do this
- Can only save supported “plist” types - - NSString
- - NSNumber
- - NSDate
- - NSData
17. Blocks and Multi Threading
One of the main ways in which computers since the 90’s have dealt with
multiple processes is Multi Threading
Multi Threading means that you can run multiple concurrent processes
separately on whats called threads.
Number 1 rule is that all UI should be called on the main thread.
Why use Threads? One use is so that if were pulling data over the network
then we don’t block the UI of the app. If we do it will give a bad experience
and make our user think the app has crashed.
18. Blocks and Multi Threading
To use threads on iOS we use something called Blocks. Blocks are very
common is iOS since the release of iOS 5.
Blocks
Further info on blocks - http://www.raywenderlich.com/9438/how-to-use-blocks-in-ios-5-tutorial-part-2
What is a block?
- a block of code (i.e a sequence of statements inside {}).
Usually included “in-line” with the calling of a method that is going to
use that block of code.
Example of Block
19. Blocks and Multi Threading
To dispatch a task to a different Thread we use a C API called ‘Grand
Central Dispatch’ (GCD).
23. Frameworks and Coca Pods
Frameworks in iOS are collections of code that allow apps to
Examples of Apple Frameworks:
Mapkit
Core Audio
Core Animation
Examples of 3rd Party Frameworks:
Stripe
Facebook
Parse
Twitter
24. Testing Your App
e simulator then simply build and run and in Xcode and it will la
d to be enrolled in the Apple Developer Program and then gen
25. Instruments and Other Apps
applications that can be used to find where issues lie in your a