//
//  SLHorScrBtns.m
//  SLAiELTS
//
//  Created by Gusont on 2023/3/13.
//

#import "SLHorScrBtns.h"

@interface SLHorScrBtns()

@end

@implementation SLHorScrBtns

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super initWithCoder:aDecoder];
    if (self) {
        [self addContentView];
    }
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self addContentView];
    }
    return self;
}

- (void)addContentView {
    [[NSBundle mainBundle] loadNibNamed:@"SLHorScrBtns" owner:self options:nil];
    self.contentView.frame = self.bounds;
    [self addSubview:self.contentView];
    self.contentView.backgroundColor = [UIColor clearColor];
    [self.btnsScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.contentView);
        make.left.equalTo(self.contentView).offset(15);
        make.top.equalTo(self.titleLabel.mas_bottom).offset(8);
        make.bottom.equalTo(self.contentView.mas_bottom).offset(-15).priority(500);
    }];
    self.btnsScrollView.bounces = NO;
    self.btnsScrollView.showsHorizontalScrollIndicator = NO;
    self.btnsScrollView.showsVerticalScrollIndicator = NO;
}

@end
