Note that there are some explanatory texts on larger screens.

plurals
  1. POeditButtonItem Not Showing Up
    text
    copied!<p><strong>The Problem:</strong> The built-in editButtonItem that Xcode automatically comments out when a new UITableViewController class is created does not work when I delete the comment slashes (<code>//</code>). By does not work I mean that the edit button does not appear at all. Swiping a cell does not work either.</p> <p><strong>Attempted Solutions:</strong> I have tried to follow the various workarounds that have been posted on other stackoverflow threads to no avail. Most of the posts that I have found talk about various aspects of the edit button not working (e.g., no minus signs showing up, etc…) but very few that I have found in which the edit button does not show up at all.</p> <p><strong>Hunch:</strong> I have a hunch that it might have something to do with the UITableViewController not being properly implemented. I am very new to object-oriented programming as well as objective-c, so I apologize if the answer is something very basic—but hey, it's part of the learning process. Any help is much appreciated.</p> <p><strong>Code:</strong></p> <p><strong><em>_</em>__<em>_</em>.h</strong></p> <pre><code>#import &lt;UIKit/UIKit.h&gt; #import "IndividualRecipeViewController.h" @class BrowsePrivateRecipeViewController; @protocol BrowsePrivateRecipeViewControllerDelegate - (void)browsePrivateRecipeViewControllerDidFinish:(BrowsePrivateRecipeViewController *)controller; @end @interface BrowsePrivateRecipeViewController : UITableViewController @property (weak, nonatomic) id &lt;BrowsePrivateRecipeViewControllerDelegate&gt; delegate; @property (assign, nonatomic) NSUInteger listLength; @property (strong, nonatomic) NSDictionary *dictionaryOfRecipes; @property (strong, nonatomic) NSMutableArray *arrayOfRecipeNames; // ... methods @end </code></pre> <p><strong><em>_</em>__<em>_</em>.m</strong></p> <pre><code>@interface BrowsePrivateRecipeViewController () @end @implementation BrowsePrivateRecipeViewController @synthesize delegate = _delegate; @synthesize listLength = _listLength; @synthesize dictionaryOfRecipes = _dictionaryOfRecipes; @synthesize arrayOfRecipeNames = _arrayOfRecipeNames; - (void)viewDidLoad { // ... code here // Uncomment the following line to display an Edit button in the navigation bar for this view controller. self.navigationItem.rightBarButtonItem = self.editButtonItem; } // ... other methods </code></pre> <p><strong>UPDATE:</strong> </p> <p><strong><a href="https://www.dropbox.com/s/k4v5oaiy11rxism/project3.zip" rel="nofollow">LINK TO SOURCE CODE</a></strong></p> <p>So I have decided to post the source code to my whole project. I am having this problem with multiple files, but if I get it fixed in one, I am pretty sure that the rest will fall into place.</p> <p>Please focus on the files <code>BrowsePrivateRecipeViewController.m/.h.</code> This is the most straightforward instance of the problem.</p> <p>Once again thank you for your patience and help. </p> <p>Sincerely, Jason</p>
 

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