最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

[未解决]swift中让视图ViewController从左向右滑入显示+从右向左消失

iOS crifan 3470浏览 0评论

目前默认是

从下向上

滑动出来新的页面的:

希望是:

从左到右

滑动出来界面

通过手势从右向左,可以让新页面消失

swift viewcontroller left to right slide

swift – iOS Segue – Left to Right – – Stack Overflow

ios – Swift – How to do a custom slide animation? – Stack Overflow

ios – Transition of view controllers – from left to right – Stack Overflow

Animated Transitions in Swift / iOS 8

UIViewControllerAnimatedTransitioning Protocol Reference

UIViewControllerTransitioningDelegate Protocol Reference

添加UIView.transitionFromView

        let filterVC = SingletonFilterCustomerVC()

//        filterVC.modalPresentationStyle = UIModalPresentationStyle.OverCurrentContext

        filterVC.modalPresentationStyle = UIModalPresentationStyle.Custom

        self.presentViewController(filterVC, animated: true, completion: nil)

        UIView.transitionFromView(self.view, toView: filterVC.view, duration: 2, options: UIViewAnimationOptions.TransitionFlipFromLeft, completion: nil)

效果是:

->是flip翻转形势的,不是从左向右滑动出现的

Slide In Animation in Swift – Andrew Bancroft

How To Make A View Controller Transition Animation Like in the Ping App

但是对于:

        self.presentViewController(filterVC, animated: true, completion: nil)

的话,后续的:

TransitionManager2中的animateTransition的

let fromView = transitionContext.viewForKey(UITransitionContextFromViewKey)!

会出错,找不到:

UITransitionContextFromViewKey

[已解决]swift中页面切换时找不到UITransitionContextFromViewKey

swift animation lib

MengTo/Spring: A library to simplify iOS animations in Swift.

icanzilb/EasyAnimation: A Swift library to take the power of UIView.animateWithDuration(_:, animations:…) to a whole new level – layers, springs, chain-able animations and mixing view and layer animations together!

vsouza/awesome-ios: A curated list of awesome iOS ecosystem, including Objective-C and Swift Projects

  • Pop – An extensible iOS and OS X animation library, useful for physics-based interactions.
  • AnimationEngine – Easily build advanced custom animations on iOS.
  • Awesome-iOS-Animation – Collection of Animation projects
  • RZTransitions – A library of custom iOS View Controller Animations and Interactions.
  • DCAnimationKit – A collection of animations for iOS. Simple, just add water animations.
  • Spring – A library to simplify iOS animations in Swift.
  • Canvas – Animate in Xcode without code http://canvaspod.io
  • Fluent – Swift animation made easy 🔶
  • Cheetah – Easy animation library on iOS with Swift2. 🔶
  • RadialLayer – Animation for clickable elements (similar to Youtube Music). 🔶
  • Pop By Example – A project tutorial in how to use Pop animation framework by example.
  • AppAnimations – Collection of iOS animations to inspire your next project
  • EasyAnimation – A Swift library to take the power of UIView.animateWithDuration() to a whole new level – layers, springs, chain-able animations, and mixing view/layer animations together. 🔶
  • Animo – SpriteKit-like animation builders for CALayers. 🔶
  • CurryFire – A framework for creating unique animations.
  • IBAnimatable – Design and prototype UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable. 🔶
  • CKWaveCollectionViewTransition – Cool wave like transition between two or more UICollectionView 🔶
  • DaisyChain – 🔗 Easy animation chaining 🔶
  • SYBlinkAnimationKit – A blink effect animation framework for iOS, written in Swift. 🔶
  • PulsingHalo – iOS Component for creating a pulsing animation.
  • DKChainableAnimationKit – ⭐ Chainable animations in Swift 🔶[e]
  • JDAnimationKit – Animate easy and with less code with Swift 🔶
  • Advance – A powerful animation framework for iOS. 🔶
  • UIView-Shake – UIView category that adds shake animation
  • Walker – A new animation engine for your app. 🔶
  • Morgan – An animation set for your app. 🔶
  • MagicMove – Keynote-style Magic Move transition animations 🔶
  • Shimmer – An easy way to add a simple, shimmering effect to any view in an iOS app.
  • SAConfettiView – Confetti! Who doesn’t like confetti? 🔶
  • CCMRadarView – CCMRadarView uses the IBDesignable tools to make an easy customizable radar view with animation 🔶
  • Pulsator – Pulse animation for iOS 🔶
  • Interpolate – Interpolation framework for creating interactive gesture-driven animations 🔶
  • ADPuzzleAnimation – Custom animation for UIView inspired by Fabric – Answers animation. 🔶
  • Wave – 🏄 Declarative chainable animations in Swift
  • Stellar – A fantastic Physical animation library for swift 🔶

"

swift viewcontroller transition animation

Creating Custom UIViewController Transitions

iOS Animation Tutorial: Custom View Controller Presentation Transitions

Introduction to Custom View Controller Transitions and Animations

转载请注明:在路上 » [未解决]swift中让视图ViewController从左向右滑入显示+从右向左消失

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.175 seconds, using 22.17MB memory