0

I am beginner in iOS app development, I am working on a project that was done by someone else. So my problem is the label is not fully showing its contents: check the second column under 'customer name'.

I did some basic alterations to the label but it makes no change at all. This is a collection view, there is another view inside the collection view cell which holds the title label and description label. I searched everywhere but didn't get any proper answer please help.

Community
  • 1
  • 1

1 Answers1

0

Label in iOS does not change its size to suit the contents, you need to adjust it in your code. Your options are either decrease the font size to suit the description label size, or adjust the description label's height/width to make room for current content. I'd do a combination of both (slightly reducing the font size of the label's text, and at the same time making all the cells a bit wider and taller).

Oh, there is also a way to automatically shrink the font size if the contents doesn't fit the space. So, you'd need to check the option for your description label. Here's how you might do it: how to make UILabel autosize text in storyboard (or interface builder), NOT programmatically

Community
  • 1
  • 1
SimpleBeat
  • 747
  • 1
  • 10
  • 20