IBTSegmentedControl.m 794 Bytes
Newer Older
mei's avatar
mei committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
//
//  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) {
陈俊俊's avatar
陈俊俊 committed
35
        self.layer.borderColor = XXFBgColor.CGColor;
mei's avatar
mei committed
36 37 38 39 40 41 42
        self.layer.borderWidth = 1.0f;
        self.layer.cornerRadius = 4.0f;
        self.layer.masksToBounds = YES;
    }
}

@end