• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UI_APPEARANCE_SELECTOR question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UI_APPEARANCE_SELECTOR question


  • Subject: Re: UI_APPEARANCE_SELECTOR question
  • From: Luke the Hiesterman <email@hidden>
  • Date: Fri, 08 Feb 2013 13:42:59 -0800

Appearance customizations get applied at layout time, so your view simply hasn't had the appearance applied yet in -initWithFrame:. That's why self.tabFont is nil.

Luke

On Feb 8, 2013, at 1:38 PM, Alex Kac <email@hidden>
 wrote:

> Trying to see if I understand this correctly and what I may be doing wrong. I have a tab bar project that is in my workspace and I've added this to its font property: UI_APPEARANCE_SELECTOR as such:
>
> @interface AKTabBarButton : UIView {
>
> }
>
> @property (nonatomic, strong) UIFont *tabFont UI_APPEARANCE_SELECTOR;
>
> - (id)initWithTabBarItem:(AKTabBarItem*)item;
> @end
>
>
> Within the initWithFrame: method:
>
> label.font = self.tabFont ? self.tabFont : [UIFont boldSystemFontOfSize:10];
>
> and in code before we ever create any tab bars:
>
> [[AKTabBarButton appearance] setTabFont:[UIFont boldSystemFontOfSize:12]];
>
> However self.tabFont is always nil. Its never getting my customized font. All the articles/websites/devforum pages I've read say that this is all I should have to do, but as something that's not documented much I'm not seeing how its supposed to work.
>
> I'd love any tips or pointers on what I'm doing wrong.
> _______________________________________________
>
> 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

  • Follow-Ups:
    • Re: UI_APPEARANCE_SELECTOR question
      • From: Alex Kac <email@hidden>
References: 
 >UI_APPEARANCE_SELECTOR question (From: Alex Kac <email@hidden>)

  • Prev by Date: UI_APPEARANCE_SELECTOR question
  • Next by Date: Re: Timeline control like in ScreenFlow...how i can implement?
  • Previous by thread: UI_APPEARANCE_SELECTOR question
  • Next by thread: Re: UI_APPEARANCE_SELECTOR question
  • Index(es):
    • Date
    • Thread