Tag: xcode

Why is my NSOutlineView datasource nil?

This is a follow-on question from my previous one relating to why my managedObjectContext was returning to nil. I thought the direction of the question would get buried in the old one. I now get my mangedObjectContext to not return nil and when performing [outlineView reloadData], nothing at all happens to my outlineView. I tried […]

ModalViewController loading on top of another Modal

There may be a better way to do this, and please direct me if there is. I’m creating an UIImagePickerController with an overlayView in viewDidAppear for ‘choose from library’, ‘take photo’, ‘flash’ ‘camera source’, etc. // Set up the camera imagePicker = [[UIImagePickerController alloc] imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; imagePicker.delegate = self; imagePicker.cameraOverlayView = [self cameraOverlayView]; cameraOverlayView.backgroundColor […]

Delete row from table and sqlite database

I still need your help. I have this piece of code that doesn’t want to work. -(void)tableView:(UITableView *)_tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { if (editingStyle == UITableViewCellEditingStyleDelete) { NSDictionary *rowVals = (NSDictionary *) [shoppingListItems objectAtIndex:indexPath.row]; NSString *keyValue = (NSString *) [rowVals objectForKey:@”key”]; [tableView beginUpdates]; sqlite3 *db; int dbrc; //Codice di ritorno del database (database return code) […]

iOS 7 XCode 5 Storyboard set orientation to Landscape

I have set the allowed orientation on the project settings to Landscape only. Now I want to design on the storyboard, but the storyboard is portrait, I only support Landscape so I try to make the storyboard orient on landscape, I go to Simulated Metrics, and I didn’t see anything that says “orientation”, just ViewController […]

Preprocessor Timestamp

Is it possible to generate an embedded Unix timestamp via a preprocessor macro? For instance: #define VERSION_EXPIRE __TIMESTAMP__ The reason for this is, that i have beta versions and i want to generate an expire timestamp on compile time (in a special build configuration).

how to test MFMailComposeViewController in simulator

Is there a way to test sending emails from MFMailComposeViewController in iphone simulator ?

Way to Prepopulate Core Data with Certain Data

Usually I populate my core data with data from internet. But say I want to prepopulate it with data without downloading it from internet. Say I want to store all cities, or all tags first. What would be the standard way to do so? Should I store the cities on plist? Should I hardcode inserting […]

Failed to install iphone application for ad hoc

I followed the stepped to create a ad hoc carefully: Added the testers team devices to the devices list in iOs Provisioning profile page Created a new distribution profile for ad-hoc In xcode I chose the project and clicked on product->archive. I sent both the archive (ipa file) and mobile provision to the testers team. […]

SearchDisplayController search multiple arrays

Currently I’m populating my tableviewcells with the contents of multiple arrays representing a name, id, etc. My question comes when I start to use the search display controller. I have an array with a list of names, a list of IDs, a list of barcodes, and a list of Aliases. When the user types in […]

Convert distance on MKMapView to distance for UIView

How do I convert distance (for example 400 meters) on MKMapView to distance for UIView? I want to show MKAnnotationView that depends on current zoom level on MKMapView.