Index

Image A

-actionSheet:clickedButtonAtIndex: method, 124

actionSheetStyle property, 123

activityIndicatorViewStyle property, 96

-addTarget:action:forControlEvents: method, 90, 91, 95, 96

-addTarget:selector:forControlEvents: method, 98, 99

-alertView:clickedButtonAtIndex: method, 123

allowableMovement property, 111

alwaysBounceHorizontal property, 103

alwaysBounceVertical property, 103

animationDuration property, 100

animationImages property, 100

animationRepeatCount property, 100

Application design elements, 87

Cocoa Touch controls (see Cocoa Touch controls)

data views

MKMapView, 104

UIDatePickerView, 107

UIImageView, 99101

UIPickerView, 105106

UIScrollView, 103104

UITableView, 104

UITextView, 101102

UIWebView, 104

gesture recognizers (see Gesture recognizers)

temporary user interface elements

UIActionSheet, 123124

UIAlertView, 122123

view controllers (see View controllers)

Automatic Reference Counting (ARC), 20

autocomplete, 25

class documentation, 26

configuring behaviors, 27

file opening, assistant editor, 27

header and implementation files, 26

project conversion, 21

issues, 22, 24

LLVM 3.0 compiler verification, 24

target selection, 22

quick indent/unindent, 26

rules, 21

+availableMediaTypesForSourceType: method, 213

AVAudioRecorder

-pause method, 252

-playPressed: method, 249, 252

-prepareToRecord action, 250

recordPressed: method, 249

-tempFileURL, 250

-updateLabels method, 251252

user interface, 249

viewDidUnload method, 249250

AV Foundation, 222

AVCaptureAudioDataOutput, 224

AVCaptureMovieFileOutput, 224

AVCaptureStillImageOutput, 224

AVCaptureVideoDataOutput, 225

AVCaptureVideoDataOutputSampleBufferDelegate protocol, 225

AV framework and capture sessions

Assistant Editor, 222

AVCaptureDeviceInput, 224

AVCaptureVideoDataOutput, 224

AVCaptureVideoPreviewLayer, 224228

AVMediaTypeAudio, 223

AVMediaTypeVideo, 223

configured outlet and action, 223

CustomCamera, 221

frameworks addition, 222

startButton, 222

UIButton, 222

UIImagePickerController interface, 221

UIVideoEditorController interface, 221

-viewDidLoad method, 223

XIB/header file, 223

Image B

-buttonPressed: method, 90

Image C

Camera recipes, 205

AV framework and capture sessions

Assistant Editor, 222

AVCaptureDeviceInput, 224

AVCaptureVideoDataOutput, 224

AVCaptureVideoPreviewLayer, 224228

AVMediaTypeAudio, 223

AVMediaTypeVideo, 223

configured outlet and action, 223

CustomCamera, 221

frameworks addition, 222

startButton, 222

UIButton, 222

UIImagePickerController interface, 221

UIVideoEditorController interface, 221

-viewDidLoad method, 223

XIB/header file, 223

capturing video frames

AVAssetImageGenerator, 237

AVCaptureOutput, 233

AVCaptureSession, 233

AVCaptureStillImageOutput, 233, 234

-captureOutput:didFinishRecordingToOutputFileAtURL:fromConnections:error:method, 237238

captureStillImage, 235236

imageGenerator, 237

imageViewThumb and imageViewThumb2, 233

recording application, 239

recordPressed: method, 236

thumbnails, 234

UIImageViews, 233

-viewDidLoad method, 234235

custom camera overlays, 221

-cameraButtonPressed: method, 219, 220

cornerRadius, 219

currentPicker's value, 219

customView, 218

header file, 219

imagePicker, 219

QuartzCore interface, 218

-toggleFlash:and -toggleCamera:methods, 219220

UIImagePicker, 218

UIView, 218

editing videos

delegate method, 215216

editButton, 215

editButtonPressed, 215, 216

NSString property, 215

recording video, 217

UIImagePickerController, 214215

UINavigationControllerDelegate protocol, 216

UIVideoEditorController, 214, 216217

UIVideoEditorControllerDelegate protocol, 216

programmatically recording video

Assets Library, 228

AV Foundation, 228

AVCaptureDevice, 229

AVCaptureDeviceInputs, 229

AVCaptureFileOutputRecording Delegate protocol, 229

AVCaptureMovieFileOutput, 229, 232233

AVCaptureOutput, 229231

AVCaptureSession, 229

AVCaptureVideoPreviewLayer, 230

CustomVideo, 228

header file, 229

recordPressed, 228

tempFileURL, 232

UIButton, 228

viewDidLoad method, 230231

viewDidUnload method, 229

-viewWillAppear: and -viewWillDisappear:, 233

recording video, 213214

taking pictures

allowsEditing property, 212

Assistant Editor mode, 207208

cameraButton, 208

-cameraButtonPressed: method, 208, 209

CaptureViewController.m file, 208

CaptureViewController.xib, 207

Chapter6Recipe1, 206

connected outlets and actions, 208

contentMode, 212

imagePicker, 210211

-imagePickerController:didFinishPickingMediaWithInfo: method, 211, 212

imageViewRecent, 208

NSDictionary, 211

photo set as background, 213

project settings, 206

single view application template, 205, 206

UIButton, 207, 208

UIImagePickerController class, 209212

UIImageView, 207, 208, 211

-viewDidLoad method, 208, 209

-cameraButtonPressed: method, 213

CFStringRef, 214

CGPointZero value, 110

CGSizeMake() function, 88

Chapter4HeadingTrackingViewController.xib file, 142

