Skip to content

Instantly share code, notes, and snippets.

@Antol
Created November 26, 2014 22:00
Show Gist options
  • Save Antol/60e06d4bd00b32cc0320 to your computer and use it in GitHub Desktop.
Save Antol/60e06d4bd00b32cc0320 to your computer and use it in GitHub Desktop.
Resizable container view
//
// 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