BaseXibView.m 605 B

12345678910111213141516171819202122232425
  1. //
  2. // BaseXibView.m
  3. // UniversalApp
  4. //
  5. // Created by 志刚杨 on 2018/1/26.
  6. // Copyright © 2018年 voidcat. All rights reserved.
  7. //
  8. #import "BaseXibView.h"
  9. @implementation BaseXibView
  10. +(instancetype)getView{
  11. NSString *className = NSStringFromClass([self class]);
  12. UINib *nib = [UINib nibWithNibName:className bundle:nil];
  13. return [nib instantiateWithOwner:nil options:nil].firstObject;
  14. }
  15. /*
  16. // Only override drawRect: if you perform custom drawing.
  17. // An empty implementation adversely affects performance during animation.
  18. - (void)drawRect:(CGRect)rect {
  19. // Drawing code
  20. }
  21. */
  22. @end