Views jump during ViewDidLoad

Posted by Jon-Paul on Stack Overflow See other posts from Stack Overflow or by Jon-Paul
Published on 2010-06-07T20:36:49Z Indexed on 2010/06/08 16:52 UTC
Read the original article Hit count: 321

Hi,

I have a custom button, subclassed from UIButton that is initialised as below (obviously all the button does is use a custom font).

@implementation HWButton

- (id)initWithCoder:(NSCoder *)decoder {

    if (self = [super initWithCoder: decoder]) {

  [self.titleLabel setFont:[UIFont fontWithName: @"eraserdust" size: self.titleLabel.font.pointSize]];
    }

  return self;
}

So far so good. But when I use the custom class in my nib and launch the app, the button initially displays for a split second as tiny with small text, then grows. So the outcome is what I want, but I don't want to see the transition. Can anyone put me right?

Thanks. JP

© Stack Overflow or respective owner

Related posts about iphone

Related posts about interface-builder