//
//  IBTSegmentedControl.m
//  XFFruit
//
//  Created by Xummer on 4/11/15.
//  Copyright (c) 2015 Xummer. All rights reserved.
//

#import "IBTSegmentedControl.h"

@implementation IBTSegmentedControl

#pragma mark - Life Cycle
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        [self _init];
    }
    return self;
}

- (void)layoutSubviews {
    [super layoutSubviews];
    
    if (!IBT_IOS7_OR_LATER) {
        self.clipsToBounds = YES;
    }
}

#pragma mark - Private Method
- (void)_init {
    if (!IBT_IOS7_OR_LATER) {
        self.layer.borderColor = IBT_TINTCOLOR.CGColor;
        self.layer.borderWidth = 1.0f;
        self.layer.cornerRadius = 4.0f;
        self.layer.masksToBounds = YES;
    }
}

@end
