ebook img

Dr Alasdair Allan - Learning iPhone Programming PDF

32 Pages·2009·2.8 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Dr Alasdair Allan - Learning iPhone Programming

The Sensors in your iPhone Dr Alasdair Allan Available Hardware Hardware Original iPhone iPhone 1st Gen 2nd Gen 3rd Gen Features iPhone 3G 3GS iPod touch iPod touch iPod touch Cellular Wi-Fi Bluetooth Speaker Audio-In Accelerometer Magnetometer GPS Proximity Sensor Camera Video Vibration The GPS (Core Location) Core Location • Abstraction layer • Cell towers (12km falling to 1-3km) • Skyhook wireless (approx. 100m) • GPS (approx. 40m) Core Location LocationManager = [[CLLocationManager alloc] init]; locationManager.delegate = self; if( locationManager.locationServicesEnabled ) { [locationManager startUpdatingLocation]; } else { ... } Distance filters locationManager.distanceFilter = 1000; // 1km Desired accuracy locationManager.desiredAccuracy = kCLLocationAccuracyKilometer; Delegate methods - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation { if( newLocation != oldLocation ) { ... } } - (void)locationManager:(CLLocationManager *)manager didFailWithError: (NSError *)error { ... } The Accelerometer +Y Y Z +Z X +X

Description:
Nov 19, 2009 *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:( CLLocation *)oldLocation { if( newLocation != oldLocation ) { } }.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.