Note that there are some explanatory texts on larger screens.

plurals
  1. POdidSelectRowAtIndexPath not working
    primarykey
    data
    text
    <p>I am having issues with my tableView not firing the didSelectRowAtIndexPath method. I have implemented the delegates as such:</p> <pre><code>@interface ViewController : UIViewController&lt;UITableViewDataSource, UITableViewDelegate,UIScrollViewDelegate&gt; </code></pre> <p>And in my storyboard the tableView's data source and delegate are both pointed at the base View Controller. I have User Interactions enabled as well as Selection set to Single Selection, and it is not the TapGesture problem since my tap gestures are not bound to the view and I have checked and they do not fire.</p> <p>This is the code for setting up the table:</p> <pre><code>-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ return menuArray.count; } -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ return 1; } -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"menuCell"]; NSDictionary *menuItem = [menuArray objectAtIndex:indexPath.row]; cell.textLabel.text = menuItem[@"Title"]; cell.detailTextLabel.text = menuItem[@"Subtitle"]; return cell; } -(void)showMenu{ [UIView animateWithDuration:.25 animations:^{ [content setFrame:CGRectMake(menuTable.frame.size.width, content.frame.origin.y, content.frame.size.width, content.frame.size.height)]; }]; } -(void)hideMenu{ [UIView animateWithDuration:.25 animations:^{ [content setFrame:CGRectMake(0, content.frame.origin.y, content.frame.size.width, content.frame.size.height)]; }]; } -(IBAction)showMenuDown:(id)sender { if(content.frame.origin.x == 0) [self showMenu]; else [self hideMenu]; } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ //whatever } </code></pre> <p>The table is initially out of view on the storyboard (origin.x is set to -150), then when the user clicks on a button in the navigationBar, the view slides over to reveal it, which is what might be causing the problem I think. </p> <p>Is there anything wrong with my code or implementation that would be causing this to not work?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload