archive-com.com » COM » T » TECHOTOPIA.COM

Total: 1018

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • An Example iOS 7 MKMapItem Application - Techotopia
    connection as an Outlet named address and click on the Connect button Repeat these steps for the City State and Zip text fields connecting them to outlets named city state and zip respectively Ctrl click on the Get Directions button and drag the resulting line to a position beneath the new outlets declared in the Assistant Editor In the resulting configuration panel change the Connection type to Action and name the method getDirections On completion the MapItemViewController h file should read as follows import UIKit UIKit h interface MapItemViewController UIViewController property strong nonatomic IBOutlet UITextField address property strong nonatomic IBOutlet UITextField city property strong nonatomic IBOutlet UITextField state property strong nonatomic IBOutlet UITextField zip IBAction getDirections id sender end eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7 edition of this book in eBook 12 99 or Print 39 99 format iOS 9 App Development Essentials Print and eBook ePub PDF Kindle edition contains 105 chapters Converting the Destination using Forward Geocoding When the user touches the button in the user interface the getDirections method will be able to extract the address information from the text fields The objective will be to create an MKPlacemark object to contain this location As outlined in Integrating Maps into iOS 7 Applications using MKMapItem an MKPlacemark instance requires the longitude and latitude of an address before it can be instantiated The first step in the getDirections method is to perform a forward geocode translation of the address Before doing so however it is necessary to declare a property in the MapItemViewController h file in which to store these coordinates once they have been calculated This will in turn require that the CoreLocation CoreLocation h file be imported Now is also an opportune time to import the MapKit MapKit h and AddressBook AddressBook h files both of which will be required later in the chapter import UIKit UIKit h import CoreLocation CoreLocation h import MapKit MapKit h import AddressBook AddressBook h interface MapItemViewController UIViewController property CLLocationCoordinate2D coords property strong nonatomic IBOutlet UITextField address property strong nonatomic IBOutlet UITextField city property strong nonatomic IBOutlet UITextField state property strong nonatomic IBOutlet UITextField zip IBAction getDirections id sender end Next select the MapItemViewController m file locate the getDirections method stub and modify it to convert the address string to geographical coordinates IBAction getDirections id sender CLGeocoder geocoder CLGeocoder alloc init NSString addressString NSString stringWithFormat address text city text state text zip text geocoder geocodeAddressString addressString completionHandler NSArray placemarks NSError error if error NSLog Geocode failed with error error return if placemarks placemarks count 0 CLPlacemark placemark placemarks 0 CLLocation location placemark location coords location coordinate self showMap The steps used to perform the geocoding translation mirror those outlined in Integrating Maps into iOS 7 Applications using MKMapItem with one difference in that a method named showMap is called in the event that a successful translation took place All that remains therefore is to implement this method Launching the Map With the address string and

    Original URL path: http://www.techotopia.com/index.php/An_Example_iOS_7_MKMapItem_Application (2016-02-13)
    Open archived version from archive


  • Getting Location Information using the iOS 7 Core Location Framework - Techotopia
    is called by the location manager and passed information about the current location The above code also therefore assigns the current class as the location manager s delegate Configuring the Desired Location Accuracy The level of accuracy to which location information is to be tracked is specified via the desiredAccuracy property of the CLLocationManager object It is important to keep in mind when configuring this property that the greater the level of accuracy selected the greater the drain on the device battery An application should therefore never request a greater level of accuracy than is actually needed A number of predefined constant values are available for use when configuring this property kCLLocationAccuracyBestForNavigation Uses the highest possible level of accuracy augmented by additional sensor data This accuracy level is intended solely for use when the device is connected to an external power supply kCLLocationAccuracyBest The highest recommended level of accuracy for devices running on battery power kCLLocationAccuracyNearestTenMeters Accurate to within 10 meters kCLLocationAccuracyHundredMeters Accurate to within 100 meters kCLLocationAccuracyKilometer Accurate to within one kilometer kCLLocationAccuracyThreeKilometers Accurate to within three kilometers Configuring the Distance Filter The default configuration for the location manager is to report updates whenever any changes are detected in the location of the device The distanceFilter property of the location manager allows applications to specify the amount of distance the device location must change before an update is triggered If for example the distance filter is set to 1000 meters the application will only receive a location update when the device travels 1000 meters or more from the location of the last update For example to specify a distance filter of 1500 meters locationMgr distanceFilter 1500 0f The distance filter may be cancelled thereby returning to the default setting using the kCLDistanceFilterNone constant locationMgr distanceFilter kCLDistanceFilterNone eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7 edition of this book in eBook 12 99 or Print 39 99 format iOS 9 App Development Essentials Print and eBook ePub PDF Kindle edition contains 105 chapters The Location Manager Delegate Location manager updates and errors result in calls to two delegate methods defined within the CLLocationManagerDelegate protocol Templates for the two delegate methods that must be implemented to comply with this protocol are as follows pragma mark pragma mark CLLocationManagerDelegate void locationManager CLLocationManager manager didUpdateToLocation CLLocation newLocation fromLocation CLLocation oldLocation Handle location updates void locationManager CLLocationManager manager didFailWithError NSError error Handle error Obtaining Location Information from CLLocation Objects Location information is passed through to the didUpdateLocation delegate method in the form of CLLocation objects A CLLocation object encapsulates the following data Latitude Longitude Horizontal Accuracy Altitude Altitude Accuracy Longitude and Latitude Longitude and latitude values are stored as type CLLocationDegrees and may be obtained from a CLLocation object as follows CLLocationDegrees currentLatitude location coordinate latitude CLLocationDegrees currentLongitude location coordinates longitude Accuracy Horizontal and vertical accuracy are stored in meters as CLLocationAccuracy values and may be accessed as follows CLLocationAccuracy verticalAccuracy location verticalAccuracy CLLocationAccuracy horizontalAccurcy location horizontalAccuracy Altitude The altitude

    Original URL path: http://www.techotopia.com/index.php/Getting_Location_Information_using_the_iOS_7_Core_Location_Framework (2016-02-13)
    Open archived version from archive

  • An Example iOS 7 Location Application - Techotopia
    event configured to call a method named resetDistance Select the LocationViewController h file verify that the outlets are configured correctly and add a property in which to store the start location coordinates and the location manager object Now is also an opportune time to import the CoreLocation CoreLocation h header file and to declare the class as implementing the CLLocationManagerDelegate protocol import UIKit UIKit h import CoreLocation CoreLocation h interface LocationViewController UIViewController CLLocationManagerDelegate property strong nonatomic IBOutlet UILabel latitude property strong nonatomic IBOutlet UILabel longitude property strong nonatomic IBOutlet UILabel horizontalAccuracy property strong nonatomic IBOutlet UILabel altitude property strong nonatomic IBOutlet UILabel verticalAccuracy property strong nonatomic IBOutlet UILabel distance property strong nonatomic CLLocationManager locationManager property strong nonatomic CLLocation startLocation IBAction resetDistance id sender end Creating the CLLocationManager Object The next task is to implement the code to create an instance of the CLLocationManager class Since this needs to occur when the view loads an ideal location is in the view controller s viewDidLoad method in the LocationViewController m file void viewDidLoad super viewDidLoad locationManager CLLocationManager alloc init locationManager desiredAccuracy kCLLocationAccuracyBest locationManager delegate self locationManager startUpdatingLocation startLocation nil The above code creates a new CLLocationManager object instance and configures it to use the best accuracy setting It then declares itself as the application delegate for the object The location manager object is then instructed to begin updating location information via a call to the startUpdatingLocation method Since location tracking has just begun at this point the startLocation object is also set to nil Implementing the Action Method The button object in the user interface is connected to the resetDistance action method so the next task is to implement that action All this method needs to do is set the startlocation object to nil void resetDistance id sender startLocation nil eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7 edition of this book in eBook 12 99 or Print 39 99 format iOS 9 App Development Essentials Print and eBook ePub PDF Kindle edition contains 105 chapters Implementing the Application Delegate Methods When the location manager detects a location change it calls the didUpdateToLocation delegate method Since the view controller was declared as the delegate for the location manager in the viewDidLoad method it is necessary to now implement this method in the LocationViewController m file pragma mark pragma mark CLLocationManagerDelegate void locationManager CLLocationManager manager didUpdateToLocation CLLocation newLocation fromLocation CLLocation oldLocation NSString currentLatitude NSString alloc initWithFormat 6f newLocation coordinate latitude latitude text currentLatitude NSString currentLongitude NSString alloc initWithFormat 6f newLocation coordinate longitude longitude text currentLongitude NSString currentHorizontalAccuracy NSString alloc initWithFormat 6f newLocation horizontalAccuracy horizontalAccuracy text currentHorizontalAccuracy NSString currentAltitude NSString alloc initWithFormat 6f newLocation altitude altitude text currentAltitude NSString currentVerticalAccuracy NSString alloc initWithFormat 6f newLocation verticalAccuracy verticalAccuracy text currentVerticalAccuracy if startLocation nil startLocation newLocation CLLocationDistance distanceBetween newLocation distanceFromLocation startLocation NSString tripString NSString alloc initWithFormat f distanceBetween distance text tripString Despite the apparent length of the method it actually performs some very simple tasks To begin with it extracts location and

    Original URL path: http://www.techotopia.com/index.php/An_Example_iOS_7_Location_Application (2016-02-13)
    Open archived version from archive

  • Working with Maps on iOS 7 with MapKit and the MKMapView Class - Techotopia
    example however two buttons will be required so drag and drop a second Bar Button Item from the Object Library panel onto the toolbar Double click on the toolbar button items and change the text to Zoom and Type respectively Figure 70 2 Select the view controller by clicking on the status bar containing the battery indicator so that the scene is highlighted in blue Select the Resolve Auto Layout Issues menu from the toolbar in the lower right hand corner of the storyboard canvas and select the Reset to Suggested Constraints in Map Sample View Controller menu option Select the MKMapView object in the view canvas display the Assistant Editor panel and verify that the editor is displaying the contents of the MapSampleViewController h file Ctrl click on the MKMapView object and drag to a position just below the interface line in the Assistant Editor Release the line and in the resulting connection dialog establish an outlet connection named mapView Click on the Zoom button to select it note that in order to select a toolbar button item it may be necessary to click on it twice since the first click selects the toolbar parent With the button item selected Ctrl click on the button object and drag the line to the area immediately beneath the newly created outlet in the Assistant Editor panel Release the line and within the resulting connection dialog establish an Action method on the Touch Up Inside event configured to call a method named zoomIn Repeat this step to connect the Type button to a method named changeMapType Select the MapSampleViewController h file from the project navigator panel and verify that the outlets and actions have been set up correctly Also take this opportunity to import the MapKit MapKit h file and to declare the class as implementing the MKMapViewDelegate protocol import UIKit UIKit h import MapKit MapKit h interface MapSampleViewController UIViewController MKMapViewDelegate property strong nonatomic IBOutlet MKMapView mapView IBAction zoomIn id sender IBAction changeMapType id sender end google ADSDAQBOX FLOW google Perform a test run of the application s progress so far by clicking on the Run button in the Xcode toolbar The application should run in the iOS simulator as illustrated in Figure 70 3 Figure 70 3 Configuring the Map View By default the Map View does not indicate the user s current location By setting the showsUserLocation property of the MKMapView class the map is instructed to display a representation of the current location on the map in the form of a blue translucent ball In order to set this property select the MapSampleViewController m file and locate and modify the viewDidLoad method as follows void viewDidLoad super viewDidLoad mapView showsUserLocation YES eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7 edition of this book in eBook 12 99 or Print 39 99 format iOS 9 App Development Essentials Print and eBook ePub PDF Kindle edition contains 105 chapters Changing the MapView Region When the Zoom button

    Original URL path: http://www.techotopia.com/index.php/Working_with_Maps_on_iOS_7_with_MapKit_and_the_MKMapView_Class (2016-02-13)
    Open archived version from archive

  • Working with MapKit Local Search in iOS 7 - Techotopia
    and opening the MapSample project created in the previous chapter Adding the Local Search Text Field google ADSDAQBOX FLOW google With the project loaded into Xcode select the Main storyboard file and modify the user interface to add a Text Field object to the user interface layout reducing the height of the map view object accordingly to make room for the new field With the new text Field selected display the Attributes Inspector and enter Local Search into the Placeholder property field When completed the layout should resemble that of Figure 71 1 Figure 71 1 Select the Map Sample view controller by clicking on the status bar containing the battery indicator so that the scene is highlighted in blue Select the Resolve Auto Layout Issues menu from the toolbar in the lower right hand corner of the storyboard canvas and select the Reset to Suggested Constraints in Map Sample View Controller menu option When the user touches the text field the keyboard will appear By default this will display a Return key For the purposes of this application however a Search key would be more appropriate To make this modification select the new Text Field object display the Attributes Inspector and change the Return Key setting from Default to Search eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7 edition of this book in eBook 12 99 or Print 39 99 format iOS 9 App Development Essentials Print and eBook ePub PDF Kindle edition contains 105 chapters Next display the Assistant Editor panel and make sure that it is displaying the content of the MapSampleViewController h file Ctrl click on the Text View object and drag the resulting line to the Assistant Editor panel and establish an outlet named searchText Repeat the above step this time setting up an Action for the text Field to call a method named textFieldReturn for the Did End on Exit event On completion of these steps the MapSampleViewController h file should read as follows import UIKit UIKit h import MapKit MapKit h interface MapSampleViewController UIViewController MKMapViewDelegate property strong nonatomic IBOutlet UITextField searchText property strong nonatomic IBOutlet MKMapView mapView IBAction zoomIn id sender IBAction changeMapType id sender IBAction textFieldReturn id sender end The textFieldReturn method will be required to perform three tasks when triggered In the first instance it will be required to hide the keyboard from view When matches are found for the search results an annotation will be added to the map for each location The second task to be performed by this method is to remove any annotations created as a result of a previous search Finally the textFieldReturn method will initiate the search using the string entered into the text field by the user Select the MapSampleViewController m file locate the template textFieldReturn method and implement it so that it reads as follows IBAction textFieldReturn id sender sender resignFirstResponder mapView removeAnnotations mapView annotations self performSearch Performing the Local Search The next task is to write the code

    Original URL path: http://www.techotopia.com/index.php/Working_with_MapKit_Local_Search_in_iOS_7 (2016-02-13)
    Open archived version from archive

  • Using MKDirections to get iOS 7 Map Directions and Routes - Techotopia
    named nameLabel and phoneLabel respectively On completion of these steps the file should read as follows import UIKit UIKit h interface ResultsTableCell UITableViewCell property strong nonatomic IBOutlet UILabel nameLabel property strong nonatomic IBOutlet UILabel phoneLabel end Next edit the ResultsTableViewController h file and modify it to import the ResultsTableView h and MapKit files and to declare an array into which will be placed the MKMapItem objects representing the local search results import UIKit UIKit h import MapKit MapKit h import ResultsTableCell h interface ResultsTableViewController UITableViewController property strong nonatomic NSArray mapItems end Next edit the ResultsTableViewController m file and modify the data source and delegate methods so that the table is populated with the location information when displayed removing the warning lines during the editing process pragma mark Table view data source NSInteger numberOfSectionsInTableView UITableView tableView Return the number of sections return 1 NSInteger tableView UITableView tableView numberOfRowsInSection NSInteger section Return the number of rows in the section return mapItems count UITableViewCell tableView UITableView tableView cellForRowAtIndexPath NSIndexPath indexPath static NSString CellIdentifier resultCell ResultsTableCell cell tableView dequeueReusableCellWithIdentifier CellIdentifier forIndexPath indexPath long row indexPath row MKMapItem item mapItems row cell nameLabel text item name cell phoneLabel text item phoneNumber return cell With the results table view configured the next step is to add a segue from the first scene to this scene Implementing the Result Table View Segue Select the Main storyboard file and drag and drop an additional Bar Button item from the Object Library to the toolbar in the Map Sample View Controller scene Double click on this new button and change the text to Details Figure 72 3 Click on the Details button to select it it may be necessary to click twice since the first click will select the Toolbar Establish a segue by Ctrl clicking on the Details button and dragging to the Results Table View Controller and select push from the Action Segue menu Edit the MapSampleViewController h file and import the ResultsTableViewController h file as follows import UIKit UIKit h import MapKit MapKit h import ResultsTableViewController h interface MapSampleViewController UIViewController MKMapViewDelegate property strong nonatomic NSMutableArray matchingItems property strong nonatomic IBOutlet UITextField searchText property strong nonatomic IBOutlet MKMapView mapView IBAction zoomIn id sender IBAction changeMapType id sender IBAction textFieldReturn id sender end When the segue is triggered the mapItems property of the ResultsTableViewController instance needs to be updated with the array of locations created by the local search This can be performed in the prepareForSegue method which needs to be implemented in the MapSampleViewController m file as follows void prepareForSegue UIStoryboardSegue segue sender id sender ResultsTableViewController destination segue destinationViewController destination mapItems matchingItems With the Results scene complete compile and run the application on an iOS device Perform a search for a business type that returns valid results before selecting the Details toolbar button The results table should subsequently appear Figure 72 4 listing the names and phone numbers for the matching locations Figure 72 4 eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7

    Original URL path: http://www.techotopia.com/index.php/Using_MKDirections_to_get_iOS_7_Map_Directions_and_Routes (2016-02-13)
    Open archived version from archive

  • Using iOS 7 Event Kit to Create Date and Location Based Reminders - Techotopia
    YES error error The above code creates a new EKReminder object and in so doing associates it with the event store before setting the title of the reminder Next the reminder is configured so that it will be added to the user s default reminder calendar before being saved to the event store Reminders can be general as in the above example or as will be demonstrated in the following tutorial configured to be triggered at a specific date and time or when the user arrives at or departs from a physical geographical location a concept known as geofencing Creating Alarms The EKAlarm class can be used to add an alarm to the reminder Alarms can be specified either using a specific date and time via a call to alarmWithAbsoluteDate and passing through an NSDate object or using a relative time interval via a call to alarmWithRelativeOffset passing through an NSTimeInterval value Once an EKAlarm object has been created and configured it must be added to the EKReminder object with which the alarm is to be associated When the specified time arrives the user will be notified of the reminder with sound vibration and a notification panel Creating the Example Project Begin by launching Xcode and selecting the options to create a new iOS application based on the Tabbed Application template Enter ReminderApp as the product name and class prefix and set the device to iPhone In the remainder of this chapter an application will be constructed designed to allow the user to add reminders based on either date time or location factors Designing the User Interface for the Date Time Based Reminder Screen Upon reviewing the Main storyboard file it is clear that Xcode has created a template based tabbed application consisting of Tab Bar Controller and two Views each of which has its own view controller For the purposes of this example the first view will be used to implement a screen whereby the user can create a new date and time based reminder Within the Storyboard canvas therefore locate the Reminder App First View screen and remove the current label and text view objects that were added by Xcode With a clean view add a Text Field Date Picker and Button object to the view canvas Once added position and configure the user interface layout so that it resembles that of Figure 73 3 Figure 73 3 Select the Text Field object and display the Assistant Editor using View Assistant Editor Show Assistant Editor menu option making sure that it is displaying the content of the ReminderAppFirstViewController h file If it is not click on the file name in the bar at the top of the Assistant Editor panel and select the file from the drop down menu Ctrl click on the Text Field object in the view and drag the resulting line to the area immediately beneath the interface directive in the Assistant Editor panel Upon releasing the line the configuration panel will appear Configure the connection as an Outlet named reminderText and click on the Connect button Repeat this step to add an outlet connection to the Date Picker object named myDatePicker Finally Ctrl click on the Button object drag the line to the Assistant Editor and release it beneath the last outlet connection added In the resulting connection panel change the connection type to Action and name the action setReminder Implementing the Reminder Code With the user interface view designed the next step is to implement the code in the view controller for the first view to access the event store and set up the reminder We will need a place to store the event store object once it has been requested and as previously discussed it is recommended that access to the event store be requested only once As such we will need a location to store the reference once it has been obtained so select the ReminderAppFirstViewController h file and add an additional property This is also an opportune time to import the EventKit framework headers import UIKit UIKit h import EventKit EventKit h interface ReminderAppFirstViewController UIViewController property strong nonatomic EKEventStore eventStore property strong nonatomic IBOutlet UIDatePicker myDatePicker property strong nonatomic IBOutlet UITextField reminderText IBAction setReminder id sender end Within the project navigator select the ReminderAppFirstViewController m file locate the setReminder template stub and add the following code IBAction setReminder id sender if eventStore nil eventStore EKEventStore alloc init eventStore requestAccessToEntityType EKEntityTypeReminder completion BOOL granted NSError error if granted NSLog Access to store not granted if eventStore nil self createReminder eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7 edition of this book in eBook 12 99 or Print 39 99 format iOS 9 App Development Essentials Print and eBook ePub PDF Kindle edition contains 105 chapters The code added to the method verifies that access to the event store has not already been obtained and in the event that it has not requests access to the reminder calendars If access is denied a message is reported to the console In the event that access is granted a second method named createReminder is called With ReminderAppFirstViewController m still in the editing panel implement this method void createReminder EKReminder reminder EKReminder reminderWithEventStore self eventStore reminder title reminderText text reminder calendar eventStore defaultCalendarForNewReminders NSDate date myDatePicker date EKAlarm alarm EKAlarm alarmWithAbsoluteDate date reminder addAlarm alarm NSError error nil eventStore saveReminder reminder commit YES error error if error NSLog error error The createReminder method creates a new EKReminder object associated with the event store and sets the title property to the content of the Text Field object in the user interface The code elects the default calendar as the target for the reminder and then creates an EKAlarm object primed with the date value selected by the user in the Date Picker object The alarm is then added to the reminder which in turn is saved in the event store Errors are output to the console for debugging purposes Hiding the Keyboard

    Original URL path: http://www.techotopia.com/index.php/Using_iOS_7_Event_Kit_to_Create_Date_and_Location_Based_Reminders (2016-02-13)
    Open archived version from archive

  • Accessing the iOS 7 Camera and Photo Library - Techotopia
    via the allowsEditing boolean property The following code creates a UImagePickerController instance and configures it for camera use with movie and image support and editing allowed It then displays the controller and releases the controller object UIImagePickerController imagePicker UIImagePickerController alloc init imagePicker delegate self imagePicker sourceType UIImagePickerControllerSourceTypeCamera imagePicker mediaTypes NSString kUTTypeImage NSString kUTTypeMovie imagePicker allowsEditing YES self presentViewController imagePicker animated YES completion nil It should be noted that the above code also configured the current class as the delegate for the UIImagePickerController instance This is actually a key part of how the class works and is covered in the next section Configuring the UIImagePickerController Delegate When the user is presented with the UIImagePickerController object user interface the application essentially hands control to that object That being the case the controller needs some way to notify the application that the user has taken a photo recorded a video or made a library selection It does this by calling delegate methods The class that instantiates a UIImagePickerController instance should therefore declare itself as the object s delegate conform to the UIImagePickerControllerDelegate and UINavigationControllerDelegate protocols and implement the didFinishPickingMediaWithInfo and imagePickerControllerDidCancel methods When the user has selected or created media the didFinishPickingMediaWithInfo method is called and passed an NSDictionary object containing the media and associated data In the event that the user cancels the operation the imagePickerControllerDidCancel method is called In both cases it is the responsibility of the delegate method to dismiss the view controller void imagePickerController UIImagePickerController picker didFinishPickingMediaWithInfo NSDictionary info Code here to work with media self dismissViewControllerAnimated YES completion nil void imagePickerControllerDidCancel UIImagePickerController picker self dismissViewControllerAnimated YES completion nil The info argument passed to the didFinishPickingMediaWithInfo method is an NSDictionary object containing the data relating to the image or video created or selected by the user The first step is typically to identify the type of media NSString mediaType info UIImagePickerControllerMediaType if mediaType isEqualToString NSString kUTTypeImage Media is an image else if mediaType isEqualToString NSString kUTTypeMovie Media is a video eBookFrenzy com Purchase the fully updated iOS 9 Swift 2 Xcode 7 edition of this book in eBook 12 99 or Print 39 99 format iOS 9 App Development Essentials Print and eBook ePub PDF Kindle edition contains 105 chapters The original unedited image selected or photographed by the user may be obtained from the info dictionary as follows UIImage image info UIImagePickerControllerOriginalImage Assuming that editing was enabled on the image picker controller object the edited version of the image may be accessed via the UImagePickerControllerEditedImage dictionary key UIImage image info UIImagePickerControllerEditedImage If the media is a video the URL of the recorded media may be accessed as follows NSURL url info UIImagePickerControllerMediaURL Once the image or video URL has been obtained the application can optionally save the media to the library and either display the image to the user or play the video using the MPMoviePlayer class as outlined in the chapter entitled Video Playback from within an iOS 7 Application Detecting Device Capabilities Not all iOS devices

    Original URL path: http://www.techotopia.com/index.php/Accessing_the_iOS_7_Camera_and_Photo_Library (2016-02-13)
    Open archived version from archive



  •