sdk

If statement question iphone?

I am creating a game where where you complete shapes and the area gets filled in. However, if there is an enemy bird within your shape, it will not fill in. I want to make it so that if you do trap a bird within your shape, you will lose a life. How can I write an if statement that pretty much says if the below code doesn't take place...

Android - are there precompiled samples from SDK available anywhere?

Are there precompiled samples from SDK available anywhere? Or is there any way to quickly compile all samples from given SDK version? UPDATE: it looks like everyone needs to compile examples by itself ...

CGPathContainsPoint question?

this is in GameViewController.m -(void)fillMutablePath{ CGPoint movePoint = CGPointFromString([pointsToFillArray objectAtIndex:0]); CGPathMoveToPoint(fillPath, NULL, movePoint.x, movePoint.y); for (int i=0; i<[pointsToFillArray count]; i++) { CGPoint tempPoint = CGPointFromString([pointsToFillArray objectAtIndex:...

How do I reference the managedObjectContext in my App Delegate from my View Controller?

Hi, I know there are other questions covering this topic, but none seem to fit exactly what I'm experiencing, hence the new question. I have an app which is a UITabBarController, I have defined two subviews Both tabs have their Class attribute in the Identity Inspector set to UINavigationController. Both subviews are Class UIViewContr...

How Speech to Text conversion in iPhone

Hi Friends, Is there any way, by which we can convert speech to Text using iPhone SDK? Thanks, Krishnan. ...

iPhone UIPickerView Gestures

How would I go about adding gesture events to uipickerview to change tabs? I have to create a custom class, however, I don't know how to handle the uipickerview. I current have gestures present in uiviews to do this, but I'm having trouble with the uipickerview. My code for the views: #define HORIZ_SWIPE_DRAG_MIN 100 CGPoint mystartTou...

A big, green UIImage anyone?

According to this post, there is a stretchable UIButton image that is red. Does anyone have a green one? (My Photoshop skills are very poor.) ...

Switching Views in iPhone SDK?

How come this won't switch views for me? When I click the button it does nothing... -(IBAction)howtoplayButtonClicked{ howToPlayViewController = [[HowToPlayViewController alloc] initWithNibName:@"HowToPlayViewController" bundle:nil]; [self.navigationController pushViewController:howToPlayViewController animated:YES]; [HowToP...

What's the best way to fix memory leaks on the iPhone?

I'm trying to use XCode's Leaks utility to fix some memory leaks in my code. Is there a better and more understandable way to check for leaks with explanations that pinpoint the exact line and/or offer suggestions? Another question, I'm using AVAudioRecorder in my code in one of my view controllers. Should I load the recorder in viewDid...

iPhone - Switch Tab from UIWebView

I have a webview and I want to manually switch to another tab during a specific event. The event is arbitray, but I can't figure out hwo to switch teh tab. On my other views, I have the following code: self.tabBarController.selectedViewController = [self.tabBarController.viewControllers objectAtIndex:2]; However, this does not work in...

iPhone app with remember last user action .

hi i want create an application and my app remember last user action ,, it means user find himself in the same page as he was last time he ran the application . how could implement that ? ...

Random number in iphone sdk?

How do you generate a random number when a button is clicked, and depending on that number, different actions take place. I probably only need a random number from 1-10. -(IBACTION)buttonClicked{ "generate the random number" if(number == 1){ something happens } else if(number == 2){ somethine else happens } etc } ...

How can I check if a microphone is plugged into the iPhone?

I'm using AVAudioRecorder in the AVFoundation framework. I'm wondering how I can check for a microphone device being plugged in (on the iPod Touch)? ...

Should I import UIKit in every file I code?

I'm coding for the iPhone and wondering if I need to include UIKit in every file that code or is there a better rule as to when to do so and when you don't have to? Thanks! ...

Would it be ok to make an X in the upper right hand corner of a UIView to cancel out of the view?

I have a UIView that I don't want to have a navigation bar. It is a modal view. Would it be ok for me to make an custom UIButton shaped like an X to get out of it? Would Apple care? Is there a better way? ...

Blank simulator screen due to file name or name change or neither?

hi; i have a problem, clearly. when i started the project i had stupidly named my [AppName]ViewController just [AppName]Controller. As i went along i could never get iphone simulator to display more than a blank white screen. upon having made all the connections in interface builder and still facing the same problem, i decided my blank ...

iPhone - Update Label from UIPickerView

I have two UIPickerViews set up on one view under the same view controller. The picker's seem to be populated with values as expected. I also have a label for each picker. The label updates with each value change, but the value displayed on the label is not correct. It's always off by 10. The codes are below. Interface: #import <UIKit/...

Format part of text in Custom Cell (iPhone-SDK)

Is it possible to format only a part of the text of a string? User searches, and if the search entry is found in the array, it will highlight that particular part of the text only. TIA. ...

How can I make a UIScrollView image gallery? (iPhone SDK)

I've been struggling with trying to get my UIImageView to change its image when the UIScrollView is scrolled, kind of like the Photos.app. Here's my code: - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ if (scrollView.contentOffset.x > 296){ self.currentDBNum++; self.currentDoorbell = [UIImage imageWithConte...

Why isn't my recording able to be played? (iPhone SDK)

I'm programming an app that lets me record doorbell sounds and play them back on a doorbell that the user sees when they push the button. My app seems to record and save the file (the file is there (in Documents) according to the iPhone simulator as I've created the directory in the app delegate)). However playback isn't working. (By the...