Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing PKRevealController and UITableViewCells
    text
    copied!<p>I have a UITableView with several cells. I am trying to make it so that when you tap on one of the cells (a task), its properties are shown in a Detail ViewController. This would be easy by just using the navigation bar, but I am trying to make it so when you tap a cell, the detail view slides to the left using PKRevealController properties (kind of like Wunderlist). I am not using storyboards.</p> <p>This is the PKRevaelController github link: <a href="https://github.com/pkluz/PKRevealController" rel="nofollow">https://github.com/pkluz/PKRevealController</a></p> <p>This is my current method in my TableView Controller:</p> <pre><code>-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ Tasks *task = [taskArray objectAtIndex:[indexPath row]]; DetailViewController *dvc = [[DetailViewController alloc]init]; [dvc setTestTask:task]; PKRevealController *pkrc = [[PKRevealController alloc]init]; [pkrc setRightViewController:dvc]; [pkrc showViewController:dvc animated:YES completion:NULL]; } </code></pre> <p>Unfortunately when I click on a cell, it highlights blue and nothing else happens.</p> <p>-----EDIT---- I changed the code a bit to initialize a PKRevealerController using the tableview (self and the detail view, which solves the cell highlighting problem, but for some reason the detail view controller does not load, and there is simply a gray screen...</p> <pre><code>-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ Tasks *task = [taskArray objectAtIndex:[indexPath row]]; DetailViewController *dvc = [[DetailViewController alloc]init]; [dvc setTestTask:task]; PKRevealController *pkrc = [[PKRevealController alloc]initWithFrontViewController:self rightViewController:dvc options:nil]; [pkrc showViewController:dvc animated:YES completion:NULL]; } </code></pre>
 

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