Chapter4RegionMonitoringViewController.m, 154

Cocoa Touch controls

UIActivityIndicatorView, 9697

UIButton, 8990

UILabel

CGSizeMake() function, 88

dim/undim labels, 88

font, 88

fundamental controls, 87

heavily shadowed text, 88

highlightedTextColor property, 89

label with no shadow, 88, 89

one square point shadow, 89

-setText: method, 88

shadowOffset property, 88

textAlignment, 88

textColor, 88

userInteractionEnabled, 89

UIPageControl, 9798

UIProgressView, 97

UISegmentedControl class, 9091

UISlider, 95

UIStepper, 9899

UISwitch, 96

UITextField

app with enabled functionality, 94

configuration, 93

Interface Builder, 92

notifications, 92

UITextView addition, XIB interface, 92

-viewDidLoad method, 91

XIBfile, 91

contentInsetandcontentOffset, 103

contentMode property, 100

Core data

data model creation

Automatic Reference Counting box, 393394

editor style, 397

instrument entity, 395, 400401

MusicSchool, 393

MusicSchool.xcdatamodeld, 395

NSManagedObjectContext, 399

student entity, 395, 400

teacher entity, 394395, 398399

definition, 391

editor style, 397

file management system, 373

NSFetchedResultsController, 393

NSManagedObjectContext, 392

NSManagedObjectModel, 392

NSManagedObjects

-add method, 410

adding and deleting data, 412413

-application:didFinishLaunchingWithOptions method, 407

delegate, 418

empty tables, 407408

fetch requests filtering, 419422

-fetchedObjects, 404

MainTableViewController, 402, 407, 417418

MainViewController's -viewDidLoad method, 408

MusicSchool.xcdatamodeld file, 413414

NSFetchedResultsController, 404, 405

NSFetchRequest, 419422

NSManagedObject, 404

NSManagedObjectContext, 409

setEditing:animated:method, 412

subclass, 414415

-tableView:cellForRowAtIndex Path method, 415417

temporary data, 409

UINavigationController, 406

UITableView, 402, 411

UITableViewDelegate and UITableViewDataSource protocols, 403

viewDidLoad method, 406

NSManagedObjectsNSEntityDescription, 403

NSPersistentStoreCoordinator, 392

NSString/NSArray, 391

storing data, 391

versioning

attributes, 423

definition, 422

file inspector, 424425

if statement, 426

instrument subclass files, 427

MusicSchool2, 422

new model file set, 425

NSDictionary, 426

NSManagedObject subclass, 427

NSString, 423

persistentStoreCoordinator method, 425

xcdatamodeld, 424

Core Graphics, 222

Core Media, 222

Core motion

accelerometer, 437, 449451

accessCMDeviceMotion, 442

-applicationDidEnterBackground method, 441, 444

attitude properties, 445448

CMAttitude, 443

CMMotionManager, 438

data access

CMMotionManager, 435

framework, 434

-toggleUpdates method, 439440, 443444

UILabels, 439440

XIB setup, 436

gravity Represents, 443

gyroscope, 437

hardware, 438

magneticField, 443

magnetometer, 437

raw device information, 442

registering shake events

MainWindow, 431

measurements, 429

-motionEndedwithEvent method, 432

NSNotificationCenter, 432

shake gesture, 433

shakeDetected, 433

shaking, 433

single view application, 430

UIWindow, 430431

-viewDidLoad method, 433

rollLabel, pitchLabel, and yawLabel, 445

rotationRate, 443

-shakeDetected method, 440

-startDeviceMotionUpdates, 443

startDeviceMotionUpdatesToQueue withHandler, 443

startDeviceMotionUpdatesUsingReferenceFrame, 443

UILabel, 449451

userAcceleration Represents, 443

-viewDidUnload method, 441

Core Video, 222

CoreGraphics.framework library, 110

Image D

Data storage

core data,file management system, 373

iCloud

12345ABCDE.com.domainName.iCloudTest, 378

App ID, 375

com.domainName.iCloudTest, 378

Documents & Data, 384

Enable Entitlements, 375

iCloudStoreViewController.m file, 378

iCloudStoreViewController.xib file, 380

iOS 5.0, 374

metadataQueryDidFinishGathering, 383

MyDocument.h file, 379

NSFileManager and NSMetadataQuery classes, 382

NSMetadataQuery, 384

project configuration, 374

Provisioning Profiles section, 378

storing key-value data, 386

text saved and loaded, 386

UIDocument: -contentsForType:error: and-loadFromContents:ofType: error:, 380UIDocument abstract class, 379

UITextView, 381

managing files

core data, 373

delegate property, 362363

-encodeWithCoder method, 370

file management system, 360

Hotspot property, 362

Hotspot.h, 360

Hotspot.m, 360

HotspotInfoViewController.h file, 363

HotspotInfoViewController.xib, 362363

HotspotsInfoDelegate protocol, 365

initWithCoder method, 371

iOS's file management system, 359

-loadData method, 372

newHotspot, 366

NSArray, 372

NSDictionary, 370

NSFileManager, 371

NSIndexPath, 367369

NSMutableArray, 365

NSObject subclass, 360

-populateWithHotspotmethod, 364

saveButtonPressed, 364

-saveData method, 372

Single View Application template, 360

UIApplication, 369

UINavigationController, 366

UITableView, 365, 367, 369

UITableViewCellEditingStyle, 373

UITableViewDelegate and UITableViewDataSource protocols, 365

<UITextFieldDelegate>, 363

UITextField element, 362

UIViewController subclass, 361

viewDidLoad method, 363

