iphone

Saving an image to the users preferences

Has anyone had any experience in saving app preferences (within app, not in Settings app) which involve images taken with the camera? The prefs include NSStrings, UIImage, BOOLs etc. The UIImage is a pic taken with camera. Could I store these all in an NSMutableArray and then just do something like this: [array writeToFile:[self dataF...

On iPhone, what is the best way to move a UIImageView with onscreen controls?

Hi, I am developing an iPhone version of this game. http://www.students.uni-mainz.de/rathb000/Fillit/Game.html I am using an NSTimer to change the position of the ship by 1 pixel and the time interval for the timer is 0.002. However, i have noticed that the ship doesnt move faster if i reduce the time interval furthur. Infact, there...

How do I enable more handshake ciphers in CFStream?

When running the method: CFReadStreamSetProperty(theReadStream, kCFStreamPropertySSLSettings (CFDictionaryRef)tlsPacket->tlsSettings); To secure the connection of a CFReadStream, my iphone client returns the error: Error Domain=kCFStreamErrorDomainSSL Code=-9824 "Operation could not be completed. (kCFStreamErrorDomainSSL error -9824...

How to scroll to tableview row?

I have a UIViewController (named VC) that inherits from UITableViewDelegate and UIScrollViewDelegate. The previous UIViewController loads VC like this: [self.view addSubview:VC.view]; which means viewWillAppear doesn't fire. I can add that method just after the above line: [VC viewWillAppear]; but then it will fire before cellForR...

Calling a method in a subView

Hey guys! I have this little problem: I have one ViewController which adds 2 subViews in my ViewController so I have something like this: //in my viewController.m i have this: - (void)startIcons { IconHolder *newIconHolder = [[IconHolder alloc] initWithItem:@"SomeItenName"]; [self.view addSubview:newIconHolder]; } - (void)onPre...

Tab Bar Item Images Invisible in MoreNavigationController with Black Background

I have a Tab Bar (UITabBarController) application with a "More" View Controller because of having more than 5 views. The rest of my application has a black background and white text, and I have been able to customize this table to match this. As a result of this however, the Tab Bar images that normally appear on the left side of the "Mo...

iPhone: retrieve contents of "documents" directory

Hi, Are there any development tools to access contents of the "documents" directory on iPhone? I'd like to access SQLITE database that was created by my application in order to fix some bugs. Thanks. ...

Changing angle when ball hits paddle

I'd like to deflect a ball at an angle depending on where it hits a paddle. Right now, I'm only changing the y coordinate, which results in an uninteresting deflection. It will angle but independent on impact location against the paddle. I'd like something more fun. Speed, momentum, mass and other factors don't need to be taken into co...

Browsing Source Code on an iPhone

I'm the kind of dork who enjoys reading source code in his spare time. I'm also the kind of dork who has an iPhone. What is the best way to read and browse code on such a device? My initial thought is to use something like LXR to generate hyperlinked pages, and upload them to my personal server, but I am interested in better/easier ways...

Filtering characters entered into a UITextField

I have a UITextField in my application. I'd like to restrict the set of characters that can be can be entered into the field to a set that I have defined. I could filter the characters entered into the field when the text is committed using the UITextFieldDelegate method: - (BOOL)textFieldShouldReturn:(UITextField*)textField However, ...

Managing multiple views and interactions

I have a table that contains 4 varying types of data and depending on the type of data that is selected by the user, a specific edit view is shown. One of these views has one edit field, a second one has 2 edit fields, a third one uses a picker, and so on. What's the best way to handle these varying views without an explosion of classes ...

Playing URL of MP3 from iPhone

I am trying to find the best way to play a URL of an mp3. I've tried Audiostreamer but it doesn't fit my needs as it's geared towards infinite streams, and not finite streams. Any help is appreciated! Thanks! ...

How to play a tone on iPhone

Is it possible to easily play a tone, or series of tones on the iPhone (like morse code, beep beeeeeep beep)? Is there any sample code out there that would point me in the right direction? (I remember on the Commodore 64 it was about 4 lines of code !) ...

How to play video from application bundle in iPhone

Hi All, I have a video in my iPhone application documents directory. I am want to play that using mpmovieplayercontroller. can some one post code to do this. Thanks, Naresh ...

iPhone Accelerometer crashes app

I have an navigation-based app that I want to use the accelerometer to detect a shake and cause a scroll view to scroll to the next page. I have added accelerometer code to the view controller of my scrollView, and it works great; a shake calls my page change method. But when I unload the scrollViewController from the navigation stack th...

ad hoc distribution on ipod touch.

I am developing a game for the iPhone and have at least 8 people to beta test for me using ad-hoc distribution. I created a provisioning file with all of there phones id's and built my app using that provisioning file. I emailed out the app and that mobileprovisioning file to the people. Three of them have ipod touch devices. It seems t...

Objective-C Safari Fails - Too Many Redirects - LinkSynergy - iPhone

So, I'm working on an iPhone application that I hope to make my money off of via redirects to iPhone games using Apple's link synergy program. Problem is, the links are generating too many redirects and safari is saying "Safari can't open the page because too many redirects occurred". My code is quite simple: NSURL *toOpen=[NSURL URLW...

App that makes phone calls and stores data for iphone, Android and blackberry?

Hi, The app I'd like to build aims at giving contact information of a person using a search engine. This is the basic feature. To make it more appealing, I'd like to add those enhancement features: (1) allowing making a phoning call to the contact (when pressing a button for ex.) (2) allowing the user to store contact information th...

Customizing the iPhone keyboard

Is there a way to modify or make your own iPhone keyboard so that you can type in unsupported languages? ...

NSMutableArray. What is the fastest way to convert it to a plain ole C-array

I like the convenience of NSMutableArray but sometimes you just need to drop down to good ole C-arrays. Like when you are feeding interleaved vertex arrays to OpenGL. What is the fastest way of copying the contents of an NSMutableArray to a C-array? Yah, I realize this bit shuffling introduces inefficiency but I'd like to see if I can...