iphone

Flipping Subviews above a main view

Hi all - I'm trying to build a subview that sits above my main view that is approximately 3/4 the size of the main view. When a button is pressed, the subview should flip to another subview. I'm close, but am having TWO problems. The first problem is that the first time the flip button is pressed, the second subview starts at full s...

What iPhone APIs are available for internet-based matchmaking games?

I have a pretty basic challenge-based iPhone game, and I wanted to know what my options are for player discovery & matchmaking. I may end up rolling my own server, but if I don't have to, even better. So far, I've found OpenFeint and Scoreloop, but I don't really care about the social part or discovering other games, I just want a simpl...

Attaching another modem to an iPhone or gPhone

I have an idea in mind where a device such as an iPhone or gPhone is attached to a satellite modem for use when out of GPRS/UMTS range. Would such an idea be feasible, and what are the high level steps towards implementation? ...

Waveform API from Apple commercial?

In the new iPhone 3GS commercial, Apple shows voice control with a cool blue waveform animation. Is this visual effect for rendering the waveforms (or maybe just volumes) available as an API call or source code somewhere? (Not the voice control part, just the audio visualization) I think you could get the sound info from AVAudioPlayer's...

Amr Encoder for Iphone

Hi , I was trying to find an AMR Encoder for Iphone That I can integrate with my Voice recording application. Thanks, ...

iPhone UDID restrictions?

On the iPhone, a unique identifier is available which is guaranteed to be unique and is tied to the serial number. This is the one: [[UIDevice currentDevice] uniqueIdentifier] According to the documentation, there are restrictions on using it: "It is guaranteed to be unique for every device but cannot publically be tied to a user acc...

How do I get the touch location of a different view?

Touch may specify self to get the touch location in its own coordinate system but how do i get it from another? Say another UIview's coordinate system? - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [UIView beginAnimations:@"box" context:nil]; [UIView setAnimationDuration:1]; [UIView setAnimationBegins...

cocos2d Sprite contentSize Problem

I've defined a sprite using the spriteWithFile method, providing a 120px by 30px .png Sprite *trampoline = [Sprite spriteWithFile:@"trampoline.png"]; [self addChild:trampoline]; When I add this to my Layer and position it, it is where I expect it to be on the screen. trampoline = [Trampoline node]; trampoline.position = ccp(160,15)...

Accessing UILabel Outlet without user interaction

Hi, I'm having an issue with an iPhone app I'm working on. It uses a separate class called Radio which streams a station in. When the title of the stream is updated, it calls back to RadioViewController with the method updateTitle: - (void)updateTitle:(NSString *)newTitle { NSLog(@"update title called with title: %@", newTitle); ...

Applying multiple transforms to a UIView / CALayer

Is there any problem applying multiple transforms to a UIView and it's corresponding CALayer? Specifically, can you "mix and match" CATransform3Ds with CGAffineTransforms without running into issues? Also are there any problems with setting some transforms directly while animating another transform change simultaneously? Are there any...

Hold on a UIButton + Move a Object

I have a problem. Theres my View, with 2 UIButtons and an UIImageView. When a Button is pressed down then i want to move the Image, when it isn't touched down, I want to stop the UIImage. But I have no idea how this works. Maybe you can help me. Here's my Code: - (void)viewDidLoad { currentPositionx = 150.0; currentPositiony ...

NSURLRequest HTTPS problems - iphone

I am creating an NSURLMutableRequest and setting HTTP methods and content-types and such. All was working fine until my last compile. I now get this in the Console, but the app doesn't crash: CODE: Internal error. Exception from other package: javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException:...

Do an action when a sound has finished playing in AVAudioPlayer?

I am using the AVAudioPlayer framework, and I have several sounds that play one at a time. When a sound is finished playing, I want the application to do something. I tried to use audioPlayerDidFinishPlaying to do the action at the end of the first sound, but I couldn't use that for the second sound because I got a redefinition error. ...

NSTextDidEndEditingNotification causing error

Hi. I'm have a TextViewCell with a text field that that I'm using in a tableview. I need the current view controller to be the delegate. Nothing worked and in my searches I found the code below, which I implemented in my initWithNib method: NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selec...

Car turning circle and moving the sprite

I would like to use Cocos2d on the iPhone to draw a 2D car and make it steer from left to right in a natural way. Here is what I tried: Calculate the angle of the wheels and just move it to the destination point where the wheels point to. But this creates a very unnatural feel. The car drifts half the time After that I started some r...

Detect at runtime which country's App Store my iPhone app was downloaded from?

I have a feature in my iPhone application that, for business reasons, should only be shown/available to customers in the US. If I want to release this app to App Stores outside the US, what's the best way to figure out which country I'm in without relying on user-defined settings such as language and locale? In my mind, the ideal soluti...

My table cells don't highlight immediately when touched

Hi, In my app, I have a table view that has about eight cells. There is a navigation bar at the top. When a user touches a cell, nothing happens for about 1/2 second. Then the touched cell highlights blue and immediately the new view slides into position. The problem is that there is no feedback to the user about which cell he touched u...

Adding an element to an array from another class

This is probably an easy question but this is the first time i've encountered this. I have a modal view controller that I am getting a string from and need to add that string to an element of an array that is in another class that is calling the modal view controller. How do I pass and add that element from another class? Thanks... ...

How can I tell if a button is being pressed in my iPhone app?

How can you tell when a button is being pressed? Specifically, how can you do something while a button is down? ...

Performance penalty for using NIB files?

I am curious to know if anyone has any experience comparing the load time performance of iPhone apps with views laid out in NIBs vs. views laid out entirely programmatically (i.e. instantiating UITextView, adding it to the view, instantiating UIButton, adding it to the view…). If I want a simple app to load lightning fast, would it be b...