XIB for user interface, 361

NSUserDefaults, 357

Boolean values, 353

iOS simulator, 358

iPhone family, 353354

persisting, 358

+resetStandardUserDefaults, 356

+standardUserDefaults method, 356

Stubborn, 353

synchronize method, 356

UISwitch, 357

UITextFieldDelegate protocol methods, 355, 356

view controller's XIB, 354, 355

viewDidLoad method, 356358

viewDidUnload method, 355

Xcode, 358

Data transmission recipes, 453

attachment parameter, 461

composing e-mail, 459460

data to mail attachament, 461467

fileName parameter, 461

formatted printing, with page renderers, 478

drawPageAtIndex:inRect: method, 479480

drawPrintFormatter:forPageAtIndex: method, 480

NSString properties, 478

printCustomPressed action, 481483

UIPrintPageRenderer class, 478

getImagePressed method, 463

image printing, 467

printer simulator application, 471473

UINavigationController, 467

UIPrintInfoOutputGeneral, 469

UIPrintInfoOutputGrayscale, 468

UIPrintInfoOutputPhoto, 468

UIPrintInteractionController, 469470

mailPressed method, 459, 465466

MFMailComposeViewController, 457458, 461

MFMailComposeViewController's delegate method, 466467

mimeType parameter, 461

plain text printing, 473

printFormatter property, 474475

viewDidLoad method, 473474

text messaging, 453

configuration, 455

description, 453

MFMessageComposeViewController, 457458

single view application, 454

textPressed method, 457

UITextView's delegate methods, 457

viewDidLoad method, 455456

UIImagePickerControllerDelegate protocol methods, 463465

view printing, 475477

dataDetectorTypes, 101

datePickerMode property, 107

defersCurrentPageDisplay property, 98

directionalLockEnabled property, 103

-dismissModalViewController Animated:method, 121

-dismissWithClickedButton Index:animated: method, 123, 124

Image E

E-mail composing, 459460

ImageF

-flashScrollIndicators method, 104

Formatted printing, 478483

ImageG

Game achievements, 569

code setup, 572573

GKAchievementsViewController, 574575

iTunes connect setup

configuration, 570572

Game Center management, 569

new achievement addition, 570

MainMenuScene, 574575

Game Center, 555

achievements (see Game achievements)

checking for, 561

iTunes connect setup

App ID configuration, 556

application information, 556

management, 557558

Leaderboards (see Leaderboards)

multiplayer, 575581

player authentication, 561563

project setup

Build Phases tab, 558

Game Kit framework, 559

iTunes connect, 560

Gesture recognizers

-addGestureRecognizer: method, 108

+isKindOfClass method, 108

-locationInView: method, 109

-locationOfTouch:inView: method, 109

UIGestureRecognizerDelegate protocol, 109

UIGestureRecognizerStateBegan, 108

UIGestureRecognizerStateCancelled, 108

UIGestureRecognizerStateChanged, 108

UIGestureRecognizerStateEnded, 108

UIGestureRecognizerStatePossible, 108

UIGestureRecognizerStateRecognized, 108

UILongPressGestureRecognizer, 110111

UIPanGestureRecognizer, 110

UIPinchGestureRecognizer, 111

UIRotationGestureRecognizer, 111

UISwipeGestureRecognizer, 109110

UITapGestureRecognizer, 108, 109

userInteractionEnabled property, 108

GitHub, 1820

ImageH

handleGesture method, 109, 110

hidesForSinglePage property, 98

hidesWhenStopped property, 96

highlightedAnimationImages property, 100

highlightedImage properties, 99

highlightedTextColor property, 89

horizontalAccuracy property, 133

ImageI, J

(IBAction)regionMonitoringToggle:(id)sender method, 154

iCloud

12345ABCDE.com.domainName.iCloudTest, 378

App ID, 375

com.domainName.iCloudTest, 378

Documents & Data, 384

Enable Entitlements, 375

iCloudStoreViewController.m file, 378

iCloudStoreViewController.xib file, 380

iOS 5.0, 374

metadataQueryDidFinishGathering, 383

MyDocument.h file, 379

NSFileManager and NSMetadataQuery classes, 382

NSMetadataQuery, 384

project configuration, 374

Provisioning Profiles section, 378

storing key-value data, 386

text saved and loaded, 386

UIDocument: -contentsForType:error: and -loadFromContents:ofType:error:UIDocument abstract class, 379

UITextView, 381

Image feature detection

files addition, 550551

-findFacePressed method, 551552

Single View Application template, 548

view controller's XIB setup, 550

-viewDidLoad method, 551

+imageNamed:method, 99

Image printing, 467473

Image recipes

filters

CIImage creation, 539

CoreImage.framework library, 537

hue adjustment, 542543

image rotation, 543

NSMutableArray property, 538

populateImagesWithImage, 539, 544

-setMainImage, 538

-tableView:didSelectRowAt

IndexPath:, 540

-tableView:cellForRowAtIndex

Path:, 541

UIImagePickerControllerDelegate protocol, 542

programming screenshots, 520522

scaling images (seeScaling images)

simple shapes

path creation, 519520

QuartzCore and CoreGraphics.framework, 516518

rectangle and ellipse, 519

single view application, 515516

UIView, 518519

UIImageViews (see UIImageViews)

imageForSegmentAtIndex: method, 91

imageFromSampleBuffer, 226

-imagePickerController:did FinishPickingMediaWithInfo:delegate method, 219

-initWithContentViewController: initializer, 119

initWithCoordinate method, 175

-initWithItems: method, 91

inputAccessoryView, 102

