iphone

class variable accessible at end of one function, and crashes on access at beginning of next

(programming in iPhone objective-C) I have a class level NSString* that I create, add property(nonatomic,retain) and synthesize code for and I can modify the string endlessly with stringByAppendingString functions and display the string using NSLog just fine. All of this is done in a subclass, overridden viewDidLoad function. When I try...

Iphone Error Terminating in response to SpringBoard's termination

I am testing my iphone application in the real phone and when my program running a few seconds. It exit automatically and show the message ' Terminating in response to SpringBoard's termination' and in console show program exit normally.It is wired, right? I try a few times and happened every time. The program is very simple and have...

Calling popViewControllerAnimated twice

I've got a UINavigationController with a series of UIViewControllers on it. Under some circumstances, I want to pop back exactly two levels. I thought I could do it by calling popViewControllerAnimated twice in a row, but it turns out that the second time I call it, it's not popping anything and instead returning NULL. Do I need to st...

Weird error for UIActionSheets when compiling against iPhone 3.0 OS

Hi all, I recently started compiling my iPhone application against the 3.0 OS. The app worked fine when compiled against 2.2.1 however, compiling against 3.0 yields the following warning: warning: type 'id ' does not conform to the 'UIActionSheetDelegate' protocol This occurs on the 2nd line of the following code snippet whi...

How do install iPhone application from Xcode to a remote iPhone

Hi, is there a possibility to install an application from Xcode to a remote iPhone? I have the dev account and able to install it locally. I am currently in Sydney and would like to install a prototype of a game on the device of a coworker in Germany. The work is still in progress so it's has to be done quite often... Is there a way t...

UITextField will not auto capitalize throughout entire project.

For some reason, none of my UITextFields will autocapitalize. I have set the property in InterfaceBuilder as well as programatically as shown below. cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"search_cell"]; UITextField *tf = [[UITextField alloc] initWithFrame:CGRectMake(12, 10, 320, 32)];...

How to create a custom UIButton (with images) but still use setTitle?

I've tried creating a UIButton with UIButtonTypeCustom. Then afterwards used the following methods to adjust the look of it [sendButton setImage:[UIImage imageNamed:@"sendButtonOff.png"] forState:UIControlStateNormal]; [sendButton setImage:[UIImage imageNamed:@"sendButtonOn.png"] forState:UIControlStateHighlighted]; [sendButton setIm...

How to kill a selector that is set to fire after a delay (on the iPhone)?

If I have a view with a performSelector set to fire after a delay: [self performSelector:@selector(generateBall) withObject:NULL afterDelay:1.5]; ...but I removeFromSuperview that view before the selector fires (for example, due to user interaction), then my app crashes. Is there a way to kill the delayed selector in the dealloc met...

Optimizing a drawing (with finger touches) application for iPhone SDK

Hi all, I'm writing an application that uses your finger to draw simple diagrams. I have it working for the most part but now I'm trying to optimize its performance. When the user swipes their finger fast, I can't capture enough touch events to draw a smooth path. Here's my current approach: 1) I subclassed a UIView and added a porop...

iPhone Text Field

Hello, I have run into an issue that I have yet to be able to solve. Hopefully someone can help. I have an app that I am using to do simple calculations, some of the results are larger than the UItextField. Does anyone know how to limit the output to say 10 characters like say a calculator would using exponents. This is the code I am...

iPhone: Is there an automated way to identify unused resources?

As I've developed my app, I have imported and incorporated a lot of images, sounds, etc. I guess I could just write a shell script that greps the source code, but I'm wondering if there's an existing that will identify any unused resources in my project. Thanks! ...

Divide world in four quadrants

If i want to divide world in four quadrants and make regions in these quadrants and wanna find the distance from my location to a point in the region I am standing, how is it possible in iPhone using objective c? Or any other solution possible ...

Saving/loading a 2D C array with NSKeyedArchiver

Malloc like this int **terrain; terrain = malloc(sizeof(int*) * mapSize.x); for (int i = 0; i < mapSize.x; i++) { terrain[i] = malloc(mapSize.y * sizeof(int)); } Use it. Convert to NSdata like this before saving NSData *data=[NSData dataWithBytes:terrain length:(30*sizeof(int*) +30*30*sizeof(int) )]; [rootObject setValue:data ...

How to mimic a standard html text rendering on iphone?

I have a view with two UITextView elements in it, each of which is tied to an outlet in the controller. The content for these is coming from a database, and is sometimes short an other times long. I want it to look like it would in html, with <p>content1</p><p>content2</p>, such that the distances from the end of content1 to beginning o...

Internet connection

What is the best way to determine whether there is an available Internet connection for a iphone app. (Programatically of course) I want to disable/hide certain functions if the user is not connected to the Internet. Can anyone help me? Thanks in advance......... ...

Detect when a user clicks the paste button in a UITextView

Hi, I am having quite a issue trying to change the cut/copy/paste behavior of the UITextView. What I want to achieve is: detect when the user has pasted some text into the UITextView. When I detect this I will then check the data and do my thing. According to the documents, I found out about UIResponder. So I created an simple clas...

Rest web service

I am aware of using the soap webservices on iphone .Now i want to use REST. Can anybody tell me, What are the methods associated with calling and use of rest webservice? Thanks in advance. ...

Client Server iPhone App

I need build a client server iphone app. Want to store a database on server and save it too on client's iphone. What strategy and what dbms' and tools i must use for it? AS my database can be enough heavy ...

How do I shared an object between UIViewControllers on iPhone?

My application is a tab bar application, with a separate view controller for each tab. I have an object in my first view controller (A) which contains all my stored application data (Please ignore NSUserDefaults for this) which needs to be accessed by the second view controller (B) when I press a button on it. How can I achieve this cou...

iphone icon problem

How can i set my application icon in itunes.... Can anyone help me? Thanks in advance ...