GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Change prepare to cellWillAppear · zhmios/RETableViewManager@d910068

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • RETableViewManagerExample/RETableViewManagerExample/Classes/Views
    • ListImageCell.m
  • RETableViewManager
    • Cells
      • RETableViewBoolCell.m
      • RETableViewNumberCell.m
      • RETableViewTextCell.m
    • RETableViewCell.h
    • RETableViewCell.m
    • RETableViewManager.m
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎RETableViewManager/Cells/RETableViewBoolCell.m‎

Copy file name to clipboardExpand all lines: RETableViewManager/Cells/RETableViewBoolCell.m
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ - (void)cellDidLoad
4545
self.accessoryView = _switchView;
4646
}
4747

48-
- (void)prepare
48+
- (void)cellWillAppear
4949
{
5050
self.textLabel.text = self.item.title;
5151
_switchView.on = self.item.value;
Collapse file

‎RETableViewManager/Cells/RETableViewNumberCell.m‎

Copy file name to clipboardExpand all lines: RETableViewManager/Cells/RETableViewNumberCell.m
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ - (void)cellDidLoad
3434
[self addSubview:self.textField];
3535
}
3636

37-
- (void)prepare
37+
- (void)cellWillAppear
3838
{
39-
[super prepare];
39+
[super cellWillAppear];
4040

4141
self.textLabel.text = self.item.title;
4242
self.textField.text = self.item.value;
Collapse file

‎RETableViewManager/Cells/RETableViewTextCell.m‎

Copy file name to clipboardExpand all lines: RETableViewManager/Cells/RETableViewTextCell.m
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ - (void)setSelected:(BOOL)selected animated:(BOOL)animated
6060
}
6161
}
6262

63-
- (void)prepare
63+
- (void)cellWillAppear
6464
{
65-
[super prepare];
65+
[super cellWillAppear];
6666

6767
self.textLabel.text = self.item.title;
6868
_textField.text = self.item.value;
Collapse file

‎RETableViewManager/RETableViewCell.h‎

Copy file name to clipboardExpand all lines: RETableViewManager/RETableViewCell.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
+ (CGFloat)heightWithItem:(NSObject *)item tableViewManager:(RETableViewManager *)tableViewManager;
4545

4646
- (void)cellDidLoad;
47-
- (void)prepare;
47+
- (void)cellWillAppear;
4848
- (void)refreshActionBar;
4949

5050
- (UIResponder *)responder;
Collapse file

‎RETableViewManager/RETableViewCell.m‎

Copy file name to clipboardExpand all lines: RETableViewManager/RETableViewCell.m
+14-11Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828

2929
@implementation RETableViewCell
3030

31+
+ (CGFloat)heightWithItem:(NSObject *)item tableViewManager:(RETableViewManager *)tableViewManager
32+
{
33+
return tableViewManager.style.cellHeight;
34+
}
35+
3136
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
3237
{
3338
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
@@ -37,6 +42,9 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
3742
return self;
3843
}
3944

45+
#pragma mark -
46+
#pragma mark Cell life cycle
47+
4048
- (void)cellDidLoad
4149
{
4250
self.actionBar = [[REActionBar alloc] initWithDelegate:self];
@@ -49,17 +57,7 @@ - (void)cellDidLoad
4957
}
5058
}
5159

52-
- (BOOL)hasCustomBackgroundImage
53-
{
54-
return [self.tableViewManager.style backgroundImageForCellType:RETableViewCellFirst] || [self.tableViewManager.style backgroundImageForCellType:RETableViewCellMiddle] || [self.tableViewManager.style backgroundImageForCellType:RETableViewCellLast] || [self.tableViewManager.style backgroundImageForCellType:RETableViewCellSingle];
55-
}
56-
57-
+ (CGFloat)heightWithItem:(NSObject *)item tableViewManager:(RETableViewManager *)tableViewManager
58-
{
59-
return tableViewManager.style.cellHeight;
60-
}
61-
62-
- (void)prepare
60+
- (void)cellWillAppear
6361
{
6462
[self refreshActionBar];
6563

@@ -73,6 +71,11 @@ - (void)prepare
7371
}
7472
}
7573

74+
- (BOOL)hasCustomBackgroundImage
75+
{
76+
return [self.tableViewManager.style backgroundImageForCellType:RETableViewCellFirst] || [self.tableViewManager.style backgroundImageForCellType:RETableViewCellMiddle] || [self.tableViewManager.style backgroundImageForCellType:RETableViewCellLast] || [self.tableViewManager.style backgroundImageForCellType:RETableViewCellSingle];
77+
}
78+
7679
- (void)refreshActionBar
7780
{
7881
[self.actionBar.navigationControl setEnabled:[self indexPathForPreviousResponder] != nil forSegmentAtIndex:0];
Collapse file

‎RETableViewManager/RETableViewManager.m‎

Copy file name to clipboardExpand all lines: RETableViewManager/RETableViewManager.m
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
129129

130130
if ([item isKindOfClass:[RETableViewItem class]])
131131
cell.detailTextLabel.text = ((RETableViewItem *)item).detailLabelText;
132-
[cell prepare];
132+
[cell cellWillAppear];
133133

134134
if ([_delegate respondsToSelector:@selector(tableView:styleCell:atIndexPath:)])
135135
[_delegate tableView:tableView styleCell:cell atIndexPath:indexPath];
Collapse file

‎RETableViewManagerExample/RETableViewManagerExample/Classes/Views/ListImageCell.m‎

Copy file name to clipboardExpand all lines: RETableViewManagerExample/RETableViewManagerExample/Classes/Views/ListImageCell.m
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reus
2626
return self;
2727
}
2828

29-
- (void)prepare
29+
- (void)cellWillAppear
3030
{
31-
[super prepare];
31+
[super cellWillAppear];
3232
[_pictureView setImageWithURL:self.item.imageURL];
3333
}
3434

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.