inputViewproperty, 102

-insertSegmentWithImage: atIndex:animated: method, 91

insertSegmentWithTitle:atIndex:animated: method, 91

Interface Builder

Assistant Editor, 30

inspector pane, 30

navigator pane, 29

outlet connection

action creation and configuration, 33

labelHelloWorld updation, 34

outlet creation, 32

placeholders, 34

storyboards (see Storyboards)

Tint control, 42

touch gesture recognizers, 36

adjusting attributes, 39

attributes inspector, 38

gesture recognizer addition, 36

outline view, 38

placeholders, 40

tapTheLabel action, 41

iPod library

+applicationMusicPlayer, 254

buttons, 253

elements, 253

+iPodMusicPlayer, 254

MPMediaItemCollection, 253

MPMediaPickerController's delegate methods, 256

MPMusicPlayerController, 253

MusicPick, 252

player's queue, 257

-setNotifications method, 254256

-updateQueueWithMediaItem Collection, 256257

user interface, 252

-viewDidLoad method, 254

-viewDidUnload method, 258259

Image K

kCLLocationAccuracyHundredMeters, 160

kUTTypeMovie, 214

ImageL

Leaderboards

code setup, 567568

high scores, 568

iTunes setup

configuration, 566

Game Center management, 561563

language display settings, 566

setup, 564

type selection, 565

Local Git repository, Xcode 4

commit message, 13

creation, 9

disabled version control, 13

file changes, 12

filtered modified files, 12

modified and added project files, 10

Location recipes, 125

CLGeocoder object, 162

CLLocationManager object, 127

completionHandler, 162

Core Location framework, 125

device location information, 136

- locationManager:didUpdateTo Location:fromLocation: method, 132

application without location data, 135

Chapter4SampleProject, 127

Chapter4SampleProjectViewController interface file (.h), 130

CLLocation object, 133

CLLocationManager object, 131132

CLLocationManagerDelegate, 130

Core Location framework addition, 127, 128

description property, 133

desiredAccuracy property, 131

distanceFilter property, 131

Interface Builder, 128

interface file, 130

kCLDistanceFilterNone property, 131

labelLocation, 133135

location permissions request, 134

newLocation.description value, 133

NSString, 133

purpose property, 131, 134

startUpdatingLocation method, 131

stopUpdatingLocation method, 131, 132

toggleLocationServices:sender: action, 130

UILabel, 128129

UISwitch, 128, 129, 134

Xcode 4, 127

location services requirements, 126

magnetic bearing

_locationManager, 144

Chapter4HeadingTracking, 141

Chapter4HeadingTrackingView Controller, 143144

CLLocationManager object, 141

CLLocationManagerDelegate protocol, 143

delegate methods, 145

didFailWithError method, 145

didUpdateHeading method, 145

heading calibration screen, 146

heading tracking services, 144145

headingAccuracy property, 145

headingFilter property, 144, 145

headingOrientation property, 141

headingSwitch, 144

labelHeading, 145

locationManagerShouldDisplayHeadingCalibration, 146

magnetic poles, 141

magneticHeading, 145

purpose property, 144

startUpdatingHeading, 144

switchHeadingService method, 143, 144

UILabel and UISwitch, 142143

NSArray placemarks, 162

region monitoring

Chapter4RegionMonitoring, 151

Chapter4RegionMonitoringViewController.xib, 151

CLLocationManager object, 151

CLLocationManagerDelegate protocol, 153

CLRegion object, 154155

custom coordinates, 156

delegate methods, 155

did enter and did exit, 156

identifier property, 155

implementation file (.m), 154

interface file (.h), 153154

kCLErrorRegionMonitoringDenied, 155156

kCLErrorRegionMonitoringFailure error, 151, 155156

locationManager:monitoringDidFailForRegion:withError: delegate method, 151

maximumRegionMonitoringDistance property, 154

monitoredRegions property, 151, 155

startMonitoringForRegion:desiredAccuracy: method, 151

toggling action, 153

UILabel and UISwitch, 151153

reverse and forward geocoding

action's creation, 159

actionWhereAmI method, 158, 160

Chapter4Geocoder, 157

Chapter4GeocoderViewController implementation file (.m), 160

Chapter4GeocoderViewController interface file (.h), 159160

Chapter4GeocoderViewController.xib file, 157

CLGeocoder, 157

CLPlacemarks, 161

didFailWithError method, 160

didUpdateToLocation delegate method, 160

didUpdateToLocation method, 161

distanceFilter property, 160

GPS coordinates, 156

labelGeocodeInfo, 158

latitude and longitude coordinates, 156

newLocation timestamp property, 160

NSArray, 161

NSError, 161

placemarks, 161

UIButton, 157158

UILabel, 157158

UISwitch, 159

significant location changes, 126, 127

(IBAction)toggleLocationServices:(id)sender method, 138

application:didReceiveLocalNotification: method, 140

Chapter4SignificantLocationTracker, 136

delegate method, 140141

desiredAccuracy property, 139

distanceFilter property, 139

implementation file (.m), 138

Info.plist, 136

interface file (.h), 138

labelLocation, 138

newLocation, 140

purpose property, 139

required background mode, 136, 137

self.labelLocation.text = newLocation.description;, 140

startMonitoringSignificantLocationChanges method, 139140

toggleLocationServices, 138

toggling action, 138

UIAlertView, 138

UIBackgroundModes, 136

UILabel, 138

UILocalNotification, 140

standard location service, 126127

supported devices, 125

true bearing

Chapter4HeadingTrackingViewController.xib file, 147

CLHeading object, 147

