OAStackView icon indicating copy to clipboard operation
OAStackView copied to clipboard

UILabel's don't respect incasing view

Open codyrobb opened this issue 10 years ago • 7 comments

So, I've been using OAStackView as a drop back for iOS8/7 users. Overall, it has been really really good, but I keep running into the same problem with labels.

I will describe the situation, both are nearly identical.

  1. I have two labels vertically stacked. Alignment is OAStackViewAlignmentLeading, distribution is OAStackViewDistributionFill.
  2. This vertical stack view is nested in a horizontal stack view. It goes [icon, verticalLabelStack, arrow]

Now, UIStackView will either truncate the text or break it into multiple lines (if specified to). In both situations OAStackView has the text overflowing.

This is my only big problem with OAStackView, would be awesome to get this fixed!

codyrobb avatar Aug 06 '15 17:08 codyrobb

Can you post a screenshot?

harlanhaskins avatar Aug 06 '15 17:08 harlanhaskins

With the UIStackView behavior and OAStackView behavior?

harlanhaskins avatar Aug 06 '15 17:08 harlanhaskins

UIStackView (iOS 9)

simulator screen shot aug 6 2015 1 43 11 pm


OAStackView (iOS 8.4 & iOS 9)

ios simulator screen shot aug 6 2015 1 45 40 pm


I also double checked OAStackView running on iOS9 to make sure it wasn't an iOS8 issue.

In this case I want the label to truncate, but it continues past the edge. I have also come across a similar problem where I allow the label to grow to multiple lines instead of truncating. UIStackView is able to handle this case, but I'm running into the same problem with OAStackView.

codyrobb avatar Aug 06 '15 17:08 codyrobb

I just realized the title of this issue isn't the best description, but I'm not sure what to call it. Feel free to do something about that. :joy:

codyrobb avatar Aug 06 '15 18:08 codyrobb

Have you found a solution for the issue?

fabb avatar Oct 05 '15 06:10 fabb

sorry @fabb, not yet. I'm going to work on this as a first thing soon

delebedev avatar Oct 06 '15 08:10 delebedev

I ended up using TZStackView which works as expected. https://github.com/tomvanzummeren/TZStackView

fabb avatar Oct 06 '15 15:10 fabb