Created
November 26, 2014 22:00
-
-
Save Antol/60e06d4bd00b32cc0320 to your computer and use it in GitHub Desktop.
Resizable container view
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
// | |
// Created by Antol Peshkov on 25.11.14. | |
// Copyright (c) 2014 restaurantTradition. All rights reserved. | |
// | |
#import "APResizableContainerView.h" | |
#import "Masonry.h" | |
@implementation APResizableContainerView | |
- (void)addSubview:(UIView *)subview | |
{ | |
subview.translatesAutoresizingMaskIntoConstraints = NO; | |
[super addSubview:subview]; | |
@weakify(self); | |
[subview makeConstraints:^(MASConstraintMaker *make) { | |
@strongify(self); | |
make.edges.equalTo(self); | |
}]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment