Customize Highlight Image on TabBar - iphone

I want to replace the normal highlight with an image on tabbar.
What is the simplest way to do this on iOS4 and iOS5??

This is super easy in iOS 5 (see the "Customizing Appearance" section of Apple's UITabBar documentation).
If your client is insisting on iOS 4, you'll have to be a bit more creative. Consider subclassing UITabBar or UITabBarController and doing some drawing of your own. Here is an example (and another example and another example which has an answer which points to something called BCTabBarController) you can look at. All great potential solutions for you.

Related

Navigation in a UItoolbar in iOS

Take a look at this picture:
I have something like a toolbar includes some buttons. user can move to left and right as you see. I know how to set the button in toolbar, but I don't know how can I fix this kind of navigation on the toolbar. Is it possible in the toolbar?
If yes, how?
if no, do you know any control in iOS that can help me?
It might be worth browsing through Cocoa Controls. They really have a lot of excellent pre-made custom controls for iOS and the Mac.
Personally, I would just create my own custom UIScrollView subclass which contains some UIButtons. Then set the scrollview to scrollView.pagingEnabled = YES after setting a correct content size.
Apple has an excellent guide on using scrollviews with paging here:
http://developer.apple.com/library/ios/#DOCUMENTATION/WindowsViews/Conceptual/UIScrollView_pg/ScrollViewPagingMode/ScrollViewPagingMode.html

UISplitViewController resize iPad

How can i resize the entire SplitViewController? Smaller then the full screen representation. I want to do a representation like registration in The Daily newspaper App.
I believe that you have to implement your own version of the UISplitViewController. One popular alternative is MGSplitViewController.
UISplitViewController has to be the RootViewController (there's a nice explanation of why on this question), and I don't think you can resize it. You would need to create your own class that implements the functionality you want to have a modal-type UISplitViewController, which is what I think The Daily has done.

UITabBarController customization

In our native iPad app, we need a few customizations to be done to the tab bar namely:
We want the height of the tab bar to be 54px,
The highlight color of the tab bar icons when selected needs to be yellow
There has to be a slight shadow at the top edge of the tab bar.
Apple's documentation states that UITabBarController is not meant to be subclassed.
Please advise what would be the best way to achieve the above customization if I cannot subclass UITabBarController.
Thanks.
You can subclass it, just apple discourages it because someone is bound to screw it up/change the functionality drastically. If you're just theming it and it doesn't look ugly, things should be fine.
If they do reject it, you can just go to the default UITabBar and ship with that.
You may also want to look at Three20
I think your best option would be to use a custom solution based on UIViewController.
I did write an iOS 7+ compatible simple UITabBar+UITabBarController replacement, you could use it as a starting point. It can support any number of tabs and that uses Auto Layout to build it's view hierarchy. Check out NGTabBar.

Really cool way to create custom UITabBar for iPhone app?

I am doing a lot of researching lately about how to get a different looking with nice effects UITabBar on my iPhone app, but unfortunately I am only finding things on how to replace background color etc.
Well, I've checked out this app called Momento which is pretty cool and presents a very slick tabBar:
So there are a couple of elements here I would like to ask you guys if you could help me by giving me the right directions on how to get a similar effect :)
Arrow above items: as you can see this app has this animated arrow that runs above the selected item with a very smooth animation.
Selected Stated of the item's image is not that blue-ish default one neither the default state which displays in a different shade of brown and gray version.
nice Items separators with beveled vertical lines.
different background image for the tabBar
different height for the tabBar
At this point after some research I am able to set the height and background image by subclassing UITabBarController but I'm still not sure on how to accomplish the other items specially the first one related to the nice arrow effect.
How do I do this? Please clarify what can or can't be done by subclassing the UITabBarController and specially if can be done in Interface Builder.
There's a project on github called BCTabBarController that aims to mimic the tab bar used in Twitter for iPhone. It's got some of the things you're looking for, and should give a great starting point.
Both of these are good answers, but both libraries have problems: BCTabBarController doesn't know how to create the "blue" highlighted version of a tab bar icon; and iDevRecipies doesn't send events to child viewcontrollers nor resize the navigation bar on rotate.
Be warned: custom nav bars are a lot of trial-and-error debugging (as I have found).
Simply use a UIView with TabBar width and height.Add custom background image and custom buttons on the view.Set the fileowner of the view as AppDelegate.Now you can simply connect the IBActions with the buttons.The Custom view can be placed over the tabbar by addSubView to the TabBar controller's view.You can switch between viewcontrollers by using the setSelectedIndex method of tableviewcontroller in the button action.

More than 1 button on the left side of a NavigationBar

Is it possible?
I have a UINavigationBar that I'd like to have an 'edit' button next to the 'back' button. From what I've read you can only have one or the other, which makes no sense as they are separate properties of the navigationItem object(backBarButtonItem and leftBarButtonItem).
I'm assuming you have to somehow insert a custom UIView into the UINavigationBar. I'm looking into this option and if no better solution is given then I'll outline this method.
The short answer is:
Yes, you have to add your own UIButton views (or other UIControl subclasses) to the navigation controller, yourself. So, ignore the custom *ButtonItem properties and roll it yourself.
A little more involved answer is:
Apple makes it very easy to follow their HIG guidelines, but you're on your own if you want to break them or customize. In this case, only one button is allowed, because the actual hit region is bigger than the size of the displayed button--much easier to hit from a usability standpoint.
Extraneous:
btw, there is a subtle distinction between left/rightBarButtonItem and backBarButtonItem. left/right is specified on the current UIViewController. However back is specified by the previous UIViewController.
Using a custom view is indeed your only option here. The UINavigationBar is not terribly flexible. What you will need to do is create a UIView that contains UIButtons. Be sure you realize that if you use a custom view, you gain none of the automatic behaviors of the backBarButtonItem; you have to create your own IBActions, and the graphics for the buttons as well.
On a related note, I'm not sure this is the best idea. It's usually wise to stick to Apple's UI guidelines; is there no where else you can put the edit button? The right side of the bar, for example?
While #Kelvin's answer works for pre iOS 5, if you're using iOS 5+ there is now a leftBarButtonItems array property. Note that you also must set leftItemsSupplementBackButton to true.