ShareTableViewCell.m 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /**
  2. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  3. * SPDX-License-Identifier: GPL-3.0-or-later
  4. */
  5. #import "ShareTableViewCell.h"
  6. #import "AFNetworking.h"
  7. #import "AFImageDownloader.h"
  8. #import "NCAppBranding.h"
  9. #import "NextcloudTalk-Swift.h"
  10. NSString *const kShareCellIdentifier = @"ShareCellIdentifier";
  11. NSString *const kShareTableCellNibName = @"ShareTableViewCell";
  12. CGFloat const kShareTableCellHeight = 56.0f;
  13. @implementation ShareTableViewCell
  14. - (void)awakeFromNib {
  15. [super awakeFromNib];
  16. self.avatarImageView.layer.cornerRadius = 18.0;
  17. self.avatarImageView.layer.masksToBounds = YES;
  18. self.avatarImageView.backgroundColor = [NCAppBranding placeholderColor];
  19. self.avatarImageView.contentMode = UIViewContentModeCenter;
  20. }
  21. - (void)prepareForReuse
  22. {
  23. [super prepareForReuse];
  24. // Fix problem of rendering downloaded image in a reused cell
  25. [self.avatarImageView cancelCurrentRequest];
  26. self.avatarImageView.image = nil;
  27. self.titleLabel.text = @"";
  28. }
  29. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  30. [super setSelected:selected animated:animated];
  31. // Configure the view for the selected state
  32. }
  33. @end