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 <edole...@gmail.com> 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 <r...@rols.org> 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 <mark.wooll...@mac.com
>> >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 (Cocoa-dev@lists.apple.com)
>> >>>
>> >>> 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/mark.woollard%40mac.com
>> >>>
>> >>> This email sent to mark.wooll...@mac.com
>> >>
>> >>
>> >
>> >
>> > --
>> > http://ericd.net
>> > Interactive design and development
>> > _______________________________________________
>> >
>> > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> >
>> > 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/rols%40rols.org
>> >
>> > This email sent to r...@rols.org
>>
>>
>
>
> --
> http://ericd.net
> Interactive design and development
>



-- 
http://ericd.net
Interactive design and development
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to