Skip to content

teamlapse/UISheetPresentationControllerCustomDetent

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UISheetPresentationControllerCustomDetent

Adds support for specifying custom detents in UISheetPresentationController. Note: This solution relies on a private API, which may break in future iOS releases.

import UISheetPresentationControllerCustomDetent

let viewController = UIViewController()
if let sheetPresentationController = viewController.sheetPresentationController {
    sheetPresentationController.detents = [ .custom(70.0), .custom(200.0), .medium(), .large() ]
    sheetPresentationController.selectedDetentIdentifier = .custom(200.0)
}
present(viewController, animated: true, completion: nil)

License

UISheetPresentationControllerCustomDetent is licensed under the MIT License. See the LICENSE file for more info.

About

Custom detents in UISheetPresentationController

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 63.6%
  • Swift 36.4%