iphone

Where can I find info on using a Universal App on iPhone that uses UISplitViewController ?

Hi, I've followed all posts that I've found about creating a Universal App that uses a UISplitViewController and runs fine on iPhone (without it, of course) and in iPad. My Targeted Device Familiy is => iPhone/iPad iPhone OS Deployment => iPhone OS 3.0 Base SDK => iPhone Device 3.2 My UIKit.framework is 'weak ref' in my Target General...

How can I avoid a leak with this block-based animation sequence?

I'm working on animating little subviews throughout my UI using a flip transition. To get the Flip transition to work correctly, I create a temporary UIView to provide the context, run the transition, and then need to clean up afterwards. But I'm having trouble figuring how to release the object without crashing the application. Here's t...

Dealing with international phone numbers on iPhone

I have an app which uses contact data in the following ways: To send an SMS from the client To send an SMS from our server To upload a user's phone number to a database where others can match against it This works fine in the U.S. but internationalizing has a set of issues. These are my assumptions for making it work: #1 - Sending a...

Obj-C: retainCount > 1 in dealloc method?

If a retain (reference) count of an object is greater than 1 in a dealloc method right before releasing does this mean there will be a memory leak? I was debugging my code to find another issue but then ran into this subtle one. One of my object's retain counts was 3 in the dealloc method. This object is a property with retain and is ...

recommended image resource to display sprite

I have some images which I would like to use as sprites in my game. What is the best way to do this. I know .png , but Should the background be white, black, does the image, e.g. the character image , need to be "cut" out along its edges? Thanks in advance. ...

Implement badge notification on my app

Hi I am new to iphone Notification. In my app, I am displaying RSS Feed contents and whenever changes happening in server side of RSS Feeds, then I want to show the notification on top of application icon with number badge and also this number should be based on number of feeds changed ( This is changes may be a Addition/Deletion/update...

How do you load a local jpeg or png image file into an iPhone app?

Or I should ask why is it so difficult for me? The answer is probably that I'm new to iPhone development and I'm trying to ditch my old methods and step into the new platform of the future. From start to finish, I have a few questions about this process... If I create a .png image, where does it go in my project's directory (i.e. my ...

Core Data migration: File Exists

I am getting the following error from some users while performing a lightweight Core Data migration on iPhone: { NSUnderlyingError = Error Domain=NSPOSIXErrorDomain Code=17 UserInfo=0x2991d0 "Operation could not be completed. File exists"; destinationURL = file://localhost/var/mobile/Applications/AEFD8CE2-0AF6-4227-AB84-73E2F5D83F26/Doc...

Why NSString says it is "Invalid", objC, IPhone?

I have a ViewController, i declare NSString *xTitle at the top in testViewController.m file when i set the xTitle=@"anytext" in viewload event; and i tap a button, it shows the UIActionsheet. i try to read xTitle in UIActionSheet's clickedButtonAtIndex. i see the xTitle's value "anytext", its ok. but when i set the xTitle from NSDic...

iPhone SDK4.0 and xcode 3.2.3 issue

My app was building and running well in xcode 3.2.2 with iPhone SDK 3.1.3. Now, I upgraded the SDK to 4.0 with xcode 3.2.3 and tried running the app. All I could see there after in the iPhone Simulator 4 is the opening splash screen (Default.png) followed by a BLANK BLACK screen. This is driving me nuts. No change in code yet, the app fa...

iPhone TabBarController switching with selectedViewController doesn't show the view

I'm getting crazy on this. I've got a TabBarController with threw viewController and it's working ok in my app when I push the selection on the items. When I try to call self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:2]; (index 2 exists and the problem is with the index 1 too), I s...

iOS Question. Can I distribute the Xcode simulator versions of my app?

I would like to send someone the Xcode simulator version - not the device version - of my iPad app. I have located the .app file in the Finder. Do I just zip it up and send it off or is it more complicated than that? Thanks, Doug UPDATE Chrisbtoo got the answer on this one however he left of some critical bits for those of you trying ...

How can I sense the user is holding down their finger on the screen without moving?

The best method I can think of is to start a timer in the touchesBegan event method. If the timer expires before the touchesEnded event arrives, then you know the user is holding down on the screen. If the touchesMoved event is called, then simply reset the timer so as to only detect holding down without movement. Is there any functi...

Calling navcontroller from another .m file

Hello, I have a application, and had to create another .h and .m file. This is so my downloads will be down in the background .h File #import <UIKit/UIKit.h> @interface AsynchronousImageView : UIImageView { NSURLConnection *connection; NSMutableData *data; } - (void)loadImageFromURLString:(NSString *)theUrlString; @end A...

Why do the code templates not work for me in Xcode?

I'm having trouble with my source code templates. When I start typing a switch statement, there's no code completion for me. On another machine, this works perfectly. Just not on mine. Actually, typing switch should result in an code completion or template in the form switch ( xxxxx ) { case:x break; case:x break; default: ...

How do I get a replacement development certificate's p12 file?

My Mac hard disk crashed, put a new hard disk and reinstalled OS, xcode, but not able to build my app for device target since the certificate does not work any more. I could have used the p12 file but unfortunately I lost it. So, what's next? How do I update my app which is there in app store? I need to smoke now :( ...

encoding string for URL problem!

I have to POST data to a php page from an Iphone application, so i need to encode the parameters properly, converting the special characters... Specifically i need to send the UDID of the iphone. I've found many helps on the web to encode the String to pass as parameter, but i got a strange error. I'm using this function: - (NSString...

App design: UITabBarController within UINavigationController

I have a very specific application design that I'm trying to figure out how to create with iOS 4. Here's how it works: The user selects an installed data set, or triggers a data set download. The user provides a key for decrypting the data set. A tab bar is shown with different search options for looking at the data. There are more se...

webViewDidFinishLoad: Missing Protocol?

Can anyone just clarify this for me, I was under the impression that to use webViewDidFinishLoad: I would have to conform my class to <UIWebViewDelegate>. However I forgot to do this but found it still works where I was expecting an error/warning. Can anyone explain for me? -(void)webViewDidFinishLoad:(UIWebView *)webView { // do st...

Erase some part of a UIImageView (like a rubber do)

Hi there. I'm building an iphone View controller that display two stacked images (on on top of the other). What i need to do is to erase some parts of the image on top (making it transparent while i'm moving my finger on it). I'll be fine with all the application logic (dragging, saving) but i need to know how i should implement that fe...