Skip to content
This repository was archived by the owner on Aug 24, 2020. It is now read-only.

Commit 9da76aa

Browse files
committed
3.0.0-alpha.3 release
1 parent 28b11c1 commit 9da76aa

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

Bohr.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "Bohr"
3-
s.version = "3.0.0-alpha.2"
3+
s.version = "3.0.0-alpha.3"
44
s.summary = "Settings screen composing framework"
55
s.homepage = "https://github.com/DavdRoman/Bohr"
66
s.author = { "David Román" => "[email protected]" }

Bohr/BODateTableViewCell.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ - (void)setup {
3131
}
3232

3333
- (CGFloat)expansionHeight {
34-
// Uncomment if the picker view doesn't show on iOS 9.
35-
// return 216;
36-
return [super expansionHeight];
34+
return 216;
3735
}
3836

3937
- (void)setDateFormat:(NSString *)dateFormat {

Bohr/BOTableViewCell.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ - (instancetype)initWithTitle:(NSString *)title key:(NSString *)key handler:(voi
3232
}
3333

3434
- (void)didMoveToSuperview {
35-
if (self.superview && self.expansionView) {
35+
if (self.expansionView && !self.expansionView.superview) {
3636
[self.contentView addSubview:self.expansionView];
3737

3838
NSLayoutConstraint *topConstraint = [NSLayoutConstraint constraintWithItem:self.expansionView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.expansionView.superview attribute:NSLayoutAttributeTopMargin multiplier:1 constant:0];
@@ -59,7 +59,7 @@ + (instancetype)cellWithTitle:(NSString *)title key:(NSString *)key handler:(voi
5959
- (void)layoutSubviews {
6060
[super layoutSubviews];
6161

62-
if ([self expansionView]) {
62+
if ([self expansionHeight] > 0) {
6363
CGFloat yOffset = (self.layoutMargins.top-self.frame.size.height)/2;
6464

6565
self.textLabel.center = CGPointMake(self.textLabel.center.x, self.textLabel.center.y+yOffset);

Bohr/BOTableViewController.m

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
100100
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
101101
BOTableViewSection *section = self.sections[indexPath.section];
102102
BOTableViewCell *cell = section.cells[indexPath.row];
103-
CGFloat cellHeight = [cell systemLayoutSizeFittingSize:CGSizeMake(cell.contentView.frame.size.width, UITableViewAutomaticDimension)].height;
104-
103+
CGFloat cellHeight = [cell.contentView systemLayoutSizeFittingSize:CGSizeMake(cell.contentView.frame.size.width, UITableViewAutomaticDimension)].height;
104+
105105
if (cellHeight < self.tableView.estimatedRowHeight) {
106106
cellHeight = self.tableView.estimatedRowHeight;
107107
} else {
@@ -121,15 +121,14 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
121121
BOTableViewSection *section = self.sections[indexPath.section];
122122
BOTableViewCell *cell = section.cells[indexPath.row];
123123
cell.indexPath = indexPath;
124-
[cell prepareForReuse];
125124

126125
if (cell.setting && !cell.setting.valueDidChangeBlock) {
127126
[UIView performWithoutAnimation:^{
128127
__unsafe_unretained typeof(self) weakSelf = self;
129128
__unsafe_unretained typeof(cell) weakCell = cell;
130129
cell.setting.valueDidChangeBlock = ^{
131-
[weakSelf reloadTableView];
132130
[weakCell settingValueDidChange];
131+
[weakSelf reloadTableView];
133132
};
134133
}];
135134
}
@@ -205,7 +204,7 @@ - (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInte
205204
// Finally, we try to find an existing footer in any cell that has a checkmark accessory on it (this is the top priority for dynamic footers).
206205
for (BOTableViewCell *cell in section.cells) {
207206
if (cell.accessoryType == UITableViewCellAccessoryCheckmark) {
208-
footerTitle = [cell footerTitle];
207+
footerTitle = cell.footerTitle;
209208
}
210209
}
211210

0 commit comments

Comments
 (0)