Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Xamarin Mobile Application Development for iOS
Table of Contents
Xamarin Mobile Application Development for iOS
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Installing the Xamarin Product Range for Android and iOS
Installing Xamarin.iOS and Xamarin.Android
Downloading the software
Installing the software
Enabling Visual Studio to build and run iOS applications
On the Mac
On the PC
Installing additional code for Android development
For iOS users
Summary
2. The User Interface
Creating the User Interface with Xcode
Screen origins and sizes
MonoTouch.Dialog (MT.D)
Changing the keyboard type
Using ShouldReturn
Using ResignFirstResponder
Adding a toolbar to the keyboard
For an MT.D
For a standard UITextField
Creating your own Pickers on MT.D
UITableView and UITableViewCell
Colors, buttons, and labels
Ensuring you have the correct size bounding boxes
UIColor
UIButton
UIControlStates
Summary
3. Views and Layouts
Selection of the project type
Application types and their view types
The iOS layout
The Canvas model
How to avoid some of these problems
Views and View Controllers
Other Views
Activity Indicator and Progress View
UIImageView
UICollectionView
Cells
Supplementary Views
Decoration View
Data source
Cell Reuse
UIWebView
MapView
UIScrollView
AdBannerView
Implementing a view with multiple View Controllers
Summary
4. Controllers
UITableView and UITableViewCell
Creating a read-only table
UITableViewCell
Reusable cells within a table
Sections and Rows
Indexes on a TableView
Navigation with UITableView
Within code
With Xcode
Navigation using UITableView
Returning to the RootView
TabBars
Handling the Tab Bar in code
PageControl
GLKit
Summary
5. UI Controls
Controls and widgets
UI Controls
Control selection
UIButton
UIStepper
The other controls
Comparing Android to iOS UI controls
Summary
6. Events
Handling events
Delegates
Attaching an event to multiple controls
Synchronous versus asynchronous event handling
Synchronous walk
Asynchronous walk
In a programming context
Events and controls reference
Other significant control events
AVAudioPlayer and AVRecordClass
AVAudioSession
ABAddressBook
ABNewPersonViewController
ABPeoplePickerNavigationController
ABPersonViewController
ABUnknownPersonViewController
AudioConverter
AudioSession
InputAudioQueue
OutputAudioQueue
AUGraph and AudioUnit
AudioConverter
CAAnimation
CBCentralManager
CBPeripheral
CBPeripheralManager
CFSocket
CFStream
CLLocationManager
MidiClient
MidiEndpoint and MidiPort
Monotouch.Dialog
BadgeElement, BaseBooleanImageElement, GlassButton, LoadMoreElement, MessageElement, and StringElement
BoolElement
DateTimeElement
DialogViewController
EntryElement
StyledStringElement
EKCalendarChooser
EKEventEditViewController and EKEventViewController
EAAccessory
The NS classes
NSCache
NSKeyedArchiver
NSKeyedUnarchiver
NSNetService
NSNetServiceBrowser
NSStream
GLKView
GK classes
GKAchievementViewController, GKFriendRequestComposeViewController, and GKLeaderboardViewController
GKGameCenterViewController
GKMatch
GKMatchmakerViewController
GKSession
MKMapView
MPMediaPickerController
MFMailComposeViewController and MFMessageComposeViewController
PKAddPassesViewController
QLPreviewController
SK classes
SKProductsRequest
SKRequest
SKStoreProductViewController
UIClasses
UIAccelerometer
UIActionSheet and UIAlertView
UIButtonBarItem
UIImagePickerController
UIPageViewController
UIPopoverController
UIPrintInteractionController
UIScrollView
UISearchBar
UISplitViewController
UITabBar
UITabBarController
UITextField
UITextView
UIView
UIWebView
Ad classes
AdBannerView
AdInterstitialAd
OpenTK
IGameWindow
IPhoneOSGameView
Summary
7. Gestures
Gestures
Gesture code
Types
Adding a gesture in code
Continuous types
Other UIGestureRecognizerState values
Handling drag-and-drop
Summary
8. Threading
Threading Concepts
The main UI thread
Deadlocking
Avoiding deadlocks for synchronized accessors
Starting a new thread from the main UI thread
Using locks
The AppDelegate class
Summary
9. Threading Tasks
A brief introduction to threading
Using background threading within your app
BackgroundWorker
ThreadPool.QueueUserWorkItem
Using System.Threading.Tasks
Problems while using Tasks on threads
Using Asynchronous code
Tasks and EventHandlers
A more practical example
Summary
10. Animation
Handling bitmaps
Scaling the image
Rotating the image – Part 1
Underpinning bindings
Analysis of the code
Freeing memory after use
Rotating the image – Part 2
Summary
11. Handling Data
Using SQLite
Installing and setting up SQLite
Database basics
A simple database class
Create a connection to the database
Setting up an SQLite helper class
Writing helper class methods
Adding data to the database
Data manipulation using LINQ
LINQ – a whistle-stop tour
SELECT and WHERE in LINQ – a common cause of confusion
Using Select in LINQ
Replacing SQL with LINQ
Summary
12. Peripherals
Using the camera
Accessing the camera (Xamarin.Mobile)
Accessing the camera (Native)
Saving to the Photo album (Native)
GPS and Mapping
GPS with Xamarin.Mobile
Calculating your speed
Using Core Location
Setting up Core Location and delegate
Finding where the user is
Adding a map
Adding a pin
Storage on the phone
Making a phone call
Sending and receiving a text message
Accessing the Internet
Multimedia
Playing a video
External URL
Internal source
From the photo library
Recording a video
To record a video
Saving the video
The audio system
Playback
Short files
Long (and compressed) files
Setting the power levels
Playing the audio file
Altering the volume
Recording Audio
Setting up the audio NSDictionary
Setting up to record
Recording the audio file
Summary
13. User Preferences
The built-in system
Reading and writing to the .plist file
Rolling your own settings system
Serializing and deserializing data
Setting up the Settings file
The handler class
Adding an accessor
The data class
Summary
14. Testing and Publishing
Provisioning and signing your app
TestFlight
Provisioning
Registering the app
Creating the developer profile
Creating your certificate
Back to registering your app
Enabling TestFlight within Xamarin Studio
Registering on TestFlight
Inviting and registering devices
Building to TestFlight
Releasing your app
App checklist
Icon sizes
Preparing to package
Packaging your app
Creating the build configuration
The App Store Submission Process
Creating an archive
Submission via Xcode
The submission wizard
Summary
Index
← Prev
Back
Next →
← Prev
Back
Next →