tableview中添加switch

            UISwitch *switchview = [[UISwitch alloc] initWithFrame:CGRectZero];

            [switchview addTarget:self action:@selector(openOrCloseMusic:) forControlEvents:UIControlEventValueChanged];

            cell.accessoryView = switchview;

            switchview=nil;


你可能感兴趣的:(tableview中添加switch)