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

Commit 7767101

Browse files
committed
2.0.1 release
1 parent 6c2bc36 commit 7767101

23 files changed

+117
-82
lines changed

Bohr.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Pod::Spec.new do |s|
22
s.name = "Bohr"
3-
s.version = "2.0.0"
3+
s.version = "2.0.1"
44
s.summary = "Settings screen composing framework"
55
s.homepage = "https://github.com/DavdRoman/Bohr"
6-
s.author = { "David Roman" => "[email protected]" }
6+
s.author = { "David Román" => "[email protected]" }
77
s.license = { :type => 'MIT', :file => 'LICENSE' }
88

99
s.platform = :ios, '8.0'

Bohr/BOButtonTableViewCell.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@
1010

1111
@interface BOButtonTableViewCell : BOTableViewCell
1212

13+
/// The target of the cell action.
1314
@property (nonatomic) id target;
15+
16+
/// The action defined by the cell, triggered when it's tapped.
1417
@property (nonatomic) SEL action;
1518

19+
/// Sets both the target and action for the cell to be performed.
1620
- (void)setTarget:(id)target action:(SEL)action;
1721

1822
@end

Bohr/BOButtonTableViewCell.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ - (void)setup {
2020
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
2121

2222
- (void)wasSelectedFromViewController:(BOTableViewController *)viewController {
23-
[super wasSelectedFromViewController:viewController];
24-
2523
if ([self.target respondsToSelector:self.action]) {
2624
[self.target performSelector:self.action];
2725
}

Bohr/BOChoiceTableViewCell.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@
1010

1111
@interface BOChoiceTableViewCell : BOTableViewCell
1212

13+
/// An array defining (in short) all the options availables on the cell.
1314
@property (nonatomic, strong) NSArray *options;
1415

16+
/// An array defining all the footer titles for each option assigned to the cell.
1517
@property (nonatomic, strong) IBInspectable NSArray *footerTitles;
1618

1719
@end

Bohr/BOChoiceTableViewCell.m

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ - (NSString *)footerTitle {
2727
}
2828

2929
- (void)wasSelectedFromViewController:(BOTableViewController *)viewController {
30-
[super wasSelectedFromViewController:viewController];
31-
3230
if (self.accessoryType != UITableViewCellAccessoryDisclosureIndicator) {
3331
NSInteger currentOption = [self.setting.value integerValue];
3432

Bohr/BOOptionTableViewCell.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
// Bohr
44
//
55
// Created by David Román Aguirre on 21/6/15.
6-
//
6+
// Copyright (c) 2015 David Roman. All rights reserved.
77
//
88

99
#import "BOTableViewCell.h"
1010

1111
@interface BOOptionTableViewCell : BOTableViewCell
1212

13+
/// The string for the footer title when the cell has a checkmark on it.
1314
@property (nonatomic, strong) IBInspectable NSString *footerTitle;
1415

1516
@end

Bohr/BOOptionTableViewCell.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// Bohr
44
//
55
// Created by David Román Aguirre on 21/6/15.
6-
//
6+
// Copyright (c) 2015 David Roman. All rights reserved.
77
//
88

99
#import "BOOptionTableViewCell.h"
@@ -17,8 +17,6 @@ - (void)setup {
1717
}
1818

1919
- (void)wasSelectedFromViewController:(BOTableViewController *)viewController {
20-
[super wasSelectedFromViewController:viewController];
21-
2220
NSInteger optionIndex = [viewController.tableView indexPathForCell:self].row;
2321
self.setting.value = @(optionIndex);
2422
}

Bohr/BOSetting.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@
1010

1111
@interface BOSetting : NSObject
1212

13+
/// The NSUserDefaults key for the cell.
1314
@property (nonatomic, readonly) NSString *key;
15+
16+
/// The NSUserDefaults value assigned for the key defined on the cell.
1417
@property (nonatomic, assign) id value;
1518

19+
/// Instantiates a new BOSetting object with a key.
1620
+ (instancetype)settingWithKey:(NSString *)key;
1721

1822
@end

Bohr/BOSwitchTableViewCell.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@
1010

1111
@interface BOSwitchTableViewCell : BOTableViewCell
1212

13+
/// The switch on the cell.
1314
@property (nonatomic, strong) UISwitch *toggleSwitch;
1415

16+
/// The footer title when the toggle switch is on.
1517
@property (nonatomic, strong) IBInspectable NSString *onFooterTitle;
18+
19+
/// The footer title when the toggle switch is off.
1620
@property (nonatomic, strong) IBInspectable NSString *offFooterTitle;
1721

1822
@end

Bohr/BOTableViewCell+Subclass.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,28 @@
1313

1414
@interface BOTableViewCell ()
1515

16+
/// The current index path of the cell relative to its table view.
1617
@property (nonatomic, strong) NSIndexPath *indexPath;
18+
19+
/// The setting object which the cell represents.
1720
@property (nonatomic, strong) BOSetting *setting;
1821

22+
/// The setup method for the cell, where you may set up all the views and constraints necessary for the cell to work.
1923
- (void)setup;
24+
25+
/// The method in charge of updating the appearance of the main cell view components, through properties as mainColor, mainFont, secondaryColor, secondaryFont.
2026
- (void)updateAppearance;
27+
28+
/// You may return the height for the cell to be expanded when tapped.
2129
- (CGFloat)expansionHeight;
30+
31+
/// You may return the footer text for the cell to be set on its section.
2232
- (NSString *)footerTitle;
33+
34+
/// This method gets called whenever a cell gets selected, passing its parent view controller as an argument.
2335
- (void)wasSelectedFromViewController:(BOTableViewController *)viewController;
36+
37+
/// This method gets called when the cell setting value gets changed externally, so that such change can be represented on the cell.
2438
- (void)settingValueDidChange;
2539

2640
@end

0 commit comments

Comments
 (0)