mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-04 11:53:47 +00:00
To expand with full Organic Maps and Maps.ME commits history run: git remote add om-historic [om-historic.git repo url] git fetch --tags om-historic git replace squashed-history historic-commits
43 lines
738 B
Plaintext
43 lines
738 B
Plaintext
#import "MWMOpeningHoursAllDayTableViewCell.h"
|
|
|
|
@interface MWMOpeningHoursAllDayTableViewCell ()
|
|
|
|
@property (weak, nonatomic) IBOutlet UISwitch * switcher;
|
|
@property (weak, nonatomic) IBOutlet UILabel * label;
|
|
|
|
@end
|
|
|
|
@implementation MWMOpeningHoursAllDayTableViewCell
|
|
|
|
- (void)awakeFromNib
|
|
{
|
|
[super awakeFromNib];
|
|
[self setupLabelColor];
|
|
}
|
|
|
|
- (void)setupLabelColor
|
|
{
|
|
self.label.textColor = self.switcher.on ? [UIColor blackPrimaryText] : [UIColor blackHintText];
|
|
}
|
|
|
|
+ (CGFloat)heightForWidth:(CGFloat)width
|
|
{
|
|
return 44.0;
|
|
}
|
|
|
|
- (void)refresh
|
|
{
|
|
[super refresh];
|
|
self.switcher.on = self.section.allDay;
|
|
}
|
|
|
|
#pragma mark - Actions
|
|
|
|
- (IBAction)onSwitch
|
|
{
|
|
self.section.allDay = self.switcher.on;
|
|
[self setupLabelColor];
|
|
}
|
|
|
|
@end
|