JCHATLoadMessageTableViewCell.m 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // JCHATLoadMessageTableViewCell.m
  3. // JChat
  4. //
  5. // Created by HuminiOS on 15/10/23.
  6. // Copyright © 2015年 HXHG. All rights reserved.
  7. //
  8. #import "JCHATLoadMessageTableViewCell.h"
  9. #import "JChatConstants.h"
  10. @implementation JCHATLoadMessageTableViewCell
  11. - (void)awakeFromNib {
  12. [super awakeFromNib];
  13. // Initialization code
  14. }
  15. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  16. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  17. if (self != nil) {
  18. loadIndicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(kApplicationWidth/2 - 10, 10, 20, 20)];
  19. [loadIndicator startAnimating];
  20. loadIndicator.hidesWhenStopped = NO;
  21. loadIndicator.color = [UIColor grayColor];
  22. [self.contentView addSubview:loadIndicator];
  23. self.backgroundColor = [UIColor clearColor];
  24. self.selectionStyle = UITableViewCellSelectionStyleNone;
  25. }
  26. return self;
  27. }
  28. - (void)startLoading {
  29. [loadIndicator startAnimating];
  30. }
  31. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  32. [super setSelected:selected animated:animated];
  33. // Configure the view for the selected state
  34. }
  35. @end