View Example.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let color = "blue" | |
let num = 42 | |
localized("Colorless green ideas sleep furiously.") | |
localized("Colorless \(color) ideas sleep furiously.") | |
localized("\(num.formatted("%05d")) colorless green ideas sleep furiously.") |
View UIView+AutoLayout wackiness
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIButton *bottomButton = [UIButton newAutoLayoutView]; | |
[bottomButton setTitle:@"OKAY" forState:UIControlStateNormal]; | |
[bottomButton setTitleColor:[UIColor colorWithHexString:@"#282828"] forState:UIControlStateNormal]; | |
bottomButton.titleLabel.font = [UIFont fontWithName:@"HelveticaNeue-Light" size:15.0f]; | |
bottomButton.layer.borderWidth = 1.0f; | |
bottomButton.layer.borderColor = [[UIColor blackColor] CGColor]; | |
self.bottomButton = bottomButton; | |
[self.overlay addSubview:bottomButton]; | |
- (void)updateConstraints |