Finding the right solution to a navigation problem

The most requested feature since the release of BabiBooks 1.0 has been the ability to add multiple books from the same author, and I can clearly see why. 

Imagine that I want to insert all my Terry Pratchett’s books in Babibooks, I should press the plus button, enter the Author’s Name and then select the first book, let’s say The Light Fantastic, but after saving the book (tapping on the Save button), all I could do was go back to My Books or Edit the book information, like in the screenshot below. 


21

After that, to add a new Pratchett’s book (and he has written a ton of them!) I should start over with the plus button and the search parameter...


I wanted to fix this even before releasing version 1.1 but I couldn’t find a way to fix this, without adding extra taps to edit the book’s information or to go back to the home screen, without passing through the Find Book and the Results screen.


IMG_05522


Finally, last week, while using the Twitter client TwitBird Pro on my iPhone I noticed that it displayed multiple buttons in the right part of the navigation bar, while I believed this was impossible. Suddenly I realized how I could achieve my goal, without having to add an extra menu and increasing the number of taps required to edit the book, go home or go back to the search results.


Below you can see the results that will be available to everyone in version 1.2 submitted to Apple on the 15th of December, and hopefully approved before Christmas.

This solution solves the navigation problem and, I think, it improves the overall look of the view, by using two nicely designed icons without increasing the space occupied previously by the text label.

Now I wonder how to add an additional action button to let me do other things with the book’s information, like sending them via email... Maybe three buttons would be too much without removing the “Details” label, or maybe the label could just disappear for good...


If you have any idea, just leave a comment!


IMG_05531



The code to place a custom view as a right button of the Navigation Bar is below (it’s not mine, I’ve found it in some forum, I’ve just  fixed it to meet my needs):

        UISegmentedControl* segmentedControl = [[UISegmentedControl alloc]
				initWithItems: [NSArray arrayWithObjects:
					[UIImage imageNamed:@"icon_home.png"],
					[UIImage imageNamed:@"icon_pencil.png"],
					nil]
					];
        [segmentedControl addTarget:self
		 action:@selector(segmentAction:)
	         forControlEvents:UIControlEventValueChanged];
	segmentedControl.frame = CGRectMake(0, 0, 90, 30);
	segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar;
	segmentedControl.momentary = YES;
	[segmentedControl setEnabled:YES forSegmentAtIndex:0];
	self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]		                             initWithCustomView:segmentedControl];
	[segmentedControl release];