co-maps/iphone/Maps/UI/Editor/OpeningHours/Cells/MWMOpeningHoursAddScheduleTableViewCell.mm

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
867 B
Text
Raw Normal View History

2025-11-22 13:58:55 +01:00
#import "MWMOpeningHoursAddScheduleTableViewCell.h"
#import <CoreApi/MWMOpeningHoursCommon.h>
@interface MWMOpeningHoursAddScheduleTableViewCell ()
@property (weak, nonatomic) IBOutlet UIButton * addScheduleButton;
@end
@implementation MWMOpeningHoursAddScheduleTableViewCell
- (void)awakeFromNib
{
[super awakeFromNib];
self.backgroundColor = UIColor.clearColor;
}
+ (CGFloat)height
{
return 84.0;
}
- (void)refresh
{
NSString * title = [NSString stringWithFormat:@"%@ %@", L(@"editor_time_add"),
stringFromOpeningDays([self.model unhandledDays])];
[self.addScheduleButton setTitle:title forState:UIControlStateNormal];
}
#pragma mark - Actions
- (IBAction)addScheduleTap
{
[self.model addSchedule];
}
#pragma mark - Properties
- (void)setModel:(MWMOpeningHoursModel *)model
{
_model = model;
[self refresh];
}
@end