One of the ObjC examples could be more concise. He writes:
id navigationBar = [UINavigationBar appearance];
[navigationBar setBackgroundImage:[UIImage imageNamed:@"nav-background.png"] forBarMetrics:UIBarMetricsDefault];
[navigationBar setTitleTextAttributes:[[NSDictionary alloc] initWithObjectsAndKeys:
[UIFont cheddarFontWithSize:24.0f], UITextAttributeFont,
[UIColor colorWithWhite:0.0f alpha:0.4f], UITextAttributeTextShadowColor,
[UIColor whiteColor], UITextAttributeTextColor,
nil]];
which could be id navigationBar = [UINavigationBar appearance];
[navigationBar setBackgroundImage:[UIImage imageNamed:@"nav-background.png"] forBarMetrics:UIBarMetricsDefault];
[navigationBar setTitleTextAttributes:@{
UITextAttributeFont : [UIFont cheddarFontWithSize:24],
UITextAttributeTextShadowColor : [UIColor colorWithWhite:0 alpha:0.4],
UITextAttributeTextColor : [UIColor whiteColor],
}];
as compares to the Ruby, navigationBar = UINavigationBar.appearance
navigationBar.setBackgroundImage(UIImage.imageNamed('nav-background.png'), forBarMetrics: UIBarMetricsDefault)
navigationBar.setTitleTextAttributes({
UITextAttributeFont: UIFont.cheddarFontWithSize(24.0),
UITextAttributeTextShadowColor: UIColor.colorWithWhite(0.0, alpha:0.4),
UITextAttributeTextColor: UIColor.whiteColor
})
Also kind of wondering where he got "cheddarFont". :-)