title: How can I get selected Switch array list?
body: <p>I have an array list with UISwitch. How can I get an array list with UISwitch = ON when switch change to ON or OFF? I will use the list to display info in other ViewController.</p>
  
  <p><strong>cell.m</strong></p>
  
  <pre><code>- (void) switchToggled:(id)sender {
      UISwitch *theSwitch = (UISwitch *)sender;
  
      if(theSwitch.on)
      {
          // switch turned on
          !_switchSelectCategoryClick ? : _switchSelectCategoryClick();
      }
      else
      {
          // switch turned off
          !_switchRemoveCategoryClick ? : _switchRemoveCategoryClick();
      }
  }
  </code></pre>
  
  <p><strong>ViewController.m</strong></p>
  
  <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
      UICollectionViewCell *gridcell = nil;
      if (indexPath.section == 0) {
          Cell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:CellID forIndexPath:indexPath];
  
          cell.strCategoryName = [aryMerchantCategoryList [indexPath.row]valueForKey:@"category_name"];
  
          cell.switchSelectCategoryClick = ^{
              [aryMerchantCategoryList [indexPath.row]valueForKey:@"category_id"];
              //HOW CAN I STORE WHOLE UISWITCH = ON LIST HERE?
              }
          };
          cell.switchRemoveCategoryClick = ^{
              [aryMerchantCategoryList [indexPath.row]valueForKey:@"category_id"];
             //HOW CAN I STORE WHOLE UISWITCH = ON LIST HERE?
          };
          gridcell = cell;
  
      }
  
      return gridcell;
  }
  </code></pre>