Files
comaps/iphone/Maps/UI/Editor/OpeningHours/Cells/MWMOpeningHoursAddScheduleTableViewCell.mm
Konstantin Pastbin aea784ddd7 [ios] Format all Obj C code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
2025-08-17 16:37:15 +07:00

46 lines
850 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