Changing the frame of an inputAccessoryView in iOS 8

后端 未结 9 2133
遇见更好的自我
遇见更好的自我 2020-12-13 02:42

Long time lurker - first time poster!

I am having an issue while recreating a bar with a UITextView like WhatsApp does it.

I am using a custom <

9条回答
  •  情话喂你
    2020-12-13 03:08

    100% working and very simple solution is to enumerate all constraints and set new height value. Here is some C# code (xamarin):

    foreach (var constraint in inputAccessoryView.Constraints)
    {
        if (constraint.FirstAttribute == NSLayoutAttribute.Height)
        {
            constraint.Constant = newHeight;
        }
    }
    

提交回复
热议问题