iphone

how to get dynamic values from uitableview cells ?

If i have to show 10 or 30 or 100 strings in a uitableview..How to get the selected raw from that.. My value for each row is different .I mean i have to set the row value and display name from a 2 dimenional NSArray.. Somebody please help me.. ...

xml parsing problem in iPhone

Hello, I have this xml feed in Chinese, which NSXLParsers is unable to parse. It gives error 31 while parsing. error 31 occur due to Document encoding is unknown. I tried UTF-8 and ascii encodings to convert string rendered via [NSString stringwithContentsOfURL:@"http://news.baidu.com/n?cmd=4&class=finannews&tn=rss"] to ...

iPhone NSURL String/HTML Local App Resource Accessed in Another Application

Using iPhone SDK: 3.0 (Firmware 3.1.2) I'm new to iPhone development and researched here and google for a few hours with no luck. Here's the issue: I have an ebook in epub format that I want to sell on the app store, but the app store requirement is that the epub must be contained in an iphone app. So, I decided to make an app that ...

Navigation stack monitoring

Can anyone tell me why this comparison keeps making my app freeze and crash? NSArray *viewControllerArray = [controlFromMap.navigationController viewControllers]; NSUInteger parentViewControllerIndex = [viewControllerArray count] - 3 // or - whatever; NSLog(@"Parent view controller: %@", [viewControllerArray objectAtIndex:parentViewCont...

Interface Items in ChangeViewController.xib do not show up when run

I add items in Interface Builder to the XIB but then when I run it in the iPhone Simulator, I just get a gray screen. Then for some reason, if I go to the Interface Builder, draw "View" and then paste my items inside it, the items suddenly work fine. ...

why there is a pause selecting UIImage from PhotoLibrary?

the code is as follows: -(void)imagePickerController:(UIImagePickerController*)picker didFinishPickingMediaWithInfo:(NSDictionary*) info{ UIImage* pickedImg=[info objectForKey:UIImagePickerControllerOriginalImage]; imageView.image =pickedImg;//imageView is set to "aspect fit". } if the sourceType is from camera,after selectin...

Create UIView through code and add events in iphone

Hi Friends, I have created a UIView and added label to it and latter assign it to Controller. Now whenever I click on my View it shows me "EXC_BAD_ACCESS”. Below is my code. //create a UIView in App Delegate UIView *viewPtr = [[[UIView alloc] initWithFrame:frmRect] autorelease]; //created a Button and added to UIView UIButton ...

How do I get setIdleTimerDisabled=YES to work with System Alerts?

Hi there, I have added the following code to my iPhone application: [[UIApplication sharedApplication] setIdleTimerDisabled:YES] This is so that my screen remains active (as it is a sunrise alarm clock). However, if I receive a text message or calendar alert (i.e. a system alert view appears onscreen), then the iPhone screen dims af...

Problem with UIViewController orientation

I'm writing EAGLView - based application (game) and need to add UIViewController with UIWebView in landscape mode. What I done: Specified UIInterfaceOrientationLandscapeRight for UIInterfaceOrientation in the Info.plist Call [application setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO] in the applicationDidFi...

How to do UITextField's leftView in Interface Builder?

Looking at UITextField item in Interface Builder, cannot see any way to set leftView property. Would like the put there an icon to show user that this is place for text input. The overlay view displayed on the left side of the text field. @property(nonatomic, retain) UIView *leftView Can it be set using IB at all? ...

how to get the event that switch tab menu on iphone

hey i want to catch the event that controll the switch tabs on the UITabBarController how can i accomplish it ? thank you guys ...

MPMoviePlayerController play video second time

I need to have the possibility to play more than one video in an app. Unfortunately, the second time I press play, video appears blinking. I use only this code for playing vide NSURL *url = [[[NSURL alloc]initFileURLWithPath:[[NSBundle mainBundle]pathForResource:@"Movie" ofType:@"m4v"]] autorelease]; MPMoviePlayerController *...

presentModalViewController not working?

hi,i coded in button action like [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1.0]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:mainDelegate.window cache:NO]; [mainDelegate.window addSubview:[self.calcentryController view]]; [UIView commitAnimations]; it works fine,but whe...

viewControllers problem?

Pushing the same view controller instance more than once is not supportedHi, i have one normal UIViewCOntroller(home) in which i have IBAction Method like - (IBAction)goto1:(id)sender { self. goto1Controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:self. goto1Controller animated:YE...

Scaled live iPhone Camera view in center, "CGAffineTransformTranslate" not working

Hi, I have a little problem which I could not solve. I really hope someone can help me with that. I wanted to resize the live camera view and place it in the center, using the following code below: picker.cameraViewTransform = CGAffineTransformScale(picker.cameraViewTransform, 0.5, 0.56206); picker.cameraViewTransform = CGAffin...

How to make a .zip file in iphone using objective C?

Hello, I want to make a .zip file using objective c. Is there is any method or else ? need a source code urgently. Thanks in advanced . ...

didSendBodyData equivalent for iphone firmware 2.2.1

Question is in the title Thanks for your help. ...

Blending two FBOs on iPhone gives strange result?

I am programming a small drawing app on the iphone and ran into a problem. When i merge two fbos the color becomes white instead merging. Look at the picture: http://dl.dropbox.com/u/2025544/help.png Here the left is rendered as a normal mac program and the right is rendered on the iPhone platform with almost the same code except for u...

Problem animating a Parallax Layer in Cocos2d-iPhone

UPDATE: I'm a doofus. What's happening is obvious. The Animation first sets the layers position to it's current position. But I've told the layer to divide any setPosition coordinates by pRatio. So it's not going to CGPoint(0,0) but something like CGPoint(0.032, 0). I've fixed it like this: - (void) setPosition:(CGPoint)point { if(!...

Successful Swipe in UITextView?

Has anyone been able to implement a successful swipe gesture on a UITableView? By default this is not possible due to the scrolling nature of the control. I've tried subclassing UITextView and implementing the swipe function in the instance methods, but no dice. My UITextView has scrolling disabled - Unless there is another way to imple...