Skip to content

Commit

Permalink
New method for separator hiding (#2068) (#2073)
Browse files Browse the repository at this point in the history
(cherry picked from commit 30b8885)
(cherry picked from commit 60aea2b)

Co-authored-by: Lukas Capkovic <3610850+lcapkovic@users.noreply.github.com>
  • Loading branch information
sophialee0416 and lukas-cap authored Jul 18, 2024
1 parent 04f2322 commit cda11a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ios/FluentUI/Other Cells/ActionsCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ open class ActionsCell: UITableViewCell, TokenizedControlInternal {
// A hacky way to hide the system separator by squeezing it just enough to have zero width.
// This is the only known way to hide the separator without making the UITableView do it for us.
let boundsWidth = bounds.width
if separatorInset.left != boundsWidth || separatorInset.right != 0 {
separatorInset.left = boundsWidth
separatorInset.right = 0
let targetSystemSeparatorInset = UIEdgeInsets(top: 0, left: boundsWidth, bottom: 0, right: 0)
if separatorInset.left < boundsWidth {
separatorInset = targetSystemSeparatorInset
}

layoutHorizontalSeparator(topSeparator, with: topSeparatorType, at: 0)
Expand Down
6 changes: 3 additions & 3 deletions ios/FluentUI/Table View/TableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1517,9 +1517,9 @@ open class TableViewCell: UITableViewCell, TokenizedControlInternal {
// A hacky way to hide the system separator by squeezing it just enough to have zero width.
// This is the only known way to hide the separator without making the UITableView do it for us.
let boundsWidth = bounds.width
if separatorInset.left != boundsWidth || separatorInset.right != 0 {
separatorInset.left = boundsWidth
separatorInset.right = 0
let targetSystemSeparatorInset = UIEdgeInsets(top: 0, left: boundsWidth, bottom: 0, right: 0)
if separatorInset.left < boundsWidth {
separatorInset = targetSystemSeparatorInset
}

layoutSeparator(topSeparator, with: topSeparatorType, at: 0)
Expand Down

0 comments on commit cda11a8

Please sign in to comment.