iphone

How to display Dropdown info sorted by GPS location in Objective C on the iPhone

Is there an easy way to display a sorted dropdown list on the iPhone by "closest to current location"? I.e. if I have a list of cities with their GPS locations, can I quickly sort a dropdown to show you city selections in order of closest to you? Will this be fast? Or will I have to presort (before you select the dropdown) in the bac...

MPMoviePlayer Orientation

I am playing MP3 audio via a URL using the MPMoviePlayer. But when it plays, it flips to Landscape layout, and I would like it to remain in portrait layout. Any ideas? Thanks, John ...

Replacing a document body on the iPhone

I need to be able to replace the entire document content with a response obtained from an ajax request. I have tried assigning to document.body.innerHTML and also tried using document.write(). While both of these are functional on desktop Safari, I need a solution for the iPhone/iPod Touch. Attempting to modify document.body.innerHTML p...

Parse JSON array

Hi, I fetch a JSON array from a web service with touchJSON. Which looks like this: [{"icecream": {"title": "Banana"}}, {"icecream": {"title": "Strawberry"}}] I'm not able to parse this into a NSDictionary, because touchJSON doesn't support JSON arrays. How do I get my JSON array into a NSDicitionary? Regards ...

MPMoviePlayer Audio Album art

I am streaming an MP3 file using MPMoviePlayer, and I would like to have an image displayed instead of the default Quicktime logo in the background. I found out a way to have an image overlay the player, but the problem with that, is you have to tap outside the image to get the player controls to appear. And when they do appear, they a...

Will my App be available worldwide, or only in my country?

I'm going to upload an free App to the App store in a few weeks. I come from Holland. Will it be available worldwide, or just here? I'm concerned because App Store always shows me Apps from my country in the top lists, and I realld doubt that so many Apps come from here. ...

How much does an CGAffineTransformMakeRotation() cost?

Is that an very cost-intensive function that sucky my performance away under my feet? I guess they used that one for the waggling buttons on the home screen + core animation. I just want to know before I start wasting my time ;) ...

Can I set the origin of rotation when rotating an view with CGAffineTransformMakeRotation() ?

I have an UIImageView which I want to rotate a little bit, but I need to define an special origin for rotation. How could I do that? More precisely, I have an image of a goblet, and I want it to wiggle on a table. It's socket is quadrate. So when wiggeling to left, then my rotation origin has to be the left corner of that quadrate. And w...

How can I chain animations in iPhone-OS?

I want to do some sophisticated animations. But I only know how to animate a block of changes. Is there a way to chain animations, so that I could for example make changes A -> B -> C -> D -> E -> F (and so on), while the core-animation waits until each animation has finished and then proceeds to the next one? In particular, I want to d...

How to set rectangle border for custom type UIButton

I am trying to set an image as the background of a custom UIButton. I was able to set a background image for the "rounded rect" UIButton in interface builder, but now the borders have vanished. Is there any way to retain the borders? Also, I would like to make the borders show up rectangular instead of rounded. ...

Why does my view move around, when I change its center?

I thoght that it's frame's oringin decides the position of the view. But when I change the center property like so myView.center = CGPointMake(myView.center.x - 20, myView.center.y); my view will move 20 units to left. I want to change the center point to make some rotations relative to that point. ...

Determining Dimensions of Images in iPhone SDK

Simply, is it possible to somehow capture the dimensions (specifically, width and height) of an image using either the iPhone SDK or an iPhone SDK-compatible library/framework? Perhaps pull the dimensions from the EXIF metadata? ...

Controlling the position of an image loaded in UIImageView shown in navigation bar

Hello, I show an image on the navigation bar (I use UIImageView). Could you let me know how can I position it on a certain x, y location on the navigation bar? Thanks. ...

how can i detect the touch event of an UIImageView

Hi, I have placed an image (UIImageView) on the navigation bar. Now I want to detect the touch event and want to handle the event. Could you let me know how can I do that? Thanks. ...

In objective-C (iphone), how do I manage the memory of '@protocol' references?

I thought I had a pretty good handle on memory management for objective-c, but I can't figure out the following situation: @protocol MyProtocol @end @interface MyObject : NSObject { id<MyProtocol> reference; } @property (nonatomic, retain) id<MyProtocol> reference; @end @implementation MyObject @synthesize reference; -(vo...

BlackBerry Messenger API for non-RIM Device?

I was wondering if RIM published an API that allows third party apps on non-RIM devices, like the iPhone, to send and receive blackberry messages??? ...

Is it possible to create a UITabBarController whose tabbar items have text labels only (no icons)

In iPhoneOS, I want to create a UITabBarController for global app navigation (like the 'Phone' app and many others) whose tabbar items have text labels, but no icons. I would therefore also like the height of the tabbar to be much shorter. The tabbar should only be tall enough to accomodate the text labels or Apple's minimum recommende...

iTunesArtwork and XCode

I'm trying to add the iTunesArtwork file to my iPhone application in order to follow the guidelines for icons/artwork for iTunes. I've added a file that matches the iTunesArtwork requirements (512x512 JPG) to my project. Once I do that, I can no longer install the application on my device. I keep getting this error: Your mobile de...

Localize Currency for iPhone

I would like my iPhone app to allow the input, display and storage of currency amounts using the appropriate symbol ($, €, ₤, ¥, etc) for the user. Would NSNumberFormatter do everything I need? What happens when a user switches their locale and these amounts (dollars, yen, etc.) are stored as NSDecimalNumbers. I assume, to be safe, it'...

iPhone Mobile App (safari): no onblur? wrong onfocus? no onbeforeunload? WTF?

So I just made my web-application "iPhone Friendly". So you can add it to your home screen and it has an icon, no chroming, etc etc. The problem is that I want to display a custom splash-screen every time it is opened from the iPhone home screen. Right now it just shows the last screen viewed while it basically runs a refresh. I have...