我正在計算我的動態文本視圖的正確高度。但我在這裏沒有得到正確的高度。我該怎麼做才能獲得正確的身高。我必須展示一些阿拉伯文字。任何技巧,以獲得正確的大小。請幫助我如何計算我的動態文本正確的高度查看
CGSize size = [foundationTrimmed sizeWithFont:newsSecondPart.font constrainedToSize: CGSizeMake(newsSecondPart.frame.size.width-11,10000)];
size.height = size.height + 50;
CGRect newsSecondPartFrame = newsSecondPart.frame;
newsSecondPartFrame.size.height = size.height;
newsSecondPart.frame = newsSecondPartFrame;
CGRect CGRectnewsImageFrame = newsImageView.frame;
CGRectnewsImageFrame.origin.y = newsSecondPartFrame.size.height+40;
newsImageView.frame = CGRectnewsImageFrame;
scrollView.contentSize = CGSizeMake( 0, newsSecondPartFrame.size.height+CGRectnewsImageFrame.size.height+ 100);
newsSecondPart.text = foundationTrimmed;