iphone

How do I use the SQLite3 import command using the C API?

I have the following code: int rc; rc = sqlite3_exec(sqlite3_database, ".import mydata.csv mytable", callback, 0, &errMsg); After this gets run, errMsg contains this error message: near ".": syntax error I assume that it does not recognize the import command. However, this command works when running it from the sqlite3 program on t...

How to release memory created from CFStringTokenizerCreate?

I use CFRelease to release the CFStringTokenizerRef obtained from CFStringTokenizerCreate call. But instruments is reporting memory leak at around this area. Am I missing something? CFStringTokenizerRef tokenRef = CFStringTokenizerCreate(NULL, (CFStringRef)contents, ...

Parse Query String into a Structured NSDictionary

I have a query string: a=1&b=2&c[1]=3&c[2]=4 etc… I want a NSDictionary where a => 1, b => 2, c => [3,4]. Notice that that the value for c is an array. It should also be able to handle something like c[1][2]=5 to make an array of arrays c => [[5]]. Of course I can do it myself by splitting on the & and =, but what about other cases s...

Xcode: Build architecture specific per file compiler build settings

Hello, in my iPhone project I am using some inline asm, which is excluded if the target architecture is the device and not the simulator. Since some of the inline asm code is arm only and not thumb I need to specify the c flag -marm when compiling it for the iPhone, since it otherwise trys to compile the code with the thumb instruction...

Xcode and Generate Debug Symbols

Which setting in Project Settings page needs to be set in order for Xcode to generate debug symbols for a project? If I set 'Generate Profiling Code" to checked, as soon as I try to build, I get the error, cc1obj: error: unrecognised debug output level "-full" If not, the other way to do this I thought was by setting the 'OTHER...

create multiple images view like the photo app iphone sdk

Hello guys, How can create a view with mutiple images, something similiar to the photo app on the iphone? THanks ...

How to copy items from Documents directory to .app directory in iPhone App?

Hi guys! I have created a script that save some files in the Documents directory of my app! Now I need to copy these files in my "application.app" directory... How I can do this?? Thanks to everyone that can help me! :) ...

iphone SDK: How to get the date out of a UIDatePicker?

I need to retrieve the date from a UIDatePicker (Preferably I would also like to be specify the format as well. For example, mmdd would output the string 1209. Any string that reasonably parsed would work as well. Thanks in advance. ...

Draw selected areas of a UIImage

I have a UIImage containing an image with a whole bunch of smaller pictures on the image (essentially an image strip containing sprites). I'd like to draw a single sprite onto an area of my UIView. I can't seem to find a way draw only part of the UIImage onto the view. Is there a method that does this? ...

How do I load a UIViewController from a NIB with placeholders?

I have a UIViewController that I want to load from a NIB that has a proxy (placeholder) object defined in it. The first time I load it, I go through this rigamarole: MyViewController *screen = [[MyViewController alloc] init]; NSDictionary *proxyDict = [NSDictionary dictionaryWithObject:myObject forKey:@"MyProxy"]; NSDictionary *option...

iPhone/Cocoa Touch - problem with multithreading (Stanford Presence 3 project)

I have been solving the Stanford free iPhone course project called Presence 3 (found on the stanford site: www.stanford.edu/class/cs193p/cgi-bin/downloads.php, which pulls data from twitter for users, which are stored in a plist. A UIActivityIndicator (spinner) is visible while the data is loading. Once the data has been loaded, a TableV...

.Net Apple Push Notification service Provider?

I started to write a provider for APNs in .Net today, and it seems I've hit a brick wall... Everything I'm finding about securing sockets says that a System.Net.Sockets.Socket cannot implement SSL. I'm fairly new to raw sockets programming...does anyone know of a way to connect a raw socket to a server over SSL? ...

OpenGL ES. Scrolling 3 layer starfield textures gets me from 60 -> 40 FPS

I need to draw the background for a 2D space scrolling shooter. I need to implement 3 layers of stars: one distant nebula (moving really slow) in the background, one layer of far away stars (moving slow) and one layer of close stars (moving normal) on top of the other two. The way i first tried this was using 3 textures of 320 x 480 tha...

How to play next video in MPMoviePlayer?

I have implement an application.In which there is list of videos.when user touch on the video then video play in MPMoviePlayer.But when video is finished then i want to play another video automatically.Is it possible? ...

Set the accessibility attributes on UIBarButtonItem

I am working on making my iPhone app accessible. I have several UIBarButtonItem objects in Interface Builder, and I cannot find any option to set the accessibility label or hint for these buttons. How can I set these attributes? ...

How to load a WebView on local files, but external to mainBlundle? (iPhone App)

Hi guys! I have written a script that download some HTML files into the Documents folder of my app! I want to load this files in my WebView, is that possible? For example: If index.html is present in Documents folder, load it, else load index.html in mainBundle! Thanks to everyone can help me! ...

Loading Multiple Movies in iPhone MPMoviePlayerController

-(void)initAndPlayMovie:(NSURL *)movieURL { // Initialize a movie player object with the specified URL MPMoviePlayerController *mp = [[MPMoviePlayerController alloc] initWithContentURL:movieURL]; if (mp) { self.moviePlayer = mp; [mp release]; [self.moviePlayer play]; } } Here, In above code, We can pa...

Pointer to Pointer to UIImage created by NSURLConnection

Hey all, here's the deal... I've got a UIImage that is being loaded in the background via an NSURLConnection within a subclassed UIImageView. Until the data finishes downloading, a placeholder image is shown. The UIImage needs to be used by another, separate UIImageView, as well. The problem I'm having is that if I set the second UIIm...

How to get the add editing controls in a uitableviewcell to track touches

Is there a way to get the add (the green circle with the white plus) editing control to track touches. The contacts program for example allows the user to touch either the cell itself or the circles on the left to carry out the add action. Unfortunately, I don't get the same behaviour when I edit my tableViewCells. Only touches on the ta...

iPhone Dev - How to Access NSHTTPCookie Later in App?

I am using my App to login to a website and access information from there. I have a few questions... I am using multiple files / screens to access information after I have logged in. On the page which does the login, I am able to output all the Cookie data to an NSLog. The Cookie consists of a SESSIONID. I am then able to navigate throu...