How can i fix my scrollView dynamically when i have more than one textViews in it?

后端 未结 2 870
孤城傲影
孤城傲影 2021-01-27 16:56

I have a scrollView which consists of 3 textViews, buttons and labels in a detailView. i am using 3 text view because i need different fonts for my view title, date and descript

2条回答
  •  走了就别回头了
    2021-01-27 17:50

    You could set the size of the frame to be dependent on the character length by setting the frame at the onset to be:

    CGRectMake (0.0, 0.0, [yourString count]*10, 30.0);
    

    This is what I did when I had a UIPopover come up with a variable name.

提交回复
热议问题