Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c18e8b8faf | |||
| 1d03424ab4 | |||
| 66556da572 | |||
| 6ebcfa59e9 | |||
| f6a2c31e2f | |||
| be3eb3f3a7 |
BIN
Binary file not shown.
@@ -6,7 +6,7 @@ Very similar to the modal **controller displayed in Apple Music, Podcasts and Ma
|
||||
|
||||
<img src="https://github.com/IvanVorobei/SPStorkController/blob/master/Resources/Preview.gif" width="440">
|
||||
|
||||
If you want to **buy source code** of this apps, please, go to [xcode-shop.com](https://xcode-shop.com).
|
||||
Alert you can find in [SPAlert](https://github.com/IvanVorobei/SPAlert) project. If you want to **buy source code** of app in preview, please, go to [xcode-shop.com](https://xcode-shop.com).
|
||||
|
||||
## Navigate
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.4 MiB |
@@ -1,7 +1,7 @@
|
||||
Pod::Spec.new do |s|
|
||||
|
||||
s.name = "SPStorkController"
|
||||
s.version = "1.6.4"
|
||||
s.version = "1.6.5"
|
||||
s.summary = "Very similar to the controllers displayed in Apple Music, Podcasts and Mail Apple's applications."
|
||||
s.homepage = "https://github.com/IvanVorobei/SPStorkController"
|
||||
s.source = { :git => "https://github.com/IvanVorobei/SPStorkController.git", :tag => s.version }
|
||||
|
||||
@@ -70,6 +70,14 @@ class SPStorkPresentationController: UIPresentationController, UIGestureRecogniz
|
||||
|
||||
private var feedbackGenerator: UIImpactFeedbackGenerator = UIImpactFeedbackGenerator(style: .light)
|
||||
|
||||
override var presentedView: UIView? {
|
||||
let view = self.presentedViewController.view
|
||||
if view?.frame.origin == CGPoint.zero {
|
||||
view?.frame = self.frameOfPresentedViewInContainerView
|
||||
}
|
||||
return view
|
||||
}
|
||||
|
||||
override var frameOfPresentedViewInContainerView: CGRect {
|
||||
guard let containerView = containerView else { return .zero }
|
||||
let baseY: CGFloat = self.topSpace + 13
|
||||
@@ -429,10 +437,7 @@ extension SPStorkPresentationController {
|
||||
guard let containerView = containerView else { return }
|
||||
self.updateSnapshotAspectRatio()
|
||||
if presentedViewController.view.isDescendant(of: containerView) {
|
||||
UIView.animate(withDuration: 0.1) { [weak self] in
|
||||
guard let `self` = self else { return }
|
||||
self.presentedViewController.view.frame = self.frameOfPresentedViewInContainerView
|
||||
}
|
||||
self.presentedViewController.view.frame = self.frameOfPresentedViewInContainerView
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user