I'm writing an app that has a 5 item TabBar. When launching, I want the app to show the contents of the view for the first item, without showing the Tabbar. I want a hidden button to cover the full screen so that when I tap anywhere the TabBar pops up from the bottom. I then want it to hide itself again after a few seconds.
I guess it isn't vital that it not show the TabBar on launch if it will hide itself after the predetermined time frame.
I'm new to programming, and I'm having difficulty making this happen. I've looked at the suggestions for similar questions, but they don't seem to help. Any suggestions for making this happen?
Look at the example code "The Elements". It hides the tab bar when you select an element.
Related
I'm working on a tabbed application using storyboards in Interface Builder. The Stack Overflow question at TabBar in one view leading to a second view with another set of tabbar seems to answer or at least be relevant to my question, but unfortunately I don't understand the answer entirely.
The first tab in the UITabBarController takes people to the main/home view controller, which displays a short text on the screen. I want to add a function whereby the user taps on the screen and a new tab bar slides in (like in iPhoto when you tap on a photo that's been displayed) with options to send, trash, or edit the text.
I don't need the new tab bar to be translucent like it is in iPhoto.
How do I do this?
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'm wondering if it is possible to start my app with all my tabs in the "up" state and show a "landing" view to the user. Kind of like a welcome/quick start. When they select one of the tabs, it switches views as normal.
Will you point me in the right direction?
Kind of like this:
If you're using a UITabBar/UITabBarController, I think you must have the selectedIndex set to some legal value. I don't think this is possible, nor can I find an app on my iPhone or iPod that mimics the behaviour you're looking for.
(The App Store app is as close as it gets, where it looks like it has an empty tab bar before it loads data from the Internet, but it could very well be that they are just re-using the Default.png and superimposing an activity indicator during loading.)
Note that if you tried to submit your app to Apple, they could easily reject it for using non-standard UI.
The way I would probably do this is to create a new ViewController that's just for this screen, but make sure it's last in the viewControllers array managed by the UITabBarController. That way, when you show the tab bar on the screen, you get the 4 tabs and the more button, but the currently selected view controller is not in the bar, meaning that all of the other tabs are unselected.
Once the user has satisfied the condition for showing the screen, you can discretely remove the view controller from the tab bar, and the user will never be the wiser.
I want to show more tahn four tab bar item on tab bar controller by scrolling tab bar . is it possible in iphone if it is.. please give the exact solution.??
Hoping your positive response
The iPhone SDK creates a kind of "favourites" option automatically, so the user can drop their favourite icon to the tabbar..
Maybe you can extend the UITabbar and implement a "scrolling/swiping" mechanism, but I suggest you not to do that. This because swiping on a menu (tabbar) can be really annoying for the end user and they probably drag their "most-use" icons to the tabbar so don't worry about that. My advise: Save your time, and put it into more interesting features for your app instead of spending hours figuring out how to make a scrolling tabbar...
You can also make your own UIView and "duplicate" the tabbar, so it looks like a tabbar but it actually isn't, but again that's a complete different approach...
Currently the code I need to modify uses a tabBarController with a single selection inside it which takes the user back to the root view, but because it is a tabBar then the whole of the tab is selectable and I need it so only the button positioned in the middle of the tab bar is selected.
I am fairly new to this but know it is not a tabBar that is needed here but something else, maybe just place a button there. Any help would be fantastic. I would post the code up but I am unsure which section would be required. I hope I made myself clear enough :)
Rowley
Tab bars are for switching among different views. If all you want is a home button, a tab bar would not be a good choice. You could use either a simple UIButton, or possibly a tool bar -- though the tool bar is generally used when there is more than one action the user might take.