UILabel Bounds don't animate in AnimateNotify Actions.

ChrisTooleyChrisTooley USMember
edited March 2016 in Xamarin.iOS

Hello, I have something like so:

//init my_ui_label here, added to UIScrollView, responds on tap to do the following:
AnimateNotify(2f, 0,0.7f, 0.7f, UIViewAnimationOptions.CurveIn, ()=>{
    my_ui_label.Center = new CGPoint( <some_x_position>, <some_y_position> );
    my_ui_label.Bounds = new CGRect( 0,0, <some_changed_value>, my_uilabel.View.Bounds.Height);
}, finished=>{})

The Center gets translated as expected, but the Bounds don't (I've even tried the Layer Bounds). I was under the impression that Bounds is a property that can be animated. I seem to be doing something wrong, any advice on this would be greatly appreciated :) The UILabel is inside of a UIScrollView object.

If further information is needed, please let me know.

Thanks,

Answers

  • ChrisTooleyChrisTooley USMember

    So.. I converted the objects to UIButtons (because I need interaction with them anyway) and it works now. I don't know why UILabels are different than UIButtons but there you go.

Sign In or Register to comment.