Is there any way how I can create a UITabBar with options such as Home, Search and Login and display these on all the pages including those without a UITabBarItem? For instance, on my Shopping Cart view I will have the UITabBar (with Home, Search and Login) but without a UITabBarItem for the Shopping Cart?
Is this possible?
Thanks in advance!
You can simulate an UITabBar using custom UIButtons.
I'm using this technique in an app I'm developing at the moment because I want certain effects (like fading) when switching between different views.
UITabBar (you should carefully read the doc) extends UIView.
So :
You can put it wherever you want (addSubview method)
You can change items in run time with
-(void)setItems:(NSArray *)items animated:(BOOL)animated
Related
I am trying to replicate the feature in voice memos app that uses a custom UiTabBar displaying a slider (showing how long and where the the audio currently is) and two buttons (delete and share). I am struggling to find answers as to generate a similar tabbar that can control the content shown in the background. I would appreciate any comments or suggestions on how to achieve this with monotouch. Thanks.
To put it simply, what you are seeing in the voice memos app is not a tab bar. It is a custom UIView that is at the bottom of the screen.
Create a custom view to put at the bottom, and give it delegate call backs to your controller that also controls your other content. When a button is pressed have you view call back to the delegate and then the delegate can act on it.You may also want to give your custom view an external property so that you can have your controller update the position of the slider.
Hoep this is of some help to you :)
I am developing an application for iOS 4 based iphone/ipad, required to develop custom UITabBar for my application. as per specification, The tab-bar has
1. image as background
2. tabbar items as custom buttons
3. buttons having badges
Please refer the image:
http://imageshack.us/photo/my-images/638/tabbar.jpg/
It is not required to bring any views corresponding to the click of buttons. so is it advisable to
a. subclass uitabbar controller OR
b. make a view with custom buttons having badges?
Please share your thoughts, alternative approach and code snippet if possible.
Thanks and Regards,
powerpc
If you are not bringing on any views, you are most probably looking for a toolbar rather than a tab bar.
After looking at your image I recommend rolling your own with UIView.
However, if you need advanced tab bar functionality, such as managing the items and badges, you can also subclass UITabBar. After all it is also a subclass of UIView.
I am developing app that has multiple skins and I have a dilemma on how to implement this.
One of the solutions would be to have separate nib files for every skin, and load it depending on which skin is currently selected. Problem with this is that I can't edit navigation bar of navigation controller (which my app uses), and I have to change it's background image and back button image etc.. I came up with an idea to hide this navigation bar on every screen and replace it with custom UIView in Interface Builder which will act as navigation bar and custom back button with IBAction for popping current View Controller, so that user won't see any difference.
Is this approach acceptable and if I make it this way, will I have problems with rejection in App Store?
If you choose to hide & replace the UINavigationBar with your own UIView it's no problem as far as Apple goes.
However, I can tell you that you will have to spend some time trying to replicate some visual effects that come naturally with UINavigationBar.
For example, when you push/pop a new controller, you will see that the navigation bar title will slide & fade beautifully. The same applies for left and right bar items.
Personally I would not completely hide the UINavigationBar, but customize it. In the end it all depends on what you want, but by default the UINavigationBar is pretty customizable.
You can add your own buttons or even entire UIViews as left and right bar items. Also, you can add your own UIView as the title (with your own label, custom font or whatever) or change the background.
EDIT:
To easily customize the looks in your entire application, you can subclass UINavigationController and create your own CustomUINavigationController. Then, in viewDidLoad method you can change whatever you want to the navigation bar and this will be accessible in the entire application.
No way, what you are doing is perfect. This will work & no way it will get rejected from app store (just based on this approach). I too have explored several ways to provide skins & what you wrote seemed to be the least hassle-some. Plus its way more easier to create UI elements in Interface Builder hence the separate nib files for different skins.
I am saying this so confidently 'coz I have done the same thing & app store approved.
Best of luck.
What I'd like to do is have 3 or 4 buttons on a UITabBar. All except one of these behave as normal UTabBar buttons - ie they switch between different views. But I'd like one of the tab bar buttons to perform a function - refresh the app's data - without switching views… Is this at all possible?
I suggest you use a tool bar for something like this and simply change the background of the toolbar to make it look similar of that to a tabbar and then add tabbar buttons to the toolbar button.
Although im pretty sure this will be rejected by apple, as the intended purpose for a tabbar is to change views. It has something to do with the apple guidelines about what users expect from certain UI components. and if you start switching around with the main purpose of a UITabBar it will be a confusing place in the apple application world.
PK
I'm developing an iPhone application using the Three20 library. The main screen is a TTLauncherView (with images inside, like Facebook) and a TabBar at the bottom. Each time a new item is selected in the TabBar, I have to change the images inside my TTLauncherView.
I thought that I only had to change the "pages" property of my TTLauncherView, but it doesn't work. Nothing is displayed.
What am I doing wrong ? Is there a way to achieve this simple task ?
Thanks in advance
No, this is not simple. You have to create multiple TTLauncherView to populate into your TabBar view controllers, not by changing the pages property.