I have a UILabel in the main view with text - \"Very Very long text\". The proper width to this would be 142, but i\'ve shortened it to 55.
Basical
You add In your view scrollview and add this label in your scroll view .Use this code
scroll.contentSize =CGSizeMake(100 *[clubArray count],20);
NSString *bname;
bname=@"";
for(int i = 0; i < [clubArray count]; i++)
{
bname = [NSString stringWithFormat:@"%@ %@ ,",bname,[[clubArray objectAtIndex:i] objectForKey:@"bottle_name"]];
[bname retain];
}
UILabel *lbl1 = [[UILabel alloc] init];
[lbl1 setFrame:CGRectMake(0,5,[clubArray count]*100,20)];
lbl1.backgroundColor=[UIColor clearColor];
lbl1.textColor=[UIColor whiteColor];
lbl1.userInteractionEnabled=YES;
[scroll addSubview:lbl1];
lbl1.text= bname;
This is implemented code.Thanks