iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

MPVolumeView in a UIAlertView?

Is it possibe to put an MPVolumeView in a UIAlertView? I have tried to put it inside of it, but it does not display. It may be the sizeToFit or initWithFrame: part? Is there a way of testing if the MPVolumeView is actually being created? Here’s the code I initialize both the UIAlertView and MPVolumeView […]

Want to add event in google calendar

I want to insert event in google calendar without using any third parties. Please help me if any one know it. Thanks in advance.

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 […]

What about this mailto: openURL might be causing a this malloc crash?

I’m using openURL to send an email w/some links. The function looks like this: // + (void) sendEmail:(NSString *) subject withBody:(NSString *)body { NSString *mailString = [NSString stringWithFormat:@”mailto:?@&subject=%@&body=%@”, [subject stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding], [body stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:mailString]]; [mailString autorelease]; } The code that calls this function looks like this: [AppNameAppDelegate sendEmail:subjectLine withBody:bodyText]; No matter what the […]

iPhone: UITabBar custom image doesn't work

I use the following UITTabBar and UINavigationBar built-in code to place my own custom image on the background of Tabbar and Navigation bar. It works great in my iPhone 3.0 application. Now, i am trying to convert my iPhone 3.0 application to iOS4.0. I ran the same project in Xcode 3.2.3(for iOS 4.0) now but […]

How to populate a custom uitableview from a textfield

I created three textfields food name, food quantity, sodium amount. When I click the submit button I’d like to update a tableview with the data from the textfields. I created an NSObject as well as established logs to show the data is being saved from the textfield and the submit will move to the tableview […]

How can i connect MySQL database with objective project?

I want to connect MySQl database with my iphone application.Read, write, save some data into the database.How can i do this.

NSFetchedResultsController crashes on objectAtIndexPath?

I’m getting a crash when trying to access an object in NSFetchedResultsController. 2013-11-10 15:15:06.568 Social[11503:70b] CoreData: error: Serious application error. Exception was caught during Core Data change processing. This is usually a bug within an observer of NSManagedObjectContextObjectsDidChangeNotification. *** -[__NSArrayI objectAtIndex:]: index 2 beyond bounds for empty array with userInfo (null) 2013-11-10 15:15:06.570 Social[11503:70b] *** […]

MASSIVE AVAudioPlayer Memory Leaks

I am using AVAudioPLayer to do the audio for my game. I have the following code in a method in a seperate class, which is called every time I want the ‘boing’ sound to play. Problem is, it leaks huge amounts of memory, to the point where the game becomes unplayable. Now i’m not releasing […]

Load PDF from documents directory – iPhone

Instead of loading a PDF from the resources folder I would like to load it from the documents directory. I have been trying to do this for days but the CGPDFDocumentRef keeps returning NULL. Here is my code: // Get Documents Directory NSArray *searchPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectoryPath = [searchPaths objectAtIndex:0]; NSString *tempPath […]