declination, 146

didUpdateHeading method, 149

implementation file (.m), 149150

interface file (.h), 148

labelTrueHeading, 147

startUpdatingLocation method, 147, 148

stopUpdatingLocation, 148

switchHeadingServices method, 148149

trueHeading property, 147

user interface with label, 147

Image M

Map Kit recipes, 163

annotations grouping, location, 199

abs function, 198

-cleanPlaces method, 200

CLLocationDegrees, 194

delegate method, 198

fabs function, 198

full -group: method, 200201

-group: method, 198

header file, 193

Hotspot class, 193, 199

HotspotMap, 193

hotspots, 195

implementation file, 200

initialization method, 194

-initWithCoordinate: method, 200

map with far too many annotations, 197

-mapView: regionDidChangeAnimated: method, 198, 202

.m file, 194

MKAnnotation protocol, 193

MKMapView, 194

MKPinAnnotationView, 201

NSArrays, 195

.NSMutableArray property, 199

NSObject subclass, 193

placesproperty, 194

-placesCount method, 200

view controller's .m file, 197198

-viewDidLoad method, 194196

-viewDidUnload method, 196

viewForAnnotationmethod, 196, 201202

viewForAnnotation: method, 199

-(void)group(NSArray *)hotspots, 198

with number-specific colors, 203

custom annotations

application, 184

avatar.png image, 178, 185

callouts, 186, 190

canShowCallout property, 184

centerOffset property, 182

CGPoint value, 182

CGPointMake() function, 182

coordinate, title, and subtitle properties, 180

"Copy items into destination group's folder (if needed)", 178, 179

CustomAnnotationView class, 181182

CustomAnnotationView.m file, 184185

DetailViewController .xib, 187, 188

full method, 182183

header file, 180

#import "DetailViewController.h", 189

initWithAnnotation:reuseIdentifier:method, 182

leftCalloutAccessoryView, 184, 185

-mapView:annotationView: calloutAccessoryControlTapped: method, 186

MKAnnotationView class, 178, 182

MKAnnotationView subclass, 181

MKPinAnnotationView objects, 177, 183

MyAnnotation.h and CustomAnnotationView.h files, 183

MyAnnotation.m file, 181

NSObject subclass, 180

NSString, 188189

Objective-C class, 179

overlays addition, 190192

titleLabel and subtitleLabel properties, 188

UIImage, 182

UIImageView, 185

UIViewController subclass, 186

viewDidLoadmethod, 178, 183, 189

map with device's location

application with panning and user tracking, 173

BarButtonItem, 171

+ button, framework addition, 165

configuration settings, 164

Core Location and Map Kit frameworks selection, 165

if statement, 169170

initWithMapView: method, 171

labelUserLocation, 167

location access, 171

MapKit/MapKit.h framework library, 167

-mapView:didUpdateUserLocation: delegate method, 170

MKCoordinateRegionMakeWithDistance method, 168

MKMapView outlet, 167

MKUserLocationFollowWithHeading, 173

MKUserTrackingBarButtonItem, 171, 172

MKUserTrackingModeFollow, 169

SBViewController interface file (.h), 166, 167

SBViewController.h file, 167

self.mapViewUserMap, 170

setUserTrackingMode:animated: method, 169

showUserLocation, 168169

Single View Application template, 163, 164

toolbarMapTools, 171

userLocationVisible property, 169

.userTrackingMode property, 169

viewDidLoad method, 168, 171, 172

viewDidUnload method, 170

.xib file with MKMapView and UILabel, 165166

.zoomEnabled and .scrollEnabled properties, 168

marking locations with pins

annotations addition, 176

annotation's coordinate property, 177

application with map and pins, 177

canShowCallout property, 176

MyAnnotation, 175176

NSObject subclass, 173, 174

Objective-C class, 173, 174

rightCalloutAccessoryView property, 176

-viewForAnnotation: delegate method, 177

-mapView:viewForAnnotation: method, 175

maximumNumberOfTouches property, 110

maximumZoomScaleand/or minimumZoomScale properties, 104

mediaType, 214

minimumNumberOfTouches property, 110

minimumPressDuration, 111

MKMapViewDelegate protocol, 167, 178

MKUserTrackingBarButtonItem, 171

MKUserTrackingModeFollow, 169

MKUserTrackingModeFollowWithHeading, 169

MKUserTrackingModeNone, 169

modalPresentationStyle property, 121

modalTransitionStyle property, 121

Multimedia

-addObserver, 270

application category, 265

audio toolbox, 243

AudioServicesPlaySystemSound(), 248

AV foundation, 243

AVAudioPlayer delegate methods, 248

AVAudioPlayerDelegate protocol, 245

AVAudioRecorder

-pause method, 252

-playPressed: method, 249, 252

-prepareToRecord action, 250

recordPressed: method, 249

-tempFileURL, 250

-updateLabels method, 251252

user interface, 249

viewDidUnload method, 249250

-canBecomeFirstResponder, 270

CMTimeMake() function, 273

currentIndex, 268

+defaultCenter, 269

enableRate property, 247

frameworks addition, 242, 243

frameworks' header files import, 243

iPod library (see iPod library)

-libraryPressed: method, 273274

MPMediaPropertyPredicates

comparisonType property, 262

MPMediaQuery, 262

NSArray, 270

NSMutableArray, 267

NSNotificationCenter, 270

NSUInteger argument, 247

playButton, 267

-playerItemDidReachEnd, 270

playlist, 267

-playPressed: and -nextPressed: methods, 271

plist file, 264265

-prevPressed: method, 272273

querying media

