The color of a UISegmentedControl in the UIKit is customizable only in the bar style mode, so if one uses the plain or bordered mode, the only possible color is blue. This could be a problem if blue does not fit well in your app or in a view.

The only way to support other colors is to subclass the UISegmentedColor and draw the view yourself. That’s what I did in the MCSegmentedControl class, here’s how it looks with a green tint color.


Read the rest of this entry »

In a iPhone app I’m currently developing, I have a tipical Core Data object model with two entities (called Collection and Item) in a one-to-many relationship, and two table views for the entities, the second appearing when selecting a Collection in the first. The two table views have their own controller (which implements NSFetchedResultsControllerDelegate), managed object context and NSFetchedResultsController. The second table has has a reference to the Collection object, used to build a predicate in this way:

[NSPredicate predicateWithFormat:@"collection == %@", [self.collection objectID]]

Read the rest of this entry »

update: this issue has been resolved, check out the official repository on GitHub

I was integrating the MGTwitterEngine in an iPhone App, and I noticed that there was something wrong with the status ID. In fact they were handled as int values, but the current ids are reaching 5billion, as you can see on the site Twitpocalypse.

So the solution is to treat them as long long int, which can be done editing the MGTwitterLibXMLParser.m file adding a method: Read the rest of this entry »