CommonBaseViewController.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // CommonBaseViewController.h
  3. // CommonLibrary
  4. //
  5. // Created by Alexi Chen on 2/28/13.
  6. // Copyright (c) 2013 AlexiChen. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @interface CommonBaseViewController : UIViewController
  10. {
  11. @protected
  12. UIImageView *_backgroundView;
  13. }
  14. @property (nonatomic, strong) UIImageView *backgroundView;
  15. @property (nonatomic, assign) BOOL asChild;
  16. @property (nonatomic, assign) CGSize childSize;
  17. // 是否有背景图
  18. - (BOOL)hasBackgroundView;
  19. // 样式是否与iOS6之前一致
  20. - (BOOL)sameWithIOS6;
  21. // 配置界面的初始化的参数
  22. - (void)configParams;
  23. // hasBackgroundView 返回YES, 使用此方法添加背景
  24. - (void)addBackground;
  25. - (void)configContainer;
  26. // 有背景时,使用此方法配置背景
  27. - (void)configBackground;
  28. // 有背景时,布局背景
  29. - (void)layoutBackground;
  30. //// 布局子控件
  31. //- (void)layoutSubviewsFrame;
  32. @end
  33. @interface CommonBaseViewController (AutoLayout)
  34. // 是否支持autoLayout
  35. - (BOOL)isAutoLayout;
  36. // 添加自动布局相关的constraints
  37. - (void)autoLayoutOwnViews;
  38. @end