Is there a particular reason why you need to create your own tab bar controller 
class rather than using the default one?

And as for image scaling, I don't believe UITabBarItems actually scale the 
images to fit. I seem to recall at one point having an image that was a little 
too big and seeing it get clipped. Creating scaled images is very trival, 
though. There are some functions in UIGraphics that can help out.

steve


On Jan 26, 2011, at 5:01 PM, ico wrote:

> Hi,
> I just want to figure out how to scaled  its size to fit the TabBarItem. I 
> think it is automatically scaled to fit if I use TabBarController, but what I 
> am doing is that I try to implement TabBarController feature by myself by 
> subclassing UIViewController and implement the TabBarDelegate.
> 
> On Wed, Jan 26, 2011 at 11:31 PM, Steve Christensen <[email protected]> wrote:
>> On Jan 26, 2011, at 3:10 AM, ico wrote:
>> 
>>> Everything is fine except that my images for UITabBarItem is not scale to 
>>> fit the item size to be displayed properly. As it should be as described in 
>>> the UITabBarItem documentation:
>>> *image*
>>> 
>>> The item’s image. If nil, an image is not displayed.
>>> 
>>> The images displayed on the tab bar are derived from this image. If this 
>>> image is too large to fit on the tab bar, it is scaled to fit. The size of 
>>> an tab bar image is typically 30 x 30 points. The alpha values in the 
>>> source image are used to create the unselected and selected images—opaque 
>>> values are ignored.
>>> 
>>> How to fix this problem?
>>>> 
>>> 
>> 
>> Glenn has already addressed proper usage of a tab bar.
>> 
>> As for the images themselves, I'm unsure what your problem is. Are you 
>> trying to figure out how to scale the image to fit? Or are you trying to 
>> figure out how to make your images display correctly, given that tab bar 
>> items only look at an image's alpha channel and ignore the color components?
>> 
>> steve
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to