Wrox Programmer Forums
BOOK: Professional iPhone and iPad Database Application Programming
This is the forum to discuss the Wrox book Professional iPhone and iPad Database Application Programming by Patrick Alessi; ISBN: 978-0-470-63617-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional iPhone and iPad Database Application Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 27th, 2011, 02:04 PM
EEE EEE is offline
Registered User
Join Date: May 2011
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
Default Chapter 7 RootViewController - Edit Button in Nav Bar

I'm trying to add an "Edit" button to the RootViewController Nav Bar to be able to set a little red delete symbol next to each Task when I press on the Edit button in the Nav Bar on the RootViewController, rather than swiping a task to delete it, as the tutorial currently has it setup.

I've added self.navigationItem.leftBarButtonItem = self.editButtonItem; into the RootViewController.m which has placed the Edit button in the Nav Bar but that doesn't seem to quite be getting it. I can't get any of the little red delete symbols to appear next to each task.

Any help would be greatly appreciated.
Old June 14th, 2011, 09:28 AM
Friend of Wrox
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts

I don't have this book, book working from the download code, I made the following changes to get the behavior you want. If your project is working currently, duplicate it, so that you have a backup.

The following changes are to the RootViewController.h RootViewController.m and RootViewController.xib files.

As written the RootViewController is a subclass of UIViewController. Make it a subclass of UITableViewController. Delete the UITableView *taskTableView instance variable and property in the header, and remove the @synthesize for this ivar as well. In the .m file remove self.taskTableView = nil; from the -viewDidUnload method and [taskTableView release]; from the -dealloc method. Change all other references to taskTableView in the RootViewController.m file to self.tableView.

In the RootViewController.xib file delete the outlet from File's Owner to taskTableView (it should have a yellow warning sign, since the ivar no longer exists) Connect the File's Owner view outlet to Table View.

That's it.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 7 - RootViewController didSelectRowAtIndexPath: not implemented scottgardner BOOK: Professional iPhone and iPad Database Application Programming 2 June 23rd, 2011 09:34 PM
Chapter 7 ViewTaskController - Dynamic Nav Bar Title EEE BOOK: Professional iPhone and iPad Database Application Programming 1 May 26th, 2011 09:18 AM
Nav Bar Styling VictorVictor BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 May 16th, 2006 06:02 PM
Centering of Image Within Nav Bar DuncanM CSS Cascading Style Sheets 1 April 26th, 2005 10:29 AM
nav bar problems Morrislgn Javascript How-To 1 June 3rd, 2004 07:45 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.