diff --git a/Bohr.podspec b/Bohr.podspec
index f5c8b58..542b980 100755
--- a/Bohr.podspec
+++ b/Bohr.podspec
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "Bohr"
- s.version = "2.0.1"
+ s.version = "2.1.0"
s.summary = "Settings screen composing framework"
s.homepage = "https://github.com/DavdRoman/Bohr"
s.author = { "David Román" => "d@vidroman.me" }
diff --git a/Bohr/BOChoiceTableViewCell.m b/Bohr/BOChoiceTableViewCell.m
index 2e0d7cf..a64b1cd 100644
--- a/Bohr/BOChoiceTableViewCell.m
+++ b/Bohr/BOChoiceTableViewCell.m
@@ -23,7 +23,7 @@ - (NSString *)footerTitle {
return self.footerTitles[currentOption];
}
- return nil;
+ return [super footerTitle];
}
- (void)wasSelectedFromViewController:(BOTableViewController *)viewController {
diff --git a/Bohr/BOSwitchTableViewCell.m b/Bohr/BOSwitchTableViewCell.m
index f2c44d4..7d0d895 100644
--- a/Bohr/BOSwitchTableViewCell.m
+++ b/Bohr/BOSwitchTableViewCell.m
@@ -29,9 +29,11 @@ - (void)updateAppearance {
}
- (NSString *)footerTitle {
- BOOL settingValue = [self.setting.value boolValue];
+ if (self.onFooterTitle || self.offFooterTitle) {
+ return [self.setting.value boolValue] ? self.onFooterTitle : self.offFooterTitle;
+ }
- return settingValue ? self.onFooterTitle : self.offFooterTitle;
+ return [super footerTitle];
}
- (void)toggleSwitchValueDidChange {
diff --git a/Bohr/BOTableViewCell.h b/Bohr/BOTableViewCell.h
index 4c5a021..0e64ba8 100644
--- a/Bohr/BOTableViewCell.h
+++ b/Bohr/BOTableViewCell.h
@@ -28,4 +28,7 @@
/// The color for the selected state of the cell.
@property (nonatomic, strong) IBInspectable UIColor *selectedColor;
+/// The default footer title for the cell.
+@property (nonatomic, strong) IBInspectable NSString *defaultFooterTitle;
+
@end
diff --git a/Bohr/BOTableViewCell.m b/Bohr/BOTableViewCell.m
index bd1a22e..8f9a1b1 100644
--- a/Bohr/BOTableViewCell.m
+++ b/Bohr/BOTableViewCell.m
@@ -69,7 +69,7 @@ - (void)setup {}
- (void)setupConstraints {}
- (void)updateAppearance {}
- (CGFloat)expansionHeight {return 0;}
-- (NSString *)footerTitle {return nil;}
+- (NSString *)footerTitle {return self.defaultFooterTitle;}
- (void)wasSelectedFromViewController:(BOTableViewController *)viewController {}
- (void)settingValueDidChange {}
diff --git a/Bohr/Info.plist b/Bohr/Info.plist
index be8ad3b..c27b7c7 100644
--- a/Bohr/Info.plist
+++ b/Bohr/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
FMWK
CFBundleShortVersionString
- 2.0.1
+ 2.1.0
CFBundleSignature
????
CFBundleVersion
diff --git a/BohrDemo/Info.plist b/BohrDemo/Info.plist
index c0a78dc..e76f258 100644
--- a/BohrDemo/Info.plist
+++ b/BohrDemo/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 2.0.1
+ 2.1.0
CFBundleSignature
????
CFBundleVersion
diff --git a/BohrDemo/Main.storyboard b/BohrDemo/Main.storyboard
index 7c4f38f..ae4f2f6 100644
--- a/BohrDemo/Main.storyboard
+++ b/BohrDemo/Main.storyboard
@@ -9,7 +9,7 @@
-
+
@@ -58,6 +58,7 @@
+
@@ -185,7 +186,7 @@
-
+
@@ -216,7 +217,7 @@
-
+
@@ -241,7 +242,7 @@
-
+
diff --git a/BohrDemo/TableViewController.m b/BohrDemo/TableViewController.m
index 429c053..7fc2a5c 100644
--- a/BohrDemo/TableViewController.m
+++ b/BohrDemo/TableViewController.m
@@ -15,6 +15,7 @@ - (void)setup {
self.choiceCell.options = @[@"Option 1", @"Option 2", @"Option 3"];
self.choiceDisclosureCell.options = @[@"Option 1", @"Option 2", @"Option 3", @"Option 4"];
[self.buttonCell setTarget:self action:@selector(showButtonAlert)];
+ self.buttonCell.defaultFooterTitle = @"Static footer set programatically";
}
- (void)presentAlertControllerWithTitle:(NSString *)title message:(NSString *)message {