tommy-holmes / DetentSheetPresentationController

A backport of Apple's `UISheetPresentationController` to iOS 13
0 stars 1 forks source link

Add custom `.height(_ height)` detent #5

Open tommy-holmes opened 2 years ago

tommy-holmes commented 2 years ago

Like in iOS 16.

tommy-holmes commented 2 years ago

Something like this:

public extension DetentSheetPresentationController {
    final class Detent: NSObject {
        public class func height(_ height: CGFloat) -> Self {
             return Self(.init(height.description))
    }
}