iphone

Allowing user to pinch zoom in/out of a webview

Hi, I have a WebView into which I'm loading a local HTML page with some embedded images. I want to allow the user to zoom in on the text and image in a similar fashion as they would with the web browser. Any ideas how to enable this? Thanks ...

How can I debug a program when debugger fails.

I am debugging an Iphone program with the simulator in xCode and I have one last issue to resolve but I need help resolving it for the following reason: when it happens the program goes into debugging mode but no errors appear (no BAD ACCESS appears) and it does not show where the code fails. Putting some variables as global helps me to...

Problem in String camparisson ...!

hi , here is my code : NSUInteger f; for (f = 0; f < [appDelegate.books count]; f++) { check = [appDelegate.books objectAtIndex:f]; checkthis = check.LotteryNumber; mystring = check.LotteryNumber; NSLog(@"Dynamic Value: %@",mystring); NSLog(@"Static Value: %@",checkthis); if (checkthis == mystring) { foun...

Hard to fix Obj-C error: expected ':' before '*' token in Xcode

I've been pretty good at fixing my Xcode Obj-C errors, but this one has me stumped: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if ([[tableList objectAtIndex:indexPath.row] isEqual:@"Standard"]) { [StandardSetupViewController *standard = [[StandardSetupViewController alloc] initWithN...

Getting the app onto the phone... certificate signing and identities

The error I received on build attempt was: Code Sign error: The identity 'iPhone Developer' doesn't match any valid certificate/private key pair in the default keychain Anyone know how to resolve this? Thanks // :) ...

Problem in two string comparison...!

LotteryAppDelegate *appDelegate = (LotteryAppDelegate *)[[UIApplication sharedApplication] delegate]; Lotterycheck *check; //NSString *trueval; BOOL found = NO; NSUInteger f; for (f = 0; f < [appDelegate.books count]; f++) { check = [appDelegate.books objectAtIndex:f]; checkthis = [NSString stringWithFormat:@"%@", chec...

iPhone crashing when presenting modal view controller

Hi there, I'm trying to display a modal view straight after another view has been presented modally (the second is a loading view that appears). - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; // Show load LoadViewController *loader = [[LoadViewController alloc] init]; [self presentModalViewContro...

faster xml reading required in iPhone

I have following code - methods to read xml files. But it works very slow for me. Isn't there any sufficient way to fetch & read data faster. if(connectionRemaining) { [self LoadingPopUp]; NSURL *tmpURl=[NSURL URLWithString:[NSString stringWithFormat:@"%@getcategory.php",[iGolfAppDelegate getServerPath]]]; NSMutableURLRequest *theReq...

cell selection style in iphone

By default there is three selection style in iphone - table view. gray - blue - none. I don't need gray or blue. I want to set my custom. For example In normal situation a cell should have "aaaa.png" background. & Selected cell should have "bbbbb.png" background. I have tried to apply cell.backgroundView & cell.selectedBackground v...

Where can I find good sample code for iPhone game?

Where can I find good sample code for iPhone game? ...

Reference to Model data in a view instance drawRect

Another newbie question : I have a simple iPhone app with a model, a controller and a view class. I want to draw a rectangle in the view using variables from the model (like the size or the position) What is the best way to make reference inside the drawRect method code, to variables from the model instance ? (the model is instanciate...

applicationWillTerminate is delayed, is there a faster method to use when quitting?

I'm using - (void)applicationWillTerminate:(NSNotification *)notification to save data when my game exits, then loading it if the user presses the load button next time around. The saving and loading work fine, but I've noticed there is some lag between when I press the home button and when the data gets saved. Whenever I exit, relaunch ...

Changing Compiler to llvm-clang on existing iPhone Project

When I switch the Compiler Version to Clang llvm 1.0 in existing projects I get the following build error when Precompiling the *.pch file: error: can't exec '/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2' (No such file or directory) Is there another setting I need to change to get my project to work with the n...

stringWithContentsOfUrl failing after updating to OS3.1

I have an application which has been running happily, but since I updated to OS3.1 and updated the SDK the application is failing to log onto a remote server, passing a connection string to the stringWithContentsOfUrl function. Before the update this was working fine, and if I copy the text string which is displayed on the NSLog stateme...

How to implement Daemon process for background task in iphone sdk 3.0 ?

Hi Like qik.com or ustream.com , when they upload content from iphone to server , it works via daemon . So even when out of the app with exit , the task is still on with background daemon . Is there any method that I can implement daemon process in a same way ? Thanks !!! ...

Query : In UItextView, created in UItableview cell,the text moves upwards ,on click and due to which can't able to see the text.

Hi , I am creating a UItableview , in which ,in each cell,creating a UItextview.Here I am getting text in each cell.when we click in a particular row, the UItextView is created within the row,filled with the specified cell text. Now when i click on the text within UItextView,the text moves upwards and due to which we can't able to see ...

iPhone using NSURLConnection to get multipart data is not working right

It seems that there is a bug in the NSURLconnection when you are getting multipart files, didReceiveResponse doesn't get called like the docs say between each part (see this). So I think I'm going to parse all of the data that is coming in. The format is text and binary(images) does anyone know of any code already to parse the nsdata o...

Is there a way to add AnimationTransition to a scroll view?

I'm playing with apple's pageControl sample, and trying to understand whether I can swap the default 'bouncing' animation happens between the pages with transitions like UIViewAnimationTransitionFlipFromRight. Thanks, Uri ...

can I put an objective-C selector in a struct?

I was wanting to associate a set of rectangles with corresponding actions, so I tried to do struct menuActions { CGRect rect; SEL action; }; struct menuActions someMenuRects[] = { { { { 0, 0 }, {320, 60 } }, @selector(doSomething) }, { { { 0, 60}, {320, 50 } }, @selector(doSomethingElse) }, }; but I get the error "ini...

How to achieve a hidden status bar using three20 framework

I'm using the TTThumbsViewController section of the three20 framework, and I have the status bar hidden throughout my application. When the user views the full size image, taps the screen(hiding the controls), when they tap again the controls reappear but the status bar is there too. I've searched through the whole library and been u...