UISearchBar seems to disable UIBarButtonItems in Navigation and Toolbar under iOS7 - ios7

I have a view controller with a navigation bar at the top and a toolbar at the bottom with a table view in the center. The table view has a search bar and scope bar. The user can use the search, or not. When done searching the user select items from the resulting list and then selects a button in the toolbar to move to the next view controller using a segue. Everything is constructed using storyboards. The layout, functionality and workflow works fine under iOS 6.
Under iOS 7 the layout, functionality, and workflow work fine w/o search (i.e., the user simply selects items from the table). The search mechanism also works fine, but the 'Done' button in the navigation bar, and the 'Select' button in the toolbar are disabled (i.e., the prepareForSegue method isn't entered). If I select cancel in the search bar the search results are lost but the workflow is again functional (i.e., the buttons are enabled and prepareForSegue is entered as expected).
I tried implementing the UISearchBar searchBarTextDidEndEditing and searchBarSearchButtonClicked methods and making sure they are invoked in the didSelectRowAtIndexPath method. These changes had no positive or negative effect. I also experimented with some of the features of the view controller, thinking that maybe the search results were in some way obscuring my navigation and toolbar buttons but that didn't work either.
I haven't found a reference to anyone else encountering this kind of problem.

Related

Navigation bar doesn't show back button

I have a navigation controller with a table full of buttons that cause various settings pages to push in. I needed to add a new one, so I copied one of my existing ones, changed the VC, and off I go.
But there's no nav bar on the screen. I can see the navigation object in the storyboard and the editor simulates it's display. I compared it to the other pages that are displaying the bar, and they look the same.
I tried changing some settings, like "Hide Bottom Bar On Push" and that had an effect, but my attempts to get the bar to show up fail.
I looked at other questions that suggested it had something to do with naming, but I've tried various name fields - on the Navigation Item, the VC's Title, etc. - with no effect.
I am not sure, but the problem may be that in case the segue to the new View Controller Scene is set to modal, it would not have a Nav Bar, To be able to see one, you need to embed that in another Navigation Controller.

UI Tab Bar added to Storyboard not showing up when I build the App

I have an iOS App. I currently have an existing View Controller. I manually added a UI Tab Bar to it using the storyboard.
I added the UITabBarDelegate and implemented the corresponding functions required tabBar:tabBar didSelectItem:item.
I've also connected the delegate of the Tab Bar to the view controller itself.
However, when I build, the Tab Bar completely does not show up at all.
I know you can just use a Tab Bar Controller, but I need to add the Tab Bar to it, and use the Tab Bar to modify content of the view itself. (specifically it acts as a filter for a table view) So, it doesnt make sense to create 4 exact same Views to hook up to a UI Tab View Controller
What am I doing wrong?
I found out what's wrong.
It turns out, I had completely successfully implemented the UITabBar. What happened was that I was testing on an IPhone 4. As such, it bled out of the screen and could not be seen. Adding constraints fixed it.

Bug with Tab Bar being covered by UITableView

So I have 3 main scenes, each with a tab bar item. The first scene (Account scene) contains a UITableView. Also on this scene I have a button which switches to a different scene that is NOT included on the tab bar.
ie. Account scene (which IS on tab bar) has button to link to Account Info page (which IS NOT on tab bar). This all works fine, but when I go back to the Account scene from the Account Info scene, the UITableView now is covering the Tab Bar (or the Tab Bar may have just disappeared altogether), so I can no longer access it and switch to different scenes.
Anyone else encountered something similar or know why this may be happening? If sample code is needed I can post some, but I did this mostly using storyboard.
Cheers,
Robin
Fixed. Was segue-ing to the view controller itself, instead of segue-ing to the TabBarController that handled the view. Limitation is that I can only segue back to the first tab bar view, which is kind of annoying but oh well.

iOS layout: alternative to tabs?

I'm working on a iPhone app which shows an mobile webform in a UIWebView. I'm using a default iOS layout with a navigation and tab bar.
The mobile webform is displayed in a UIWebView in the white area. Since the webform has a lot of input fields, we really need as must space for it as possible. Because of this, we are planing to remove the tabs in the bottom. Over time, there will be more tabs/sections, so it is not a solution to just add a button for each section in the left side of the navigation bar. On a iPad a popover could easily be used to handle this.
Is there a standard iOS layout mechanism to handle this change of sections/views without using tabs?
You could do something long the lines of Path or the new Facebook app and have the "table of contents" behind the Navbar and the navbar slides away (along with the child view) to reveal it. When done right (ie smoothly) I think the effect is really cool.
This would also work great as you add more and more options, since the table could just scroll.
Here is a framework that might be you started: http://www.cocoacontrols.com/platforms/ios/controls/iiviewdeckcontroller
I would consider replacing the navigation bar's title with a control that lets you switch between tabs. You can assign the bar's titleView property to a control or a button and it will generally do the right thing.
If you're limited to 2-3 tabs, you could simply use a UISegmentedControl.
If you want more, you could use a button which, when tapped, pops up a view that allows you to select the view you want. This could be a modal table view, or you could slide up a UIPickerView from the bottom of the screen, similar to the keyboard.
I use this technique in an app of my own, screenshots here. Tapping the button cycles between views (in this case, I'm changing the contents of the table cells); tap-and-hold slides up a picker.
Another possibility would be to arrange your different forms on pages in a scroll view with a page control at the bottom, à la Weather. The best option, though, if you’re going to have a particularly long list and want to keep your screen real estate, is probably the FB/Path-style sidebar table.
I ended up using a UIActionSheet but I think it in other situations would be more stylish to use a controller like the IIViewDeckController.

What is the correct UI guideline for an "Action" button in an iOS application on a UITableView per row?

My iPad (!!) app has a table view as the UISplitViewControllers details controller. To trigger various actions I use the following:
A swipe gesture on the cells to make a button visible that is called "Action".
Touching the action button shows a UIActionSheet with various options (Delete, Send, Download).
Touching one of the buttons in the action sheet triggers the action.
To achieve this behavior I customized the title of the "Delete" button which would normally be shown by the swipe gesture.
Please note that touching the cell itself will open/preview the touched item.
However, my test users complain that they cannot find the action menu because they would never try swiping the cells and if they would, they would do it to delete the entry. But they like that touching the cell previews the item.
Hence my question: what is the correct way of doing it? Show a disclosure button in every row (the little blue arrow to the right)? Show UIBarButtonItem in every row to bring up the action menu?
I'm so against it because it looks ridiculous to have a button in every row.
Sounds like a tricky situation; I'd either:
Add a detail disclosure button to each cell, and have that push a new view controller with the options (like the YouTube app).
Show the options in the "entry" view and have the "swipe" action an extra, discoverable feature (like the Twitter app).