Changing items in TTLauncherView according to TabBar - iphone

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.

Related

Set array of TabBar items dynamically with scroll view

How can I add a TabBar on top of the iPhone? Also I need to set an array of TabBar items dynamically with scroll view.
For more details refer to this url
I need to create tabs like Top News, City, India, World, etc.
UITabBar generally is placed at the bottom of the screen and there usually only one per app. It may be possible to sidestep this, though Apple probably won't like it.
You do not directly manipulate a UITabBar. Instead, you add navigationControllers to the UITabBarController. Tabs can then be manipulated by setting the tabBarItem property on the NavigationController.
All that said having reviewed the screenshot, I am almost certain that a UITabBar is the wrong choice for this. You'd be better off rolling your own control or perhaps using UISegmentedControl.

How to add a custom colorful Image to a tabBar in a TabBarController?

I am using a UITabBarController where i want to load a custom colorful image to the respective TabBar. I want to customize the font size,color and type of the Text for the UITabBar item. I have tried out many possibilities by using image property for the tabBar and tried to create a imageview and adding it as an subview to the tabBar. Can someone please provide any alternative to this problem?
The only way for this is implementing your own custom tab bar controller. You can find many tutorial on the web if you google "custom tab bar". This is one for iOS 5. And here, you can find another.

Replacing UINavigationControllers NavigationBar with 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.

Iphone uiwebview and uitableview together possible?

I have a UITableView which is long and scrollable, also I use UINAvigationController. At the bottom of the page in the footer I plan to put a next button which will help to go next page.
The problem is "sometimes" this page may need to show some messages in html, so I must use uiwebview preferebaly at the bottom of the page just above the footer, it shouldnt get effected from scrolling.
-Can I use uitableview and uiwebview on same page? the page is already in control of a uitableview controller, so how will i control or put delegates of a uiwebview?
-Can I make this uiwebview invisible and not allocate space when there are no messages to be shown?
Yes, it's possible.
I believe the Stocks app for the iPhone utilizes multiple views with their own controllers. I think a better solution would be is to have a UIPageControl and create a UITableViewController when the UIPageControl's value changed.
If you still want to create UINavigationController, just set its rootViewController to a UITableViewController and set its toolbarHidden property to NO, the toolbar has the behavior you want, it stays fixed on the bottom of the screen, if that's what you meant. Then add the navigational buttons.
As for UIWebView's, just dynamically create it once you get an error and set its hidden property to YES. You wouldn't want to be destroying and recreating UIWebViews every time you get an error as that can be very expensive. Just create once and hide it.

UITabBar - iPhone

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