This file contains hidden or 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
extension CGRect | |
{ | |
/** Creates a rectangle with the given center and dimensions | |
- parameter center: The center of the new rectangle | |
- parameter size: The dimensions of the new rectangle | |
*/ | |
init(center: CGPoint, size: CGSize) | |
{ | |
self.init(x: center.x - size.width / 2, y: center.y - size.height / 2, width: size.width, height: size.height) |
This file contains hidden or 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
#pragma mark - Init | |
- (void)setup | |
{ | |
<#view_setup_code#> | |
} | |
- (instancetype)initWithCoder:(NSCoder *)decoder | |
{ | |
self = [super initWithCoder:decoder]; |