Reputation: 241
I'm having trouble with adding a label to a scroll view, I am trying to start the label a little in from the edge of the scroll view frame, but without adding any horizontal scrolling (the label width is well below the scroll view width, it's the height of the label that goes beyond the scroll frame height)
including a screenshot (green is the scrollview frame, red is the label frame)
Upvotes: 0
Views: 248
Reputation: 1414
Some code would help. But basically you need to set the x origin to a few pixels.
//Inset the x origin by 10 pixels
UILabel *someLabel = [[UILabel alloc] initWithFrame:CGRectMake(10,0,50,50)];
Upvotes: 1
Reputation: 2942
I am not sure if i understood it right but Just add a blank space before your textLabel string. something like
[NSString stringWithFormat:@" Dummy Data...", myLabel];
Upvotes: 0