In my iPad app I am showing scrolling UILabel
with text that will be fetched from the web service and the text size of the same need to be set Dynamic. My problem is that I will have to set the width of the UILabel
according to the length of the text to be fetched from the web service.
I have tried all or most of the solutions possible but in vain.
Say if the NSString
where I am storing the string fetched from the server is with 300 characters,it shows 2270 as width using the following code.
CGFloat width = [ScrollingLabel.text sizeWithFont:ScrollingLabel.font].width;
ScrollingLabel.frame = CGRectMake(1024,720,width,45);
But then also I am not getting half of the string in the app.