ios - Line appears after animating UILabel -
i performing 2 animations on myuilabel. myuilable custome class derived uilabel , have implemented drawrect method draws borders only.
this animation code:
- (void)animatelablein { uiviewanimationoptions options = uiviewanimationoptionbeginfromcurrentstate|uiviewanimationoptionallowuserinteraction; [uiview animatewithduration:0.1f delay:0.0 options:options animations:^{ label.transform = cgaffinetransformmakescale(1.1f, 1.1f); } completion:^(bool finished) { if (finished) { [self animatelableout]; } }]; } - (void)animatelableout { uiviewanimationoptions options = uiviewanimationoptionbeginfromcurrentstate|uiviewanimationoptionallowuserinteraction; [uiview animatewithduration:0.1f delay:0.0 options:options animations:^{ label.transform = cgaffinetransformmakescale(1.0f, 1.0f); } completion:^(bool finished) { if (finished) { } }]; }
at start of first animation grey line appears on top edge of label , persists after animations finished. want mention line isn't part of drawrect implementation , appears if drawrect empty. label bit smaller initially.
images attached not proportional.
before animations:
after animations:
any guess why happen?
finally have found problem. have changed frame of label @ time animations running. doing changes frame of label after animations finished fixed problem.
Comments
Post a Comment