MPMediaItemProperties, 261

textFieldArtist, 260

UIButton, 259

UITextField, 259

user interface, 260

-viewDidLoad, 260

-queryPressed: method, 260, 261, 274

-remoteControlReceivedWithEvent, 269

required background modes, 265

single view application template, 241, 242

slider's values, 244, 245

sound clip, 245

UISliders, 247

updateLabels method, 247

-updateNowPlaying, 271

user interface, 266, 268

view controller's XIB file, 243, 244

viewDidLoad method, 246, 263

viewDidUnload method, 245

-viewWillDisappear:animated: methods

Multiplayer, 575581

Image N, O

-numberOfComponentsInPickerView: method, 105

numberOfSegments property, 91

numberOfTapsRequired property, 109, 111

numberOfTouchesRequired property, 109111

NSManagedObjects

-add method, 410

adding and deleting data, 412413

-application:didFinishLaunching WithOptions method, 407

delegate, 418

empty tables, 407408

fetch requests filtering, 419422

-fetchedObjects, 404

MainTableViewController, 402, 407, 417418

MainViewController's -viewDidLoad method, 408

MusicSchool.xcdatamodeld file, 413414

NSFetchedResultsController, 404, 405

NSFetchRequest, 419422

NSManagedObject, 404

NSManagedObjectContext, 409

setEditing:animated:method, 412

subclass, 414415

-tableView:cellForRowAtIndexPath method, 415417

temporary data, 409

UINavigationController, 406

UITableView, 402, 411

UITableViewDelegate and UITableViewDataSource protocols, 403

viewDidLoad method, 406

NSUserDefaults, 357

Boolean values, 353

iOS simulator, 358

iPhone family, 353354

persisting, 358

+resetStandardUserDefaults, 356

+standardUserDefaults method, 356

Stubborn, 353

synchronize method, 356

UISwitch, 357

UITextFieldDelegate protocol methods, 355, 356

view controller's XIB, 354, 355

viewDidLoad method, 356358

viewDidUnload method, 355

Xcode, 358

Image P, Q

pagingEnabled property, 103

pickerView:didSelectRow:inComponent: method, 105

-pickerView:numberOfRowsIn Component: method, 105

pickerView:rowHeightForComponent: method, 105

pickerView:titleForRow:forComponent: method, 105

pickerView:viewForRow:forComponent:reusingView: method, 105

pickerView:widthForComponent: method, 105

Plain text printing, 473475

-presentModalViewController:animated: method, 121

-presentPopoverFromBarButtonItem:permittedArrowDirections:animated: method, 119

-presentPopoverFromRect:inView:permittedArrowDirections:animated: method, 119

Printing

formatted, 478483

image, 467473

plain text, 473475

view, 475477

progressViewStyle property, 97

Image R

-removeAllSegments: method, 91

-removeSegmentAtIndex:animated: method, 91

Required device capabilities, 126

-resignFirstResponder method, 94, 102

Image S

Scaling images

configuration, 529

detail view controller, 529

image resizing, 530531

advantages and issues, 536537

UIImageView, 532536

imagePickerController, 530

MasterViewController, 529530

scrollEnabled property, 103

-scrollRectToVisible:animated: method, 103

scrollsToTop property, 103

-selectedRowInComponent:method, 106

selectedSegmentIndex, 91

-setBackgroundImage:forState:andsetImage:forState: methods, 90

-setContentOffset:animated: method, 103

-setContentViewController:animated: method, 119

-setDate:animated: method, 107

-setImage:forSegmentAtIndex: method, 91

-setOn:animated: method, 96

-setPopoverContentSize:animated: method, 119

-setProgress:animated: method, 97

setTitle:forSegmentAtIndex: method, 91

-setTitle:forState: property, 89

-setValue:animated: method, 95

shadowColorandshadowOffsetproperties, 88

Shake gesture, 433

showsSelectionIndicator property, 106

-sizeForNumberOfPages: method, 98

-startAnimating method, 96

-stopAnimating method, 96

Storyboards

aboutUsViewController view, 48

aboutUsViewController implementation, 85

Back button, 84

configuration, 46

controllers interface, 80

UIButton action, 81

Contact Info view, 53

customized cells, 56

duplicating cells, 56

file copying, 82

file loading, 47

grouped cells, 56

loaded storyboard, 84

Main storyboard file base name, 46

performSegueWithIdentifier, 51

project configuration, 79

ProjectViewController, 83

renaming, 82

scenes, 43

segue identifier settings, 53

Segues, 45

single view application selection, 78

static cells configuration, 55

subgroup addition, 80

target settings, 47

UINavigationBar, 52

UITableView, 57

UITableViewCell prototypes, 72

AppUITableViewCellClass addition, 76, 77

cell identifier, 75

configuring cells, 75

dynamic prototype reselection, 74

MyAppClass, 77

new table view, 74

outlet connection, 75

segue reconfiguration, 75

subclass, 73

UILabel and UIimage outlet property, 73

UITableViewController, 54

UIViewController, 50

-stringValue, 281

Image T

tableView: cellForRowAtIndexPath: method, 326

TableView cells, 175

tapGesture, 108

Text messaging, 453458

textField:shouldChangeCharactersInRange:replacementString: method, 93

-textFieldDidBeginEditing: method, 93

-textFieldDidEndEditing: method, 93

-textFieldShouldBeginEditing: method, 93

-textFieldShouldEndEditing: method, 93

-textFieldShouldReturn: method, 94

-textView:shouldChangeTextInRange:replacementText: method, 102

-titleColorForState: method, 90

titleForSegmentAtIndex: method, 91

