MASExampleViewController.m 779 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // MASExampleOneViewController.m
  3. // Masonry
  4. //
  5. // Created by Jonas Budelmann on 20/07/13.
  6. // Copyright (c) 2013 cloudling. All rights reserved.
  7. //
  8. #import "MASExampleViewController.h"
  9. #import "MASExampleBasicView.h"
  10. @interface MASExampleViewController ()
  11. @property (nonatomic, strong) Class viewClass;
  12. @end
  13. @implementation MASExampleViewController
  14. - (id)initWithTitle:(NSString *)title viewClass:(Class)viewClass {
  15. self = [super init];
  16. if (!self) return nil;
  17. self.title = title;
  18. self.viewClass = viewClass;
  19. return self;
  20. }
  21. - (void)loadView {
  22. self.view = self.viewClass.new;
  23. self.view.backgroundColor = [UIColor whiteColor];
  24. }
  25. #ifdef __IPHONE_7_0
  26. - (UIRectEdge)edgesForExtendedLayout {
  27. return UIRectEdgeNone;
  28. }
  29. #endif
  30. @end