Re: Can't keep disabled UIBarButtonItem text white
Re: Can't keep disabled UIBarButtonItem text white
- Subject: Re: Can't keep disabled UIBarButtonItem text white
- From: Rick Aurbach <email@hidden>
- Date: Wed, 10 Jul 2013 19:07:05 -0400
- Acceptlanguage: en-US
- Thread-topic: Can't keep disabled UIBarButtonItem text white
Well, since a UIBarButtonItem is a UIBarItem, you might try explicitly using the UIBarItem method setTitleTextAttributes:forState:, specifying the disabled state. (You'll need to do this in code (such as viewWillAppear:), since IB doesn't disclose the information. I'm guessing here, but my guess is that grayed text is the default text attribute for the disabled state, unless explicitly overwritten.
Rick Aurbach
On Jul 10, 2013, at 5:53 PM, Rick Mann <email@hidden> wrote:
> I'm building it in IB.
>
> On Jul 10, 2013, at 15:46 , Luther Baker <email@hidden> wrote:
>
>> Which constructor are you using?
>>
>>
>> http://developer.apple.com/library/ios/#documentation/uikit/reference/UIBarButtonItem_Class/Reference/Reference.html
>>
>> - (id)initWithCustomView:(UIView<http://developer.apple.com/library/ios/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/c_ref/UIView>
>> *)*customView*
>> *
>> *
>> The bar button item created by this method does not call the action method
>> of its target in response to user interactions. Instead, the bar button
>> item expects the specified custom view to handle any user interactions and
>> provide an appropriate response.*
>> *
>>
>>
>>
>> On Wed, Jul 10, 2013 at 3:54 PM, Rick Mann <email@hidden> wrote:
>>
>>>
>>> On Jul 10, 2013, at 08:28 , Rick Aurbach <email@hidden> wrote:
>>>
>>>> I haven't tried this, so I don't know whether it will work, but…
>>>>
>>>> have you tried leaving the buttons enabled but disabling user
>>> interaction for them? Of course, if that works then it leaves open the
>>> larger question of whether your UI goals are best served by displaying
>>> buttons that can't be pushed...
>>>
>>> Unfortunately, there's no userInteractionEnabled property.
>>>
>>> And, in this case, they don't have the appearance of buttons. They're just
>>> UIBarButtonItems because for whatever reason, Apple chose not to make these
>>> things UIViews.
>>>
>>> Here's a screenshot:
>>>
>>> http://cl.ly/image/000P2Y1v2D2j
>>>
>>>
>>> --
>>> Rick
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>>
>>> 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
>>>
>> _______________________________________________
>>
>> 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
>
>
> --
> Rick
>
>
>
_______________________________________________
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