MASExampleViewController.m 629 B

12345678910111213141516171819202122232425262728293031323334
  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. }
  24. @end