title: ios slider action in UITableViewCell
body: <p>I've a <code>UISlider</code> in a <code>UITableViewCell</code> error.</p>
  
  <p><img src="https://i.stack.imgur.com/nCzdY.png" alt="this  my UITableViewCell"></p>
  
  <p>When I click slider, then it puts this:</p>
  
  <pre><code> -[MyCell slider:]: unrecognized selector sent to instance 0x7fcf81d82ab0
      2016-04-10 22:24:49.947 TableViewController3[2372:153428] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MyCell slider:]: unrecognized selector sent to instance 0x7fcf81d82ab0'
  </code></pre>
  
  <p>Here's my code</p>
  
  <p><strong>my TableViewCell class</strong></p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
      @interface MyCell : UITableViewCell
  
  
      @property (weak, nonatomic) IBOutlet UITextView *questionText;
  
      @property (weak, nonatomic) IBOutlet UITextField *slider_value_text;
      @property (weak, nonatomic) IBOutlet UISlider *slider;
      @end
  -----------------------------------------------------------------------    
  
  
      #import "MyCell.h"
  
      @implementation MyCell
  
      - (void)awakeFromNib {
          [super awakeFromNib];
          // Initialization code
      }
  
      - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
          [super setSelected:selected animated:animated];
  
          // Configure the view for the selected state
      }
  
      @end
  </code></pre>
  
  <hr>
  
  <p><strong>my UITableViewController class</strong></p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "MyCell.h"
  @interface myTableViewController : UITableViewController
  
  @property NSArray *arr1;
  -(void)Selector:(id)sender;
  @end
  </code></pre>
  
  <hr>
  
  <pre><code>  #import "myTableViewController.h"
  
  @interface myTableViewController ()
  
  @end
  
  @implementation myTableViewController
  @synthesize  arr1;
  
  - (void)viewDidLoad {
      [super viewDidLoad];
  
      NSLog(@"here amq");
      arr1=@[@"homer",@"marge",@"lisa",@"asd eq hayde ewqewqsdaqww asd sad beklqwee awe qwe"];
  
  
  }
  
  - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
  
  }
  
  #pragma mark - Table view data source
  
  - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  #warning Incomplete implementation, return the number of sections
      return 1;
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  #warning Incomplete implementation, return the number of rows
      return [arr1 count];
  }
  
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
      MyCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
  
  
      cell.questionText.text=[arr1 objectAtIndex:indexPath.row];
      [[cell slider ] setMaximumValue:1];
      [[cell slider ] setMaximumValue:5];
      [[cell slider ] setTintColor:[UIColor redColor]];
      [[cell slider] setTag:indexPath.row];
      [[cell slider] addTarget:self action:@selector(generalSelector:) forControlEvents:UIControlEventValueChanged];
  
      return cell;
  }
  
  -(void)Selector:(id)sender{
      if ([sender isKindOfClass:[UISlider class]]){
          UISlider *slider = (UISlider *)sender;
          NSLog(@"Slider value %f",slider.value);
      }
  
  }
  </code></pre>