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 8998011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:58:01+00:00 2026-06-15T23:58:01+00:00

I am sure I have come across this before but I can’t remember what

  • 0

I am sure I have come across this before but I can’t remember what was causing it. I have positioned a UIImageView (bar_001) using a storyboard and I want to change its position programatically from within the viewController. My problem is that when accessed from viewDidLoad the UIImageViews size and origin are all just set to zero, what am I missing?

#import "ViewController.h"

@interface ViewController ()
@property(nonatomic, weak) IBOutlet UIImageView *bar_001;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self animateBars_V1];
}

- (void)animateBars_V1 {
    CGRect barRect = [[self bar_001] frame];
    NSLog(@"HEIGHT: %f", barRect.size.height);
    NSLog(@"WIDTH : %f", barRect.size.width);
}

@end

CONSOLE:

2012-12-11 12:53:27.777 TESTBED[4279:907] HEIGHT: 0.000000
2012-12-11 12:53:27.785 TESTBED[4279:907] WIDTH : 0.000000

STORYBOARD:

enter image description here

  • 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-06-15T23:58:02+00:00Added an answer on June 15, 2026 at 11:58 pm

    I have at times seen similar problem as well. I would try calling the animateBars_V1() method in viewDidAppear instead of viewDidLoad. By the time, viewDidLoad is called the view is loaded in the memory but may not have been drawn. I would have to look somethings up before I can give a definite reason for why it behaves like this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hay, not sure how many of you have come across this, but i was
I am sure this would have been asked before but couldn't find it. Is
Weirdly, I've never come across this issue before, but I've just started making a
This is a particular problem that I have come across many times, but I
I have come across a problem I just can't solve. I am using autocomplete
I'm sure I have done this before in the past, but I've been in
I have come across this before, and the answer has been either to null-terminate
I'm sure others have already asked this, but is it possible to insert an
I have come across a problem and am not sure which would be the
Apologies for using someone else's brain for this, but I'm sure this is a

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.