Tag Archives: code

Blocks to remove redundancy

Blocks have many complicated uses, from event-based code to multithreading. But they can also be used for very trivial tasks, such as removing redundant lines from code. Here’s a common operation for me: Split a list into sublists based on … Continue reading

Posted in Technology | Tagged , , , | Comments Off

Changing UINavigationBar’s title text color

You can’t, directly, but you can substitute your own view. For example, start with Apple’s NavBar sample. Drop this code into initWithNibName:bundle: in PageThreeViewController.m: ? – (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // this will … Continue reading

Posted in Technology | Tagged , , | Comments Off