Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[IOS][Layout] [When put submit button on the right column of the card, it could be cut off] #4058

Description

@FelixZhang001

Platform

  • iOS

Author or host

Host - Teams IOS

Version of SDK

Both SDK 1.2.7 and the latest master

Details

Our demand is to put the "submit" button on the right of the card and cover a fixed-width space. Then the text would cover other spaces on the left. So we update our payload like the attachment.
feedback_payload.txt

It could work fine on the Android side, but for IOS, we can find that the second join button is truncated as the text has more content. We have marked the text with "maxLines": 2, not sure why it still shrink the button space.
Screen Shot 2020-05-27 at 4 52 39 PM

Our expected result is as below. I can trigger this by hardcoded the column width as 59px. But we don't want server-side know the client render logic and pass through the hardcoded value. Is there any way we can implement the demands without hard coded value?
Screen Shot 2020-05-27 at 4 55 24 PM

Besides, I also notice that when there is enough space, the auto layout for the right column's width would respect the button's instrinsicContentSize. Add width constraint for the button would only increase button width, column width won't increase accordingly and cut off the button.

For example, we initialize to ACRButton with instrinsicContentSize = 59.0. And set the constraint as below. The result is that button's width is increased to 72.0, but cut off by column width. Is there any way we can increase them both?
[button.widthAnchor constraintEqualToConstant:72.0].active = YES;
Screen Shot 2020-05-27 at 5 50 16 PM

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions