title: How to create checkbox in iOS?
body: <p>I have taken two custom buttons and one method, to set their check and uncheck</p>
  
  <p>In viewdidload() i have written like this..</p>
  
  <pre><code>[checkbox_01 setImage:[UIImage imageNamed:@"unchecked.png"] forState:UIControlStateNormal];
  [checkbox_02 setImage:[UIImage imageNamed:@"unchecked.png"] forState:UIControlStateNormal];
  isChecked_01 = NO; //declared as boolean to change check and uncheck for button one
  isChecked_02 = NO; //declared as boolean to change check and uncheck for button two
  </code></pre>
  
  <p>And in method</p>
  
  <pre><code>-(IBAction)checkboxOnClick:(UIButton *)sender {
      if (sender.tag == 1) {
          if (isChecked_01 == NO) {
              [checkbox_01 setImage:[UIImage imageNamed:@"checked.png"] forState:UIControlStateNormal];
              isChecked_01 = YES;
          }
          else
          {
              [checkbox_01 setImage:[UIImage imageNamed:@"unchecked.png"] forState:UIControlStateNormal];
              isChecked_01 = NO;
          }
      }
  
      if (sender.tag == 2) {
          if (isChecked_02 == NO) {
              [checkbox_02 setImage:[UIImage imageNamed:@"checked.png"] forState:UIControlStateNormal];
              isChecked_02 = YES;
          }
          else
          {
              [checkbox_02 setImage:[UIImage imageNamed:@"unchecked.png"] forState:UIControlStateNormal];
              isChecked_02 = NO;
          }
      }
  }
  </code></pre>
  
  <p>is there any other way to create check boxes in ios..? i have taken each checkbox with one isChecked boolean value for it.. is there posibilities to use only one boolean for entire check list.....</p>