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

Commit 4180eb9

Browse files
committed
2.1.0 release
1 parent 7767101 commit 4180eb9

File tree

9 files changed

+18
-11
lines changed

9 files changed

+18
-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 = "2.0.1"
3+
s.version = "2.1.0"
44
s.summary = "Settings screen composing framework"
55
s.homepage = "https://github.com/DavdRoman/Bohr"
66
s.author = { "David Román" => "[email protected]" }

Bohr/BOChoiceTableViewCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ - (NSString *)footerTitle {
2323
return self.footerTitles[currentOption];
2424
}
2525

26-
return nil;
26+
return [super footerTitle];
2727
}
2828

2929
- (void)wasSelectedFromViewController:(BOTableViewController *)viewController {

Bohr/BOSwitchTableViewCell.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ - (void)updateAppearance {
2929
}
3030

3131
- (NSString *)footerTitle {
32-
BOOL settingValue = [self.setting.value boolValue];
32+
if (self.onFooterTitle || self.offFooterTitle) {
33+
return [self.setting.value boolValue] ? self.onFooterTitle : self.offFooterTitle;
34+
}
3335

34-
return settingValue ? self.onFooterTitle : self.offFooterTitle;
36+
return [super footerTitle];
3537
}
3638

3739
- (void)toggleSwitchValueDidChange {

Bohr/BOTableViewCell.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,7 @@
2828
/// The color for the selected state of the cell.
2929
@property (nonatomic, strong) IBInspectable UIColor *selectedColor;
3030

31+
/// The default footer title for the cell.
32+
@property (nonatomic, strong) IBInspectable NSString *defaultFooterTitle;
33+
3134
@end

Bohr/BOTableViewCell.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ - (void)setup {}
6969
- (void)setupConstraints {}
7070
- (void)updateAppearance {}
7171
- (CGFloat)expansionHeight {return 0;}
72-
- (NSString *)footerTitle {return nil;}
72+
- (NSString *)footerTitle {return self.defaultFooterTitle;}
7373
- (void)wasSelectedFromViewController:(BOTableViewController *)viewController {}
7474
- (void)settingValueDidChange {}
7575

Bohr/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.0.1</string>
18+
<string>2.1.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

BohrDemo/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>APPL</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>2.0.1</string>
18+
<string>2.1.0</string>
1919
<key>CFBundleSignature</key>
2020
<string>????</string>
2121
<key>CFBundleVersion</key>

BohrDemo/Main.storyboard

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<objects>
1010
<tableViewController id="8aG-sl-DjW" customClass="TableViewController" sceneMemberID="viewController">
1111
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="58" sectionHeaderHeight="10" sectionFooterHeight="10" id="09h-NJ-dhl">
12-
<rect key="frame" x="0.0" y="0.0" width="600" height="566"/>
12+
<rect key="frame" x="0.0" y="64" width="600" height="549"/>
1313
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1414
<animations/>
1515
<color key="backgroundColor" white="0.95999999999999996" alpha="1" colorSpace="calibratedWhite"/>
@@ -58,6 +58,7 @@
5858
<animations/>
5959
<userDefinedRuntimeAttributes>
6060
<userDefinedRuntimeAttribute type="string" keyPath="key" value="bool_2"/>
61+
<userDefinedRuntimeAttribute type="string" keyPath="defaultFooterTitle" value="Footer"/>
6162
<userDefinedRuntimeAttribute type="string" keyPath="onFooterTitle" value="Switch setting 2 is on"/>
6263
<userDefinedRuntimeAttribute type="string" keyPath="offFooterTitle" value="Switch setting 2 is off"/>
6364
</userDefinedRuntimeAttributes>
@@ -185,7 +186,7 @@
185186
</tableViewCell>
186187
</cells>
187188
</tableViewSection>
188-
<tableViewSection headerTitle="Section 3" footerTitle="Static footer title" id="Icm-lX-mZf">
189+
<tableViewSection headerTitle="Section 3" footerTitle="" id="Icm-lX-mZf">
189190
<cells>
190191
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" textLabel="DQG-u9-VyJ" style="IBUITableViewCellStyleDefault" id="2FQ-3G-mgv" customClass="BOButtonTableViewCell">
191192
<rect key="frame" x="0.0" y="79" width="600" height="44"/>
@@ -216,7 +217,7 @@
216217
</tableView>
217218
<navigationItem key="navigationItem" title="Bohr" id="2nX-kh-Bmg"/>
218219
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
219-
<size key="freeformSize" width="600" height="630"/>
220+
<size key="freeformSize" width="600" height="613"/>
220221
<userDefinedRuntimeAttributes>
221222
<userDefinedRuntimeAttribute type="color" keyPath="footerTitlesColor">
222223
<color key="value" white="0.0" alpha="0.29999999999999999" colorSpace="calibratedWhite"/>
@@ -241,7 +242,7 @@
241242
<objects>
242243
<tableViewController id="mPI-tq-cz0" customClass="BOTableViewController" sceneMemberID="viewController">
243244
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="static" style="grouped" separatorStyle="default" rowHeight="58" sectionHeaderHeight="10" sectionFooterHeight="10" id="UYq-iK-MLW">
244-
<rect key="frame" x="0.0" y="0.0" width="600" height="566"/>
245+
<rect key="frame" x="0.0" y="64" width="600" height="549"/>
245246
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
246247
<animations/>
247248
<color key="backgroundColor" white="0.95999999999999996" alpha="1" colorSpace="calibratedWhite"/>

BohrDemo/TableViewController.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ - (void)setup {
1515
self.choiceCell.options = @[@"Option 1", @"Option 2", @"Option 3"];
1616
self.choiceDisclosureCell.options = @[@"Option 1", @"Option 2", @"Option 3", @"Option 4"];
1717
[self.buttonCell setTarget:self action:@selector(showButtonAlert)];
18+
self.buttonCell.defaultFooterTitle = @"Static footer set programatically";
1819
}
1920

2021
- (void)presentAlertControllerWithTitle:(NSString *)title message:(NSString *)message {

0 commit comments

Comments
 (0)