Files
comaps/iphone/Maps/UI/Editor/OpeningHours/Cells/MWMOpeningHoursAddScheduleTableViewCell.mm
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
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
2025-05-08 21:10:51 +07:00

46 lines
867 B
Plaintext

#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