We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want it to disappear from the left, not from the bottom
class BasePresentationController: UIViewController {
static func presentFromLeftToRight<T: BasePresentationController>(on hostViewController: UIViewController, returnType: T.Type) -> T? { let nibName = self.className.replacingOccurrences(of: "ViewController", with: "").replacingOccurrences(of: "Controller", with: "") if let presentedVC = UIStoryboard(name: nibName, bundle: nil).instantiateInitialViewController() as? BaseNavigationController { guard let vc = presentedVC.viewControllers.first as? T else { return nil } let uiConfiguration = PresentationUIConfiguration(backgroundStyle: .dimmed(alpha: 0.7), isTapBackgroundToDismissEnabled: true) let alignment = PresentationAlignment(vertical: .center, horizontal: .left) let size = PresentationSize(width: .custom(value: 243), height: .fullscreen) let presentation = CoverPresentation(directionShow: .left, directionDismiss: .left, uiConfiguration: uiConfiguration, size: size, alignment: alignment) let animator = Animator(presentation: presentation) animator.prepare(presentedViewController: presentedVC) hostViewController.present(presentedVC, animated: true, completion: nil) return vc } else { guard let presentedVC = UIStoryboard(name: nibName, bundle: nil).instantiateInitialViewController() as? T else { return nil } let uiConfiguration = PresentationUIConfiguration(backgroundStyle: .dimmed(alpha: 0.7), isTapBackgroundToDismissEnabled: true) let alignment = PresentationAlignment(vertical: .center, horizontal: .left) let size = PresentationSize(width: .custom(value: 243), height: .fullscreen) let presentation = CoverPresentation(directionShow: .left, directionDismiss: .left, uiConfiguration: uiConfiguration, size: size, alignment: alignment) let animator = Animator(presentation: presentation) animator.prepare(presentedViewController: presentedVC) hostViewController.present(presentedVC, animated: true, completion: nil) return presentedVC } }
}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want it to disappear from the left, not from the bottom
class BasePresentationController: UIViewController {
}
The text was updated successfully, but these errors were encountered: