Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3956606
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:23:05+00:00 2026-05-20T02:23:05+00:00

I have a UILabel which I set a font size and a font name

  • 0

I have a UILabel which I set a font size and a font name with Interface Builder. Now I have to read the values of both in my ViewController.

How can I do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T02:23:06+00:00Added an answer on May 20, 2026 at 2:23 am

    Add a property to your view controller’s .h file:

    @property (nonatomic, retain) IBOutlet UILabel *label;
    

    Link the label to this IBOutlet under “File’s Owner” outlets in Interface Builder. If not using ARC, make sure you release it in -dealloc

    - (void)dealloc
    {
        [self.label release];
        [super dealloc];
    }
    

    Then to get the font name and size all you need is

    NSString *fontName = self.label.font.fontName;
    CGFloat fontSize = self.label.font.pointSize;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an app which will have a question in a UILabel and
I have created a MultilineCell for my app, which shows first a UILabel consisting
I have a custom UITableViewCell that contains a UISlider control and a UILabel which
I have a subclass of UILabel, which is supposed to update its text when
I have UITableViewCell with UILabel and UISwitch . By default all UISwitch is set
How do I set the size of a subview which is being placed programmatically
I have a subclassed UITableViewCell called Comment, which has a UILabel containing some relevant
In Objective-C, I have a category for a class: @interface UILabel(CustomInit) - (id)initWithCoder:(NSCoder *)coder;
I have a UILabel which has UILabel attached to it. I add NSString value
I have a UILabel on the screen, which is currently in portrait. However, I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.