How to make Multi-line/AutoResizing UITextView when new line added in xamarin, similar to SMS-app.

sumitmishrasumitmishra Member ✭✭
edited February 15 in Xamarin.iOS

Hi,
We are working on a chat application in xamarin.ios native app, so here we want to implement a auto growing textview when new line added like sms or Skype app. How to implement this in xamarin.ios. I have done many R&D on this and many search on internet but not got any proper solution yet.

Please guide me to solve this.

Best Answer

  • sumitmishrasumitmishra ✭✭
    Accepted Answer

    Hi We got another simple solution for this.

    textview.Changed += (object sender, EventArgs e) =>

    {

    //Action

    var NewHeight = txtMsgToSend.ContentSize.Height;

    textview.Frame = new CGRect(x:textview.Frame.X, y: textview.Frame.Y, width:
    textview.Frame.Width, height: NewHeight);
 

    }
 

    };

Answers

Sign In or Register to comment.