I have a UILabel
as subview of UIButton
and I am passing the value
from another view and populating in UILabel
. Now, I want that UILabel
must change its height based on the content.If text is "Hello" it must
be in 1 line but if text is " my text is too long to fit in the
label", it must change its size. I have used
[self.addressLabel sizeToFit];
But for this i need to leave empty space below UILabel. Simply what I want is that when text strength increases,size of UILabel and UIView must expand.
See Question&Answers more detail:os