I'm trying to increase a labels height using animation, however the animation causes the label to first expand from the center, and then jump in place with the correct y point. This looks terrible. I would like only the bottom to expand.
[UIView animateWithDuration:0.5 delay:0.0f options:UIViewAnimationOptionTransitionNone animations:^{
   [self.about increaseHeightFromTopLeft:deltaHeight];
   [self.scrollView increaseContentHeight];
} completion:nil];
- (void)increaseHeightFromTopLeft:(CGFloat ) increased  {
    CGRect newFrame = CGRectMake(self.originX, self.originY, self.frameWidth, self.frameHeight + increased);
    self.frame = newFrame;
}
The label is called about, you can see a video of the animation here. https://www.youtube.com/watch?v=DcqktIZ9moY&feature=youtu.be
Faced same problem! Try to set label' contentMode to Top in code:
label.contentMode = UIViewContentModeTop;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With