Skip to content

Commit

Permalink
New method for separator hiding (microsoft#2068)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-cap authored Jul 17, 2024
1 parent 7d00d6a commit 30b8885
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 @@ -1444,9 +1444,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 30b8885

Please sign in to comment.