devinross/tapkulibrary — pull request #213 by huguesbr (2013-01-24 17:05:03+00:00)
Title: Customization for TKAlertCenter alerts

AlertCenter is pretty cool, but you can't customize alert.

Instead of exposing alertView class. I've decided to add two methods (alertFont, alertTextColor, alertBackgroundColor) on AlertCenter itself.

Both method are proxy to alertCenter's alertView, and can be change at time any time (the alert is redraw each time it's shown).

```Objective-C

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[self.window makeKeyAndVisible];

/*
Be aware that accessing defaultCenter before window is visible will capture an invalid frame.
via _alertFrame = [UIApplication sharedApplication].keyWindow.bounds in [TKAlertCenter init]
*/
[TKAlertCenter defaultCenter].alertTextFont = [UIFont boldSystemFontOfSize:19];
[TKAlertCenter defaultCenter].alertTextFont = [UIFont boldSystemFontOfSize:19];
[TKAlertCenter defaultCenter].alertBackgroundColor = [UIColor redColor];

return YES;
}
```

I've also move default alertFont, alertTextColor and alertBackgroundColor to constants in top of TKAlertCenter.m.