This repository has been archived by the owner on Apr 21, 2019. It is now read-only.
/
UITableViewCellLayoutManager.h
125 lines (103 loc) · 6.39 KB
/
UITableViewCellLayoutManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
/**
* This header is generated by class-dump-z 0.1-11o.
* class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3.
*/
#import "UIKit-Structs.h"
#import <Foundation/NSObject.h>
#import <UIKit/UITableViewCell.h>
@class UIImageView;
@interface UITableViewCellLayoutManager : NSObject {
}
+(UITableViewCell*)layoutManagerForTableViewCellStyle:(UITableViewCellStyle)tableViewCellStyle;
// called by -[UITableViewCellLayoutManager layoutSubviewsOfCell:].
// returns the font size of the default text label.
-(CGFloat)defaultTextLabelFontSizeForCell:(UITableViewCell*)cell;
// called by -[UITableViewCellLayoutManagerValue1 layoutSubviewsOfCell:], etc.
// returns the font size of the detail text label.
-(CGFloat)defaultDetailTextLabelFontSizeForCell:(UITableViewCell*)cell;
// to be used by -imageViewForCell:.
// gives the default "imageView" property of a UITableViewCell.
// Do not overload.
-(UIImageView*)defaultImageViewForCell:(UITableViewCell*)cell;
// to be used by -textLabelForCell:.
// gives the default "textLabel" property of a UITableViewCell.
// Do not overload.
-(UILabel*)defaultLabelForCell:(UITableViewCell*)cell;
// to be used by -editableTextFieldForCell:.
// gives the default "editableTextField" property of a UITableViewCell.
// Do not overload.
-(UITextField*)defaultEditableTextFieldForCell:(UITableViewCell*)cell;
// returns the expected result of "imageView" of the cell.
// you should either return nil, or modify the result of -defaultImageViewForCell:.
-(UIImageView*)imageViewForCell:(UITableViewCell*)cell;
// returns the expected result of "textLabel" of the cell.
// you should either return nil, or modify the result of -defaultTextLabelForCell:.
-(UILabel*)textLabelForCell:(UITableViewCell*)cell;
// returns the expected result of the "detailTextLabel" of the cell.
// you should either return nil, or modify the result of -defaultTextLabelForCell:.
-(UILabel*)detailTextLabelForCell:(UITableViewCell*)cell;
// returns the expected result of the "editableTextField" of the cell.
// you should either return nil, or modify the result of -defaultEditableTextFieldForCell:.
-(UITextField*)editableTextFieldForCell:(UITableViewCell*)cell;
// called by -[UITableViewCellLayoutManager layoutSubviewsOfCell:].
// returns the default identation (left padding) of the content view.
-(CGFloat)contentIndentationForCell:(UITableViewCell*)cell;
// called by -[UITableViewCell layoutSubviews].
// layout different subviews of the cell.
// subclasses must call [super layoutSubviewsOfCell:cell].
-(void)layoutSubviewsOfCell:(UITableViewCell*)cell;
// called by -[UITableViewCell willTransitionToState:].
// the cell will be transitioning the a new editing state. Change the layout for it.
// Do not overload.
-(void)cell:(UITableViewCell*)cell willTransitionToState:(UITableViewCellStateMask)stateMask;
// called by -[UITableViewCell didTransitionToState:].
// the cell has been transitioned the a new editing state. Change the layout for it.
// Do not overload.
-(void)cell:(UITableViewCell*)cell didTransitionToState:(UITableViewCellStateMask)state;
// called by -[UITableViewCell contentRectForState:]
// Not used anywhere. Do not overload.
-(CGRect)contentRectForCell:(UITableViewCell*)cell forState:(UITableViewCellStateMask)state;
// called by -cell:willTransitionToState:.
// should an edit control appear by transitioning to the new state?
// by default, returns YES if (!cell.wasSwiped && (cell.editingStyle != 0 || cell.shouldIndentWhileEditing)).
-(BOOL)editControlShouldAppearForCell:(UITableViewCell*)cell;
// called by cell:willTransitionToState:.
// should an edit control fade out to transparent when requested?
// by default, always returns YES.
-(BOOL)editControlShouldFadeForCell:(UITableViewCell*)editControl;
-(CGRect)editControlStartingRectForCell:(UITableViewCell*)cell forNewEditingState:(BOOL)newEditingState;
-(CGRect)editControlEndingRectForCell:(UITableViewCell*)cell forNewEditingState:(BOOL)newEditingState;
-(BOOL)reorderControlShouldAppearForCell:(id)reorderControl;
-(CGRect)reorderControlStartingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(CGRect)reorderControlEndingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(BOOL)reorderControlShouldFadeForCell:(id)reorderControl;
-(BOOL)reorderSeparatorShouldAppearForCell:(id)reorderSeparator;
-(CGRect)reorderSeparatorStartingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(CGRect)reorderSeparatorEndingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(BOOL)reorderSeparatorShouldFadeForCell:(id)reorderSeparator;
-(BOOL)accessoryShouldAppearForCell:(id)accessory;
-(CGRect)accessoryStartingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(CGRect)accessoryEndingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(BOOL)accessoryShouldFadeForCell:(id)accessory;
-(BOOL)editingAccessoryShouldAppearForCell:(id)editingAccessory;
-(CGRect)editingAccessoryStartingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(CGRect)editingAccessoryEndingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(BOOL)editingAccessoryShouldFadeForCell:(id)editingAccessory;
-(CGRect)deleteConfirmationRectForCell:(id)cell;
-(CGRect)backgroundStartingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(CGRect)backgroundEndingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(CGRect)contentStartingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(CGRect)contentEndingRectForCell:(id)cell forNewEditingState:(BOOL)newEditingState;
-(CGRect)contentStartingRectForCell:(id)cell forDisplayOfDeleteConfirmation:(BOOL)deleteConfirmation;
-(CGRect)contentEndingRectForCell:(id)cell forDisplayOfDeleteConfirmation:(BOOL)deleteConfirmation;
@end
@interface UITableViewCellLayoutManager (UITableViewCellLayoutManagerStatic)
-(CGRect)_backgroundRectForCell:(id)cell forIndentedState:(BOOL)indentedState;
-(CGRect)_adjustedBackgroundRectForCell:(id)cell forIndentedState:(BOOL)indentedState;
-(CGRect)_editControlRectForCell:(id)cell offscreen:(BOOL)offscreen;
-(CGRect)_reorderControlRectForCell:(id)cell offscreen:(BOOL)offscreen;
-(CGRect)_reorderSeparatorRectForCell:(id)cell offscreen:(BOOL)offscreen;
-(CGRect)_accessoryRectForCell:(id)cell offscreen:(BOOL)offscreen;
-(CGRect)_editingAccessoryRectForCell:(id)cell offscreen:(BOOL)offscreen;
-(CGRect)_contentRectForCell:(id)cell forEditingState:(BOOL)editingState showingDeleteConfirmation:(BOOL)confirmation;
@end