objective-c

Dropdown menu within a UITableView

Hello, I'm looking to build or incorporate a dropdown menu system into an app I'm building however I need some help figureing out how it's accomplished. From my best guess I'd have to use the UIActionSheet, however it doesn't seem all that customizable. The best example I've come accross is within the AppShopper iOS application: Drop ...

View Behind View rolldown effect on iOS (Like folders on home screen)

What would be the best way to accomplish the home screen folder roll-open effect with views in Objective C? ...

How do you use OpenGLES to open an image file, do some work, then save the image file, in the background (offline)?

So I'd like to create a class that accepts a CGImage from an image file I just read from disk, does work on that image texture (color transformations) then returns the texture as a CGImage and does all this in the background w/out drawing to screen. I've looked at Apple's demo app on GLImageProcessing but it draws all the processing to ...

Searching XML from Objective-C

My ipad app draws large amounts of text from an xml file and displays them on individual pages in a UIWebView, with the page determined by the XML element containing the text. What is the best way to enable the user to search the entire text for an input string? Should I have Objective-C search the XML and get back the page data, etc? ...

Objective-C Question about adding a method

Im a newbie to Objective -C and having some issues with an assignment. The question is: Add a Method declaration called buttonClick that takes in a variable of type id called sender, and "returns" an IBAction event I have no idea how to do this This is what I have so Far but getting errors // method declaration called ButtonClick @prop...

Cannot set an NSWindow's position

I have a class that extends NSWindowController and I am trying to position the window it controls. The window displays all of the expected contents and functions correctly, but when I try and position its starting location on the screen in the initWithWindowNibName method, the position does not change. Here is the code: NSPoint p = NSMa...

UIAlertView Delegates

Can someone explain how the delegate to a UIAlertView works? Is it automatically called or do I have to call it? Eg: - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex ...

Can I use instance variables with an NSManagedObject?

So I got entities Level and Tile. Level has a to-many relationship with Tile. Tile has a property 'index'. Right now I'm using this code to get the tiles array of Level sorted: - (NSArray *)sortedTiles { NSMutableArray *sortedTiles = [NSMutableArray arrayWithArray:[self.tiles allObjects]]; NSSortDescriptor *sortDescriptor...

Getting an object from an NSSet

If you can't get an object with objectAtIndex: from an NSSet then how do you retrieve objects? ...

objective-c/cocoa-touch - comparison between two NSStrings failing even though they are identical

i have an if statement comparing two NSStrings, one is user input from a UITextField the other is a NSString created from random integers between 0-9 inclusive, however the comparison is failing everytime even thought they are the same which is shown in the log from an NSLog call. so can anyone see anything i'm doing wrong in the supplie...

How to return an NSMutableArray from an NSSet

I'm able to put the contents of an NSSet into an NSMutableArray like this: NSMutableArray *array = [set allObjects]; The compiler complains though because [set allObjects] returns an NSArray not an NSMutableArray. How should this be fixed? ...

Connect a UILabel in Interface Builder and XCode?

I am trying to do something as simple as add a Label to a View in XCode and IB and I can't figure out how to do it. All the samples I find online are for older versions of IB so the directions aren't correct. I have a label on my .xib file, in my Controller.h file I have an IBOutlet UILabel declared with a Property set up. In my Contr...

Can CoreData handle polymorphic subclasses?

I have a CoreData model (managed object) called Item: @interface Item : NSManagedObject { NSString * type; } @property (retain) NSString * type; @end I also have two subclasses of Item: @interface Circle : Item @end @interface Square : Item @end I track the subclass of the item by the type property. When I fetch my Items, I ge...

What is the difference between these two ViewController Pushes?

What are the differences and the implications of the differences between the boilerplate push provided by apple <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; NSManagedObject *selectedObject = [[self fetchedResultsController] objectAtIndexPath:indexPa...

What is the last method called in the delegate of MKMapView

Hi everyone, I am implementing a MKMapKit based application. I need a clarification that what is the last called delegate method in MKMapKit can any one suggest me on this? Thanks in Advance, Sekhar Bethalam. ...

delaying statement execution objective c

I have the following code but doesnt work [self performSelector:@selector([A1 setImage:[UIImage imageNamed:@"m1.10002.png"] forState:UIControlStateNormal]) withObject:A1 afterDelay:0.1]; How can I execute the following statement after a certain time [A1 setImage:[UIImage imageNamed:[NSString stringWithFormat:@"...

Deleting a row causes app to end; no console output

I've got a UITableViewController with a bunch of random items in it. I want to be able to add items to it, and delete items from it. I have a UITextField in the first section header, so you can type in a word/phrase and add it to the list. You can delete words from the list without issue, however, if you add a word to the list, then tr...

IPhone: Why are Bulk Inserts in Core Data so slow?

So I'm making an iphone app that just has a thousand entries that I'm reading from an xml file into core data. But inserting these records takes like 10 seconds on the device. It's pretty ridiculous. The schema is very simple, just one table. I.e., no relationships or anything. To see what I mean, you can just go to: 1. File -> New Pr...

NSString issue for iphone application

I'm using a NSDictionary to get a NSString from a plist with the following code: NSString *fullPath = [[NSBundle mainBundle] pathForResource:@"TestIds" ofType:@"plist"]; NSDictionary *dictionary = [[NSDictionary dictionaryWithContentsOfFile:fullPath] retain]; NSString *testid = [dictionary objectForKey:@"testId"]; and then I save it i...

My iPhone core data app runs perfectly the first time but crashes when run after that

Hi, my app is based around two classes: Jam and JamItem, each with a TableViewController to display / add items. The model contains two entities for the two classes, and there is an optional one-to-one relationship between them. JamItem has a name field and a price field. Jam has a quantity field. There are corresponding NSManagedObject...