LLSwitch icon indicating copy to clipboard operation
LLSwitch copied to clipboard

自动布局不会显示

Open yaooort opened this issue 8 years ago • 0 comments

你好,自动布局不会显示

//滑动开关
    self.switchClose = [[LLSwitch alloc] init];
    self.switchClose.onColor = [UIColor colorWithHex:BG_SHOUYE alpha:0.86];    // switch is open color    开关打开的颜色
    self.switchClose.offColor = [UIColor colorWithHex:BG_SHOUYE alpha:0.66];    // switch is close color    开关关闭的颜色
    self.switchClose.faceColor = HEXCOLOR(COLOR_TONGYI_LV);    // switch face color    圆脸的颜色
    self.switchClose.animationDuration = 1.2f;    // switch open or close animation time    开关的动画时间
    [self.view addSubview:self.switchClose];
    [self.switchClose makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.view).offset(INSET);
//        make.top.equalTo(self.).offset(INSET);
        make.bottom.equalTo(self.bottomView.top).offset(-INSET);
        make.width.equalTo(WIDTH_1*2);
        make.height.equalTo(HEIGHT_6);
    }];
 

yaooort avatar May 11 '17 15:05 yaooort