Select whether to remember the password as a whole button and remember the password as a whole button
:
Engineering Drawing:
This code needs to be added to the third-party library BECheckBox.
Code:
# Import "RootViewController. h "// Add the header file # import" BECheckBox. h "@ interface RootViewController () @ end @ implementation RootViewController @ synthesize passwordCheck;-(void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view. // hide the navigation bar self. navigationController. navigationBarHidden = YES; // BECheckBox * passCheckBox = [[BECheckBox alloc] initWithFrame: CGRectMake (61, 55, 80, 30)]; [passCheckBox setTitle: @ "Remember password" forState: UIControlStateNormal]; [passCheckBox setTitleColor: [UIColor blackColor] forState: UIControlStateNormal]; passCheckBox. titleLabel. font = [UIFont systemFontOfSize: 16]; [passCheckBox setTarget: self fun: @ selector (passCheckBoxClick :)]; passCheckBox. backgroundColor = [UIColor clearColor]; self. passwordCheck = passCheckBox; [self. view addSubview: self. passwordCheck];} // remember the password click-(void) passCheckBoxClick :( id) sender {if ([self. passwordCheck isChecked]) {NSLog (@ "Remember password");} else {NSLog (@ "cancel Remember password ");}}