-titleShadowColorForState: method, 90

Touch gesture recognizers, 36

adjusting attributes, 39

attributes inspector, 38

gesture recognizer addition, 36

outline view, 38

placeholders, 40

tapTheLabel action, 41

-translationInView: method, 110

Tweets

composing, 485

configuration, 485487

description, 485

simpleTweetPressed method, 488490

Twitter.framework, 487

TWTweetComposeViewController, 491

filtering, 508512

retrieving, 494

homePressed method, 506508

IBAction methods, 497

NSObject, 502504

public timeline data, 502

publicPressed method, 499501

tabbed application template, 494496

UITableView, 505

UITextViews, 497499

Twitter recipes, 485

description, 485

filtering tweets, 508512

retrieving tweets, 494

homePressed method, 506508

IBAction methods, 497

NSObject, 502504

public timeline data, 502

publicPressed method, 499501

tabbed application template, 494496

UITableView, 505

UITextViews, 497499

searchPressed method, 510512

tweets composing, 485

configuration, 485487

description, 485

simpleTweetPressed method, 488490

Twitter.framework, 487

TWTweetComposeViewController, 491

TWRequests creation, 491

description, 491

postTweetPressed method, 492493

sending Tweets via, 492494

UISearchBar, 508510

Image U

UIActionSheetDelegate protocol, 124

UIActionSheetStyleAutomatic value, 123

UIActionSheetStyleBlackOpaque value, 123

UIActionSheetStyleBlackTranslucent value, 123

UIActionSheetStyleDefault value, 123

UIActivityIndicatorView, 97

UIActivityIndicatorViewStyleGray, 96

UIActivityIndicatorViewStyleWhite, 96

UIActivityIndicatorViewStyleWhiteLarge, 96

UIAlertViewDelegate protocol, 123

UIAlertViewStyleDefault, 122

UIAlertViewStyleLoginAndPasswordIn put, 122

UIAlertViewStylePlainTextInput, 122

UIAlertViewStyleSecureTextInput, 122

UIBarButtonItem class, 171

UIButtonTypeContactAdd, 89

UIButtonTypeCustom, 89

UIButtonTypeDetailDisclosure, 89

UIButtonTypeInfoDark, 89

UIButtonTypeInfoLight, 89

UIButtonTypeRoundedRect, 89

UIControlEventValueChanged, 99

UIControlEventValueChanged events, 107

UIControlState, 89

UIDatePickerModeCountDownTimer, 107

UIDatePickerModeDate, 107

UIDatePickerModeDateAndTime, 107

UIDatePickerModeTime, 107

UIGestureRecognizerDelegate protocol, 109

UIGestureRecognizerStateBegan state, 111

UIGestureRecognizerStateChanged state, 110

UIGestureRecognizerStateEnded state, 109, 110

UIImagePickerControllerPhotoLibrary, 209

UIImagePickerControllerSavedPhotosAlbum, 209

UIImagePickerControllerSourceTypeCamera, 209

UIImageViews, 522

autosizing, 525526

clearImagePressed, 528

IOS simulator, 528

project setting configuration, 523

simulated application, 524525

UIImagePickerControllerDelegate protocol, 527

UIPopoverController, 526

UISplitViewController, 523524

UIKeyboardDidHideNotification, 92

UIKeyboardDidShowNotification, 92

UIKeyboardWillHideNotification, 92

UIKeyboardWillShowNotification, 92

UILabel

CGSizeMake() function, 88

dim/undim labels, 88

font, 88

fundamental controls, 87

heavily shadowed text, 88

highlightedTextColorproperty, 89

label with no shadow, 88, 89

one square point shadow, 89

-setText: method, 88

shadowOffset property, 88

textAlignment, 88

textColor, 88

userInteractionEnabled, 89

UIModalPresentationCurrentContext, 121

UIModalPresentationFormSheet, 121

UIModalPresentationFullScreen, 121

UIModalPresentationPageSheet, 121

UIModalTransitionStyleCoverVertical, 121

UIModalTransitionStyleCrossDissolve, 121

UIModalTransitionStyleFlipHorizontal, 121

UIModalTransitionStylePartialCurl, 121

UIModalTransitionStylePartialCurltransition style, 121

UIModalTransitionStylePartialCurlstyle, 121

UINavigationController

back button, 113

configuration, 113

-initWithRootViewController:, 112

-pushViewController:animated: method, 112

right bar item(s), 114

root view controller, 112

-setToolbarHidden:animated: method, 114

-setToolbarItems: method, 114

title, 113

UINavigationControllerDelegate protocol, 114

-viewDidLoad methods, 114

-viewWillAppear:animated: method, 114

viewWillDisappear:animated: method, 114

UIPageControl, 9798

UIPageViewController, 120

UIPickerViewDataSource protocol, 105

UIPickerViewDelegate protocol, 105

UIPopoverController, 118120

UIProgressView, 97

UIProgressViewStyleBar:Style, 97

UIProgressViewStyleDefault:Standard style, 97

UIRequiredDeviceCapabilities, 126

UIScrollViewDelegate protocol, 104

UISegmentedControl class, 9091

UISlider, 95

UISplitViewController

detail pane, 116

iPad-specific UISplitViewController, 117

master pane, 116

Master-Detail Application template, 117, 118

NSArray, 118

-splitViewController:shouldHideViewController:inOrientation: method, 118

UISplitViewControllerDelegate protocol, 118

UIStepper, 9899

UISwipeGestureRecognizerDirectionDown, 110

UISwipeGestureRecognizerDirectionLeft, 110

