I have a tab bar app with a nav bar and table view. In the nav bar, the left is the back button to the parent view, the middle has the view's title, and the right button is the edit button.
I need to somehow have a button to add cells to the view. There is obviously no room in the Nav bar so I was thinking that when the edit button is pressed, the first cell in the table should be a cell that is also an add button. When the done button (which is the edit button just its text has been toggled), the add button cell would disappear. What do you guys think is this a good way to do this or do you have any suggestions?
Also, how would I start to implement this feature? Thanks.
My be this post will help you.
Edit:
Take a look to this tutorial
Related
I can do this programmatically but I don't prefer it that way. There's got to be some work-around for this. This is what my initial screen looks like:
To the toolbar, I dragged on a Bar Button Item and it fell into its proper place. Then i need a Text Field beside that. I dragged that from the library and dropped it beside the Bar Button item, and this is what I get:
What am I missing here?
I am building a tableview list with a search control to filter it. My requirement is to let user select one cell quickly by input some keywords.
The UI is simple, a navigationbar with an OK button to confirm the selection, a searchbar below the navigationbar, and the tableview in the bottom.
The problem is that, when user try to filter the tableview, the navigationbar would be disappear, the whole screen will go to search mode, the searchbar would in the top of the screen. In that case, when user selected a cell, he/she could not click the OK button I put in the navigation bar to confirm the selection, he/she have to hit the cancel button of the search bar to exist the search mode and then click the OK button I put there. That is not I want to.
How can I deal with this, to make this operation more easier for my user?
Can you try UISearchDisplayController ? It works like an autocomplete box.
http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UISearchDisplayController_Class/Reference/Reference.html
A search display controller manages display of a search bar and a table view that displays the results of a search of data managed by another view controller.
Example:
http://developer.apple.com/library/ios/samplecode/TableSearch/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007848
Hope this helps.
I have four UITabBarItem's. Each has a label and custom icon. My AppDelegate uses the UITabBarDelegate protocol and every click on a tabbaritem is logged to the console so I can see what is happening.
The only way to select a tabbaritem is to click on the label. If I click anywhere else on the button area, including the icon, nothing happens at all.
Have you come across anything similar?
Well, I found the issue. Whenever a tab was clicked and a new view was programatically inserted, that view was placed on top of the tabbar, but since it's background was transparent I could not see it. So half of the tab bar was covered by another view. By making sure to bringSubviewToFront: the problem could be solved. Thank you everyone who tried to help.
I have a UISearchBar which is subviewed by another view when a button is pressed. When it loads, it looks like the following (minus the red scribbles):
I would like to have the UISearchBar view be removed from the parent view controller when the tableView (the area with red scribbles) is clicked and is empty (no search has been made yet). I'm having a difficult time figuring out the best way to do this.
I have tried to put a transparent button in that section and add it as a subview to the search bar. However the button is underneath the tabl view area, so when the table view is clicked, the search bar loses focus and the uibutton is only then accessible.
Does anyone know how I can remove the search bar from the parent view controller when the empty table view below it is clicked?
Thanks.
To bring the transparent button up and make it catch all touched first, use [button.parentView bringSubViewToFront:button].
Another approach could be to catch the search bar losing focus (since you say you see that happening), by putting
– (void)searchBarTextDidEndEditing:(UISearchBar*)searchBar
in the search bar delegate, and handling it from there.
I need to display the action sheet above the Tab Bar controller. I mean, I would be able to see the Tab Bar controller even the action sheet view is in visible mode.
So, Please suggest how to view from above the Tab Bar controller. Is it possible.
secondly, How to change the back ground color of action sheet and cancel button back ground colour.
Please help me
Thank You,
Madan Mohan.
To display an action sheet from a tab bar, you can call the following within the view controller that is presenting it:
[actionSheet showFromTabBar:self.tabBarController.tabBar];
Note that the references explicitly state that action sheets cannot be styled. Nor is there anyway that I know of to make an action sheet appear on top of a tab bar. If you wish to step around the established interface guidelines in the manner you stated, you will probably have to create a custom view.
edit: The reason that the action sheet normally obscures the tab bar is that it is intended to be modal: either the user chooses an action, or they cancel. Either way, they shouldn't navigate away before making the choice, which your desired layout would imply.