Name | Type | iOS | tvOS | watchOS | macOS |
---|---|---|---|---|---|
popViewController(completion: (()->Void)?) |
Method | 8+ | 9+ | - | - |
pushViewController(viewController: UIViewController, completion: (()->Void)?) |
Method | 8+ | 9+ | - | - |
makeTransparent(withTint: UIColor) |
Method | 8+ | 9+ | - | - |
Pop ViewController with completion handler.
- type: Method.
- parameters:
- completion: optional completion handler (default is nil).
- return type: Void
- availability:
iOS 8+
,tvOS 9+
. - unit tests:
iOS
,tvOS
.
Example
let navigationController = UINavigationController()
navigationController.popViewController()
navigationController.popViewController() {
print("Completion: The view controller has been popped")
}
Push ViewController with completion handler.
- type: Method.
- parameters:
- viewController: viewController to push.
- completion: optional completion handler (default is nil).
- return type: Void
- availability:
iOS 8+
,tvOS 9+
. - unit tests:
iOS
,tvOS
.
Example
let navigationController = UINavigationController()
let viewController = UIViewController()
navigationController.pushViewController(viewController)
navigationController.pushViewController(viewController) {
print("Completion: The view controller has been pushed")
}
Make navigation controller's navigation bar transparent.
- type: Method.
- parameters:
- withTint: tint color (default is .white).
- return type: Void
- availability:
iOS 8+
,tvOS 9+
. - unit tests:
iOS
,tvOS
.
Example
let navigationController = UINavigationController()
navigationController.makeTransparent()
navigationController.makeTransparent(withTint: .black)