UISwipeGestureRecognizerDirectionRight, 110

UISwipeGestureRecognizerDirectionUp, 110

UISwitch, 96

UITabBarController

configuration, 115116

UITabBarItem, 115

-viewDidLoad method, 115

UITableView

configuration, 284, 285

editing

deletion, 340

editButtonItem property, 337

row animations, 339340

-setEditing:animated: method, 338

-tableView:commitEditingStyle:forRowAtIndexPath:, 341342

UITableView delegate methods, 342

-fetchEvents method, 286

group creation

accessoryButtonTappedForRowWithIndexPath:, 347

commitEditingStyle:forRowAtIndexPath:, 348

didSelectRowAtIndexPath, 347

moveRowAtIndexPath:toIndexPath:, 347

NSDictionary, 349

NSMutableArray, 345

numberOfRowsInSection, 346

table's "Style, 345

-tableView:viewForFooterInSection:, 350

-tableView:cellForRowAtIndexPath:, 346

viewForHeaderInSection, 350

NSMutableDictionary, 286

tableViewEvents, 285

UITableViewDataSource protocols, 286

ungrouped table creation

adding files, 321

basic application, 324

-beginUpdates, 333

Cell View Customization, 336337

cell.textLabel.text property, 325

cellForRowAtIndexPath: method, 322

CellIdentifier, 323

country objects, 320

CountryInfoViewController, 328, 330, 332

delegate methods, 322

-dequeueReusableCellWith Identifier, 323

didFinishLaunchingWithOptions, 324

empty application, 317318

-endUpdates, 333

enhanced user interaction, 334336

flag images, 326

imageView, 325

layer property, 327

MainTableViewController, 318

numberOfRowsInSection: method, 322

revertButton, 331

-tableView:cellForRowAtIndex Path:, 325

tableViewCountries, 319320

UIImage, 325

UINavigationController, 323324

UITextFieldDelegate protocol, 329

-viewDidLoad method, 321322

-viewWillAppear:animated: method, 330

XIB file, 319

-viewDidUnload, 285

UITableViewCell prototypes, 72

AppUITableViewCellClass addition, 76, 77

cell identifier, 75

configuring cells, 75

dynamic prototype reselection, 74

MyAppClass, 77

new table view, 74

outlet connection, 75

segue reconfiguration, 75

subclass, 73

UILabel and UIimage outlet property, 73

UITextField

app with enabled functionality, 94

configuration, 93

Interface Builder, 92

notifications, 92

UITextView addition, XIB interface, 92

-viewDidLoad method, 91

XIBfile, 91

UITextFieldDelegate protocol, 9394, 102

UITextViewDelegate protocol, 102

UITextViewTextDidBeginEditingNotification, 102

UITextViewTextDidChangeNotification, 102

UITextViewTextDidEndEditingNotification, 102

UIViewContentModeScaleAspectFill, 101, 212

UIViewContentModeScaleAspectFit, 101, 212

-updateCurrentPageDisplay method, 98

User data

address book

__bridge_transfer, 302

ABMultiValueCopyValueAtIndex() function, 302303

ABPeoplePickerNavigationController, 300301

ABRecordCopyValue(), 301

ABRecordRef, 301

CFRelease() command, 302

-findPressed, 300

property names, 300

XIB file, 299

contact information setting, 305311

events recurring, 297299

fetching events, 282284

NSCalendar and NSDate

calendar types, 280

NSDateComponents classes, 279

NSUInteger unitFlags, 281

UITextField, 278279

user interface, calendar conversion, 277, 278

simple events creation

delegate, 295

EKEvent, 291

EventAddViewController, 293, 296

MainViewController, 296

toolBarTop, 291

UITextField, 294

UIToolbar, 291

UIViewController subclass, 292

user interface, 293, 294

-viewDidLoad method, 291292

UITableView

configuration, 284, 285

-fetchEvents method, 286

NSMutableDictionary, 286

tableViewEvents, 285

UITableViewDataSource protocols, 286

-viewDidUnload, 285

viewing contacts, 312315

viewing,editing,and deleting events, 288291

Image V, W

-velocityInView: method, 110

verticalAccuracy property, 133

View controllers

modal controllers, 120122

UINavigationController

back button, 113

configuration, 113

-initWithRootViewController:, 112

-pushViewController:animated:method, 112

right bar item(s), 114

root view controller, 112

-setToolbarHidden:animated: method, 114

-setToolbarItems: method, 114

title, 113

UINavigationControllerDelegate protocol, 114

-viewDidLoad methods, 114

-viewWillAppear:animated: method, 114

viewWillDisappear:animated: method, 114

UIPageViewController, 120

UIPopoverController, 118120

UISplitViewController

detail pane, 116

iPad-specific UISplitViewController, 117

master pane, 116

Master-Detail Application template, 117, 118

NSArray, 118

-splitViewController:shouldHideViewController:inOrientation: method, 118

UISplitViewControllerDelegate protocol, 118

UITabBarController

UITabBarItem, 115

-viewDidLoad method, 115

View printing, 475477

-viewWillAppear method, 227

-viewWillDisappear method, 227

-(void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation method, 140

Image X, Y

Xcode 4

ARC (see Automatic Reference Counting (ARC))

lite and full version, 57

user interface, 1 (see also Interface Builder)

Assistant Editor, 4

interface builder, 2, 3

Timeline Editor, 4

version control

branching and merging, 1317

GitHub, 1820

local Git repository (seeLocal Git repository, Xcode 4)

remote repositories, 17, 18

source control practices, 20

Image Z

Zombie Hunter, 79

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset