iphone

Objective-C Split()?

Hello! Is there any way to split strings in objective c into arrays? I mean like this - input string Yes:0:42:value into an array of (Yes,0,42,value)? Thanks! Christian Stewart ...

SpringBoard memory allocation (iPhone/iPad)

I have an application under development that uses a large amount of memory for images and OpenGL textures. I have noticed that occasionally, in fact frequently on some devices, SpringBoard, the application which manages the home screen for the iPhone and iPad can take up excessive amounts of memory, sometimes twice as much as normal. W...

Dynamically loading NIBs?

Rather than having three separate controllers and their associated *.xib files I am trying to setup a generic controller and then instantiate it with one of three different xib files RED.xib" "GREEN.xib" & "BLUE.xib" NSString *nibColor; switch (selectedRow) { case 0: nibColor = @"RED"; break; case 1: nib...

Convert String to Int Objective-C?

Hello! Really basic iPhone Objective-C question. I'm trying to extract a string (which is really a int) from an array and then use it as an int in a function. I'm trying to convert it to a int using intValue. Here's the code I've been trying. NSArray *_returnedArguments = [serverOutput componentsSeparatedByString:@":"]; [_appDeleg...

iPhone UINavigationBar: Why does it resize in landscape orientation?

Hi, I searched all the web but did not find a clue: I've got a UIView in a UINavigationController in a UITabBarController—not that unusual, I guess. First of all an image: http://img824.imageshack.us/img824/426/navbari.png The app starts in portrait mode (1) When I now rotate the device to landscape mode the app looks like in (2) A...

Does pushViewController retain the controller?

I am struggling to find out if pushViewController retains the controller, currently I have the following code (which works) ... ColorController *colorController = [[ColorController alloc] initWithNibName:nibColor bundle:nil]; [[self navigationController] pushViewController:colorController animated:YES]; [colorController release]; but ...

basic math problem with Integer and NSDecimalNumber - Invalid operands to binary

Man the simplest stuff always seems so crazy in Objective-C to me, anyways I need to do some basic subtraction and multiplication and am stumped. I have: client.PricingDiscount <-- this is an Integer 16 property on a CoreData NSManagedObject sku.RetailPrice <-- this is a Decimal property on a CoreData NSManagedObject I am simply try...

iPad: Custom Toolbar for UISplitViewController

How exactly does one go about implementing a custom toolbar for the main table view section of a split view? The program I am writing for the iPad is landscape only so the split view has a static table view along the left side, and at the top is the toolbar with a title. It is this toolbar I would like to change. I have created the spl...

Making an image follow a pre defined path in iPhone ?

Hi, I am looking for some way to make an image (a ball) move along a predefined path in iPhone. My intention is to create a ball movement similar to the labyrinth movement. I understand there is a way to create paths programmatically using CGPath. But I believe it is difficult to create complex paths. Is there a be...

EXC_BAD_ACCESS Exception in iPhone

Hi there, i got this piece of code: - (void)postToWall { FBStreamDialog *dialog = [[FBStreamDialog alloc] init]; dialog.userMessagePrompt = @"Un tuo commento:"; dialog.attachment = [NSString stringWithFormat:@"{\"name\":\"Bla: %@\"", facebookName]; [dialog show]; [dialog release]; } the first time it get executed it works fine, no p...

Pressing on a button causes UIScrollView to scorll

Hi, I'm having an inconsistent problem where sometimes I press on a button inside the scrollview. The scrollview catches the event and scrolls instead of the button getting the touch event. Any idea how to solve this bizarre behavior. Thanks ...

Managing resources and keeping them out of version control.

My iPhone app will have a map with about 10 points on it. It will play sound files based on the proximity to those points. What's the best way of managing these resources? Coordinates and accompanying sound file could be stored in a plist, as an array of dicts with latitude, longitude and file name. Then the sound files could be store...

How to detect or define the the orientation of a pinch gesture with UIPinchGestureRecognizer ?

Hi. I'm using UIPinchGestureRecognizer to detect pinch gestures, something like: - (void) initPinchRecon { UIPinchGestureRecognizer *pinchRecognizer = [[[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(Perform_Pinch:)] autorelease]; [self addGestureRecognizer:pinchRecognizer]; [pinc...

Core Data on iPhone and Performance

I'm trying to import a large amount of data into a core data store on the iPhone. I'm using a SQLite backing for the core data store. It seems to be taking way longer than I would expect it to. I've trimmed down the routines so that it is basically just attempting to a fetch an object (to see if it already exists) and then create a new o...

Changing UITableView "BackgroundColor" of Index-Component

Hi there, I'm not sure if my title is a bit "crappy" to say the least, but let me explain my issue here. I'm having a Table with about 300 Entries, sorted and sectioned alphabetically. The tableview shows the alphabetical slider to the right (just like in the "contacts"-application in iphone) "untouched" it looks very nice (grey font, m...

CommonCrypto/CommonDigest iPhone question

I am trying to do a simple encryption of a string and am getting an error. My code is: #import <CommonCrypto/CommonDigest.h> #define CC_MD5_DIGEST_LENGTH 16 - (NSString *)md5:(NSString *)str { const char *cStr = [str UTF8String]; unsigned char result[CC_MD5_DIGEST_LENGTH]; CC_MD5(cStr, strlen(cStr), re...

How to limit the delete option for first row in UITableView

HI In my appliacation I want deletion control button will not work for first row except for all other rows. Please can anybody tell me how it would be possible. Thanks ...

App store say "requires iOS 4.0" but deployment target is 3.1.3

Hi I have just have my app approved in the App Store, but only devices running 4.0 can download it. The project settings in Xcode says "base SDK 4.0" and the "deployment target 3.1.3". Is there some other setting or value in my plist file or thing I have set in iTunes connect that could yield such a result. I use no 4.0-only API's a...

[iphone] Resizing view when loading from nib

I have a nib file created in Interface builder with 1 UIView item but when I initialize it programmatically, the view doesn't cover up the entire screen, leaving a small portion of the view beneath it visible. It looks like the Y coordinate is at some negative position instead of at 0. I don't have a Navigation bar configured for the v...

scrollview issue

I'm seeing an issue with UIScrollView and I can't figure out what's causing it. Basically, I have a UIView w/ a UIScrollView. When the UIView is pushed onto the stack, an image & some text is displayed within the scrollview. From there the user can popViewController back to the original view. Simple enough... The issue I'm seeing is th...