Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fatbobman committed Jan 8, 2021
1 parent bce6cac commit 4d6315e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,24 @@ ScrollView{
}
```

Get Cell Status
```swift
HStack{
Text("Cell Status:")
Text(status.rawValue)
.foregroundColor(.red)
//get the cell status from Environment
.transformEnvironment(\.cellStatus, transform: { cellStatus in
let temp = cellStatus
DispatchQueue.main.async {
self.status = temp
}
})
}
.frame(maxWidth:.infinity,alignment: .center)
.frame(height:100)
.swipeCell(cellPosition: .both, leftSlot: slot, rightSlot: slot)
```


* dismissSwipeCell 在editmode下支持选择
Expand Down
7 changes: 0 additions & 7 deletions Sources/SwipeCell/ViewExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@ extension Notification.Name {
public static let swipeCellReset = Notification.Name("com.swipeCell.reset")
}

extension View {
public func debug() -> Self {
print(Mirror(reflecting: self).subjectType)
return self
}
}

public struct CellStatusKey: EnvironmentKey {
public static var defaultValue: CellStatus = .showCell
}
Expand Down

0 comments on commit 4d6315e

Please sign in to comment.