03 Apr

Styling UISearchBar placeholder

I searching around for a while try to figure (and find) a way to style a uisearchbar’s placeholder away from its standard implementation to a white text colour. I eventually managed to get there by finally understanding that the placeholder isn’t a uitextfield’s text property with some fancy logic behind it but rather a uilabel […]

05 Nov

Beware the danger of estimatedHeightForRowAtIndexPath!

iOS 7 introduced a new UITableViewDelegate method: – (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath; which improved the performance of displaying your tableview and I think is a great addition. However when implementing this I noticed that some of the rows in my tableview went missing. After a lot of scrutinising of my code it turned out that […]

28 Jun

Confinement pattern for NSManagedObjectContext in NSOperation

I started a new project and had copied over some helper classes that I had used for my nsoperation classes one of them was the following: – (NSManagedObjectContext *) localManagedObjectContext { if (!_localManagedObjectContext) { _localManagedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSConfinementConcurrencyType]; [_localManagedObjectContext setParentContext:[CDAServiceManager managedObjectContext]]; [_localManagedObjectContext setUndoManager:nil]; [_localManagedObjectContext setMergePolicy:NSMergeByPropertyObjectTrumpMergePolicy]; } return _localManagedObjectContext; } I kept getting an error […]

  • Facebook
  • Twitter