Checkbox-Custom-HHN

Demo:


Đặc trưng:


Yêu cầu:

Setup File:

//Checkbox 1
checkbox1 = [[CTCheckbox alloc] initWithFrame:CGRectMake(150, 25, 25.0, 25.0)];
[checkbox1 addTarget:self action:@selector(checkboxDidChange:) forControlEvents:UIControlEventValueChanged];
//màu hiển thị
[checkbox1 setColor:[UIColor colorWithRed: 1 green: 0 blue: 0 alpha: 1.0] forControlState:UIControlStateNormal];
//màu khi chạm vào
[checkbox1 setColor:[UIColor colorWithRed: 1 green: 0 blue: 0 alpha: 0.5] forControlState:UIControlStateDisabled];
[mainWindow addSubview:checkbox1];

    UILabel *myLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(175, 28, 200.0, 20.0)];
myLabel1.textColor = [UIColor whiteColor];
myLabel1.font = [UIFont systemFontOfSize:12.5];
myLabel1.numberOfLines = 1;
myLabel1.text = [NSString stringWithFormat:@"Speed X2"];
myLabel1.textAlignment = NSTextAlignmentLeft;
myLabel1.shadowOffset = CGSizeMake(1.0,1.0); 
//myLabel1.backgroundColor = [UIColor clearColor];
[mainWindow addSubview:myLabel1];

Ghi chú:

Credits: