Best way to implement Enums with Core Data
What is the best way to bind Core Data entities to enum values so that I am able to assign a type property to the entity? In other words, I have an entity called Item with an itemType property that I want to be bound to an enum, what is the best way of going […]
How to use prepareForReuse method
I found this method called – (void)prepareForReuse. I read the document but i don’t understand how to use it. When i scroll my tableview, it gets stuck, or has slow scrolling and i intend to use prepareForReuse. Can someone please point me to a good tutorial or give me some sample code so i could […]
create uibutton subclass
I tried to subclass UIButton to include an activity indicator, but when i use initWithFrame:(since i’m subclassing uibutton i’m not using buttonWithType:) the button doesn’t display. Also how would i set the button type in this case?: my view controller: ActivityIndicatorButton *button = [[ActivityIndicatorButton alloc] initWithFrame:CGRectMake(10, 10, 300, 44)]; [button addTarget:self action:@selector(buttonPressed) forControlEvents:UIControlEventTouchUpInside]; [button setTitle:@”Older […]
How get a datetime column in SQLite with Objective C
How do you get a datetime column in SQLite with Objective C? I have a table with 4 fields: pk, datetime, value1 and value2. pk (primary key), value1 and value2 are integers so I am using: int value1 = sqlite3_column_int(statement, 2); int value1 = sqlite3_column_int(statement, 3); But what should I use for datetime?
Is it possible to reverse-engineer my iPhone application?
I have created an iPhone application, and I want to send the compiled .app file to my client, so he can install and test this iPhone application on his device. Is it possible that he can view the contents of this .app file, like the resource files used in this application (images, sound files, etc.)? […]
iphone error: expected '=', ',', ';', 'asm' or '__attribute__' before ' 'foo'
I’m trying to port the speakhere example into another app and I’m having issues. I copied all the files, and all the frameworks, but for some reason I get a bunch of compile errors that I’ve never seen before and thus don’t know what to do. The only difference is that i’m not suing IB […]
iPhone – What are reuseIdentifiers (UITableViewCell)?
From the official documentation: The reuse identifier is associated with a UITableViewCell object that the table-view’s delegate creates with the intent to reuse it as the basis (for performance reasons) for multiple rows of a table view. It is assigned to the cell object in initWithFrame:reuseIdentifier: and cannot be changed thereafter. A UITableView object maintains […]
Get RGB value from UIColor presets
I my application I pass RGB color value to server. My app uses UIColor predefined values, like [UIColor grayColor], [UIColor redColor]. I know that I can use following code: const CGFloat *c = CGColorGetComponents(color.CGColor) but only for colors that are in RBG color space, however, [UIColor grayColor] is not. Is there any way to get […]