objective-c

Uncaught Map View exception

I can't seem to figure out where the problem is. I have put a Map View control on my view and I am getting the following exception - * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named MKMapView' ...

Wait before execute istruction

Hi I wan't to perform an animation before quitting a view. The problem is that if I write this code: [self animationMethod]; [self removeFromSuperview]; the animation is not presented because the removeFromSuperview instruction is immediatly executed, i suppose. There's a way to specify thath the removeFromSuperview method must be e...

Dyld: Library not Loaded Error Mac OS

Hoookay, So I know I'm about to get a dozen "load the lib dummy" answers to this, but here goes... junk.framework is exporting some objects of another project (junk.app) so I can use it on a remote.app node on a cluster. I can compile junk.framework (which I realize means nothing anymore with dynamic loading) and compile and link remo...

Create a Controller of 2 viewController

Hello, I have a problem in my iPhone application. I created an application in which I have 2 views and their respective controllers. The variables declared in the first view but not visible in the second and the same for the second. It can create a "controller" that allows you to manage two views of variables making share so? Thank you a...

How to define a function that returns a String in Objective-C / Iphone SDK

Hi all, I am an Objective C noob and need a bit of help. I need to pass a function 2 integers A and B. The called function then checks if A > B, A = B or A < B and passes back a string. If A > B then it must pass back "HOT" If A = B then it must pass back "MEDIUM" If A < B then it must pass back "COLD" Also how do I call this fun...

Copy NSArray and replace text items with bool values

I utilize a (nested) plist to populate UITableViews where users can select entries at the deepest levels and set a checkmark (or not). I want to save these selections in a same structured list where at the deepest level the NSArray contains bool values instead the text strings that are displayed in the UITableView. So how can i build fr...

Recurrence Calculator For iCal - RFC 2445

Hi, I need to interpret a RFC2445 recurrence rule and figure out what dates it occurs on. I don't really want to get into the nitty-gritty of the standard as it seems quite complex, I was wondering if anyone knows of an Objective-C / C / C++ library that I can use to do this? I have seen DDay.iCal which seems perfect but it's in C#... ...

Xcode Linker error: _OBJC_CLASS_$_CIImage ...

When building my Xcode project I am receiving a Linker error that I cannot figure out how to resolve. If I build the following code the compile step completes just fine but I get an error from the Linker saying '"_OBJC_CLASS_$_CIImage", referenced from Objc-class-ref-to-CIImage in AppController.o' followed by a second error that looks i...

how many times to I need to load a nib?

Not sure if this is a silly question, but how many times do I need to load any specific nib? My understanding is that you are effectively unarchiving the nib when you load it, so is it available anytime afterward for initializing? Example: controlsViewController *controls = [[controlsViewController alloc] initWithNibName:@"controlsVie...

What exactly is Class ?

From the headers: typedef struct objc_class *Class; typedef struct objc_object { Class isa; } *id; I do get what id is. It's a struct which has only one member: isa, from type Class. And Class is redirected to obj_class, or what? And obj_class seems to be a zombie. Can't figure out what it is. So what is Class in reality? Just a p...

Problem copying NSMutableArray

I am trying to copy one array to another: NSMutableArray *itemsCopy = [[NSMutableArray alloc] initWithArray:self.items copyItems:YES]; but I get the error: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[Item copyWithZone:]: unrecognized selector sent to instance 0x5a74900' *** Call stack at fir...

Cocoa renaming MyDocument window title

How can I change the title of a window in a document based cocoa application? I get an error when I try the following code in MyDocument.m - (void)awakeFromNib { [self setTitle:@"Document 1"]; } ...

iPhone: Wrapping text around image.

From what I have gathered, wrapping text around an image is possible using a UIWebView displaying a local html file. (I have a local html file called index.html) The following code inserted in the viewDidLoad method seems to crash the application with error. *** Terminating app due to uncaught exception 'NSInvalidArgumentException' Thi...

how to sort NSMutableArray

Possible Duplicate: How to sort an NSMutableArray with custom objects in it? Having trouble with something basic (I think). I have an NSMutable array that I populate with "workout" objects. The "startDate" method returns an NSDate - and I'd like to sort the array off this. The NSSortDescriptor *sortByDate line terminates du...

How can I append objects to an NSMutableArray?

I have two arrays and I would like to append one to the end of the other. How can I go about doing this? self.itemsCopy = [self.items mutableCopy]; Will copy the array, but I would like to append self.items. ...

Can't move my character! Please HELP!

I am trying to make a UIImageView move when I tap a button. I have set a UIIAction to start an NSTimer. When tap the button, the character(UIImageView) moves fine. When I tap the same button again, the character speeds up and so forth so eventually he is moving a billion mph. How do I solve this? Here is the code: (void)animateCha...

What exactly does reloadData call?

When calling reloadData on a UITableView what methods are actually invoked? [tableView reloadData]; ...

Is this the correct way to reloadData on a UITableView?

I am trying to append objects to my data source and then reload the table. Is this the correct way of approaching it? self.items is my datasource //Copy current items self.itemsCopy = [self.items mutableCopy];//[[NSMutableArray alloc] initWithArray:self.items copyItems:NO]; NSLog(@"Copy Size before append: %d",[itemsCo...

how to build packages for iphone?

Hi, I am intersted in developing packages for iphone, which I can use directly in my iphone applications when required. can anyone help me with some good links. Thanks, ...

How do I make a file that identifies as a custom UTI type?

Right now I have an application that generates an XML file. We'll call it someFile.myapp When my app saves the file and look at it using mdls it has a kMDItemContentType of "dyn.234kdfsjk23jk24234kjfd" How can I get the UTI type of the file to be a custom value like com.mycompany.myapp? ...