CYManager.m 560 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // CYManager.m
  3. // shiku_im
  4. //
  5. // Created by Ron on 2019/11/18.
  6. // Copyright © 2019 Reese. All rights reserved.
  7. //
  8. #import "CYManager.h"
  9. #import "CYModel.h"
  10. @implementation CYManager{
  11. CYModel *_model;
  12. }
  13. static CYManager *_instance;
  14. + (instancetype)sharedManager {
  15. return _instance;
  16. }
  17. + (void)initialize {
  18. if (self == [CYManager class]) {
  19. _instance= [[CYManager alloc] init];
  20. [_instance initWithData];
  21. }
  22. }
  23. -(void)initWithData{
  24. _model = [[CYModel alloc] init];
  25. }
  26. -(CYModel *)getModel{
  27. return _model;
  28. }
  29. @end