ios - UILabel change height, animation expands from center -
i'm trying increase labels height using animation, animation causes label first expand center, , jump in place correct y point. looks terrible. bottom 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 called about, can see video of animation here. https://www.youtube.com/watch?v=dcqktiz9moy&feature=youtu.be
faced same problem! try set label' contentmode top in code:
label.contentmode = uiviewcontentmodetop;
Comments
Post a Comment