objective-c

Deleting Buttons

Hi, I have run-time created buttons in a View, placed in a grid-looking way. Now I want the user to have the possibility to delete each and every one of them by choosing. How can I identify to one the user have chosen to properly delete it out from View? I use Tag property in the creating process. Thank you. ...

Changing Views from UISegmentedControl

I have a best practice type of question regarding Nibs and UISegmentedControls. I have a nib file which contains a UISegmentedControl with 3 buttons. Each of which displays a different view in the main part of the window when toggled. Everything is working fine but I suspect my approach is flawed and was wondering if someone could sugg...

How do I obtain the iPhone International Mobile Equipment Identity programmatically?

Hey, calling #*06# tells the IMEI ( International Mobile Equipment Identity ) of the device. I checked International Numbering Plans and found out that this actually is the IMEI number. Is it possible to obtain it programmatically? Thanks ...

Google Calendar API: GDataEntryCalendarEvent question

Hi, I'm trying to use the google GData api to insert an event in a google calendar. My question is this: I don't see anywhere in the header files for GDataEntryCalendarEvent the ability to add guests to an event? Anyone know how to do that? ...

IPhone Objective-C only enable a button if NSTextfield is not blank

I have a button that I only want enabled when a textfield is not blank. I have been trying to do this by implementing the following method, without any luck. - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string{ Is there another delegate method that I could imple...

Cocoa-Touch, Core Data: Compiler cannot find the NSManagedObjectContext (+ other core data classes)

I have an application that will use Core Data. I've added the Core Data framework to the linked library list in XCode. In one of my classes, I try to set up the NSManagedObjectContext along with the other required classes as folows: @interface MyClass : NSObject { NSManagedObjectModel *managedObjectModel; NSManagedObjectContext...

Cocoa-Touch: How do I see if two NSDates are in the same day?

I need to know if two NSDate instances are both from the same day. Is there an easier/better way to do it than getting the NSDateComponents and comparing day/month/year? ...

How/where to release global variables in objective c? -iphone

I have gone through the following question. http://stackoverflow.com/questions/1528696/objective-c-where-do-you-dealloc-global-static-variables But the question is related on static variables. It has something different situation then mine. I have following code in application. //.h file #import "cocos2d.h" #import "something.h" #imp...

Creating a tab view programatically with Cocoa/Objective C

I need to create a tab view programatically using objective C and cocoa but I can't find any good resources showing how to do this. Can anyone suggest something? ...

[TDD] Testing Target-Action wiring

Hi, i came across the following blog post that explained the topic. However I do have troubles with the given samples. It verifies target-action binding like so: STAssertEquals([doSomethingButton action], @selector(doSomething:), @"The button should send -doSomething: to its target."); STAssertEquals([doSomethingButton target], _wi...

Aquatic Prime on 10.6?

Hello, I have 2 applications that I use with Aquatic Prime. One is an application just with the Aquatic Prime framework, and the other is an application that I've been working on that has been incorporated with the Aquatic Prime framework. The first application I mentioned before has its SDK set to 10.5 with the architecture to 32-bit. ...

Validation Errors with Core Data Migration

I'm encountering a very annoying error using Core Data on Mac OS X 10.5. All entities have classes in my application which share the same names. Up to this point, I've done 5 migrations without problems. I'm using the XML data store. I've got V5 of my data model with 13 entities, 4 of which are abstract. It looks like this: What I d...

Cocoa-Touch, Core Data: Getting exception when trying to insertNewObjectForEntityForName:inManagedObjectContext:

I'm following this how-to to implement Core Data storage in my app: I have a Model.xcdatamodel which defines a Something model. I've used XCode to generate a class for that model. I've imported the class in my .m file where I'm trying to: Something* s = (Something *)[NSEntityDescription insertNewObjectForEntityForName:@"Something" inM...

How do I set Cocoa NSLevelIndicatorCell values?

I have a tableview. One of the columns in the tableview uses an NSLevelIndicatorCell. I want to be able to allow the user to edit the warn and critical values for the level indicator such that when they enter a value into a a "warning level" textbox, it changes the warn value of the level indicators being displayed in ALL of the tablev...

Call a method when switchig views with UITabBar

Is there any way to automatically call a custom method when switching views usig a UITabBarController? Like, I want to he able to, when I set a NSString in one view in a UILabel, haave it automatically update a different label on a different tab with the same string. Thank you! ...

Best practice? - Array/Dictionary as a Core Data Entity Attribute

I am new to Core Data. I have noticed that collection types are not available as attribute types and would like to know what the most efficient way is of storing array/dictionary type data as an attribute (e.g. the elements that make up an address like street, city, etc. does not require a separate entity and is more conveniently stored ...

Mac OS X: Best way to implement a card game GUI

Hi, I've started programming on Mac OS X in Objective-C and decided to create a little card game. At first I create a command line version. If everything works fine I would like to implement a GUI: Nothing big, just a green window with cards which can be dragged and dropped. Since I don't have any idea about how to do this: What can I ...

Writing YUV data into a CGContext

How can I write a YUV frame data into a CGContext? ...

iPhone Web Service Communication

I have been searching around the web all day for the best way to interface my iPhone application with a Linq .NET SOAP web service. I think that this project is my answer: wsdl2objc http://code.google.com/p/wsdl2objc/wiki/UsageInstructions The software creates several classes. It looks great, but the documentation is very limited and ...

UIPickerView selectRow in multiple components in order (one after another)

Hi, I've the following method (SPIN) that select 7 values (taken from an array) into my multi-cols pickerview. for(int i = 0; i < 7; i++) { int newValue; newValue = [[array objectAtIndex:i] intValue]; [picker selectRow:newValue inComponent:i animated:YES]; [picker reloadComponent:i]; } The problem here is that while it...