Re: iPhone: badge icon for a button in toolbar
Re: iPhone: badge icon for a button in toolbar
- Subject: Re: iPhone: badge icon for a button in toolbar
- From: "Eric E. Dolecki" <email@hidden>
- Date: Thu, 11 Feb 2010 09:22:52 -0500
It's objectAtIndex not objectForIndex ;) Sorry - it's working now.
On Thu, Feb 11, 2010 at 9:21 AM, Eric E. Dolecki <email@hidden> wrote:
> Ok - I hooked it up to the appdelegate... from another class I am doing
> this (which bombs):
>
> MyAppDelegate *ad = (MyAppDelegate *)[[UIApplication sharedApplication]
> delegate];
>
> UITabBar *tb = ad.tabBar;//works fine
>
> UITabBarItem *tbi = [tb.items objectForIndex:1];*//bombs...*
>
> So still trying to access that button at index 1
>
>
>
>
> On Thu, Feb 11, 2010 at 9:09 AM, Eric E. Dolecki <email@hidden>wrote:
>
>> The class is UIApplication in IB. So it seems I can't do that?
>>
>>
>> On Thu, Feb 11, 2010 at 9:01 AM, Roland King <email@hidden> wrote:
>>
>>> add UIBarButtonItem outlets to whatever class Files Owner is
>>>
>>> eg
>>>
>>> @property( readwrite, retain ) IBOutlet UIBarButtonItem
>>> *item1;
>>>
>>> then you will be able to hook them up in IB.
>>>
>>> On 11-Feb-2010, at 9:57 PM, Eric E. Dolecki wrote:
>>>
>>> > Awesome - thank you!
>>> >
>>> > Now I am looking at how to access a certain UIBarButtonItem so I can
>>> set
>>> > it's badge.
>>> >
>>> > In my app delegate I have a UITabBarController. In IB I can't seem to
>>> create
>>> > an IBOutlet and wire the button I want up so I can set it's badge
>>> string.
>>> > When I attempt to wire it up from File's Owner (MainWindow.xib), I only
>>> have
>>> > the option Outlets -delegate.
>>> >
>>> > - (void)applicationDidFinishLaunching:(UIApplication *)application {
>>> >
>>> > *// Add the tab bar controller's current view as a subview of the
>>> window
>>> > *
>>> >
>>> > [window addSubview:tabBarController.view];
>>> >
>>> >
>>> > How do I access the button I want from the appDelegate?
>>> >
>>> >
>>> >
>>> > On Thu, Feb 11, 2010 at 8:46 AM, Mark Woollard <email@hidden
>>> >wrote:
>>> >
>>> >> See UITabBarItem's badgeValue property.
>>> >>
>>> >> Regards
>>> >> Mark
>>> >>
>>> >> On 11 Feb 2010, at 13:40, Eric E. Dolecki wrote:
>>> >>
>>> >>> I know about placing a badge on the homescreen application icon, but
>>> is
>>> >>> there a way to set this up for a button in a toolbar... or do I just
>>> use
>>> >> my
>>> >>> own UIView to do the same thing and float it over the toolbar?
>>> >>>
>>> >>> Eric
>>> >>> _______________________________________________
>>> >>>
>>> >>> Cocoa-dev mailing list (email@hidden)
>>> >>>
>>> >>> 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:
>>> >>>
>>> >>>
>>> >>> This email sent to email@hidden
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > http://ericd.net
>>> > Interactive design and development
>>> > _______________________________________________
>>> >
>>> > Cocoa-dev mailing list (email@hidden)
>>> >
>>> > 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:
>>> >
>>> > This email sent to email@hidden
>>>
>>>
>>
>>
>> --
>> http://ericd.net
>> Interactive design and development
>>
>
>
>
> --
> http://ericd.net
> Interactive design and development
>
--
http://ericd.net
Interactive design and development
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden