iphone

App crashes (only) after installation

Hi, I compiled an fine working project (before compiled with 3.1.3) now with 3.2.1 Now after installation from XCode to Device it needs quite long to install and after it runs a few seconds later i just see for short a red alert at the top (can't read, it's too fast) and the app closes itself. When I then start the installed app... al...

iPhone: Problem collision using accelerometer and chipmunk

Hi everybody ! I am facing a problem using chipmunk and iPhone accelerometer. Indeed, I defined a ball shape and body : ballBody = cpBodyNew(100.0, INFINITY); ballBody->p = cpv(160, 240); cpSpaceAddBody(space, ballBody); cpShape *ballShape = cpCircleShapeNew(ballBody, 20.0, cpvzero); ballShape->e = 0.5; ballShape->u = 0.8; ballSha...

two UITextFields - slide first Keyboard out and next in

hi ! so in my viewdidload i got something like [nameTextField becomeFirstResponder] now after a button gets klicked, i want to slide out the keyboard of this textfield, and slide another keyboard of another textfield in. i thought about [nameTextField resignFirstResponder]; [dateTextField becomeFirstResponder]; but the other keyb...

How do I display the UINavigationBar on a modally presented UITableViewController?

If you have a UINavigationController's UIViewController present a UITableViewController (TVC) modally, is there a way for the TVC to display the UINavigationBar of its parentViewController? Or, should I have it create a new UINavigationBar, item, buttons, etc. for the modal TVC? ...

Can you build an array of items from folder contents?

Let's say I've got a folder in my project with bunch of png files in it (or mp3 files, or mov files etc). I would like to create an NSArray populated with the items within that folder... for instance an array of UIImages for the folder of images (or just an array of NSStrings of the image name). Is this possible? I know I could create ...

How to animate MapView once it loads?

Could someone please help me with loading maps using animation? I am trying to load a MapView. I want it to zoom to my place once the view loads. I am trying this: - (void)viewDidAppear { [super viewDidAppear:TRUE]; MKCoordinateRegion region; CLLocationCoordinate2D location=secondMap.userLocation.coordinate; MKCoordinateSpan span; locat...

How do I use CATransform3D on a UIView to add a specific type of perspective?

I've been creating iPhone apps for a while now, using basic transformations (rotations, scale, etc) but now I'd like to do something a little more complex. Maths really isn't my strongest point... but I was wondering how I might go about adding 'perspective' to a UIView (see the image below). I quickly mocked the screenshot up using sk...

Iphone sdk support for playing mp3 files over the network

Hi I am writing an application to contact a webserver running on a desktop to access and play mp3 files. Here is what I tried so far: I have used MPMusicPlayerController (and tried UIWebview) to handle the audio file and it automatically plays after progressively downloading the file. There is no way to handle skipping songs and ...

Gradient layer not showing up/working on an existing View

I have a view with has another view (called swipeView) inside it. I'm trying to gradient color it using the CAGradientLayer - the code is below CAGradientLayer *layer = [CAGradientLayer layer]; layer.colors = [NSArray arrayWithObjects:(id)[UIColor darkGrayColor].CGColor, [UIColor lightGrayColor].CGColor, nil]; layer...

Why won't my project run in the iPhone Simulator?

For some reason, my application will install and run fine on my device, but when I try to install my application on the iPhone Simulator, I get these warnings: ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit, missing required architecture i386 in file ...

is there an API for the displaying of an activity indicator followed by a checkmark, as in Apple's wallpaper loading screen?

http://www.angrypuppetsoftware.com/imagehost/photo3.png http://www.angrypuppetsoftware.com/imagehost/photo2.png When you set a wallpaper on the iPhone, it shows some sort of activity indicator, followed by a checkmark (see screenshots above). Is there any way to integrate this into an application programmatically? ...

Iphone's retina display in the simulator

I'm getting a bit confused on how to use the simulator to build applications that need to support the new higher resolution of the iphone 4. I would except when selecting the iphone4 simulator to run the app on that [[UIScreen mainScreen] bounds] would give me 960x640 back, but instead it still giving me the old resolution (480x320) ? ...

UITableView with dynamically set size

I have a UITableView as a subview in a ScrollView with other widgets around like a button. I'd like to put the button always at the end of the ScrollView and I'd like to have the UITableView to show dynamically more section. How and where shall I determine the Table size, correctly set it and visualize it? From Interface Builder it seem...

iPhone SDK - How to take a picture with custom camera view?

Hi, I want to release the shutter as soon as the user tabs on the screen. I have working code for displaying the camera in fullscreen mode. How can I trigger the shutter by a touch? - (IBAction) takePicture { if (!self.imgPicker) { self.imgPicker = [[UIImagePickerController alloc] init]; self.imgPicker.allowsEditin...

Custom UIView does not rotate when device orientation changes

Hello, I created a UIView which has two controls on it, a label and an activity indicator (spinning wheel) to display when the device is synchronizing. As this UIViewController needs to be accessed globally I'm adding it in the app's FinishedLaunching event: window.AddSubview (navigationController.View); window.AddSubview(SyncSpinner....

What resolution does my in-app artwork need to be?

What resolution does in-app artwork need to be to make use of the high-resolution iPhone 4 display? ...

How to set a gradient UITableViewCell background?

I would like to create a gradient UITableViewCell background like the default Clock app that comes on the iPhone. I am not exactly sure how to accomplish that. Do I create an image and set it: cell.contentView.backgroundColor = [UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]]; or is there another/better app...

How can I get a Random quote (text) from a database (CoreData) of quotes? (iPhone)

I want to develop an app that gives a random quote every time you change the page. And I want to put like 1000 quotes in the database. How is the best way I can get a Random Quote? arc4random? ...

iPhone - error loading view controller

I load view controllers all the time in the following format: -(void)loadSelectUser { MyViewController *nextController = [[MyViewController alloc] initWithStyle:UITableViewStyleGrouped]; MyAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.navigationController pushViewController:nextController a...

EXC_BAD_ACCESS on IPhone Cocos2d

Hey, I Have the following code: -(void) changeAnimation:(NSString*)name forTime:(int) times { if(currentAnimation != @"attack") { id action = [CCAnimate actionWithAnimation:[self animationByName:name]]; id repeatAction = [CCRepeat actionWithAction:action times:times]; currentAction = [self runAction:repeatAction]; lastANimati...