概述
這篇文章,我將講述幾種轉場動畫的自定義方式,并且每種方式附上一個示例,畢竟代碼才是我們的語言,這樣比較容易上手。其中主要有以下三種自定義方法,供大家參考:
Push & Pop
Modal
Segue
前兩種大家都很熟悉,第三種是Stroyboard中的拖線,屬于UIStoryboardSegue類,通過繼承這個類來自定義轉場過程動畫。
Push & Pop
首先說一下Push & Pop這種轉場的自定義,操作步驟如下:
創建一個文件繼承自NSObject, 并遵守UIViewControllerAnimatedTransitioning協議。
實現該協議的兩個基本方法:
//指定轉場動畫持續的時長functransitionDuration(transitionContext: UIViewControllerContextTransitioning)->NSTimeInterval//轉場動畫的具體內容funcanimateTransition(transitionContext: UIViewControllerContextTransitioning)
遵守UINavigationControllerDelegate協議,并實現此方法:
funcnavigationController(navigationController: UINavigationController, animationControllerForOperation operation: UINavigationControllerOperation, fromViewController fromVC: UIViewController, toViewController toVC: UIViewController)->UIViewControllerAnimatedTransitioning?
在此方法中指定所用的UIViewControllerAnimatedTransitioning,即返回第1步中創建的類。
注意:由于需要Push和Pop,所以需要兩套動畫方案。解決方法為:
在第1步中,創建兩個文件,一個用于Push動畫,一個用于Pop動畫,然后第3步中在返回動畫類之前,先判斷動畫方式(Push 或 Pop), 使用operation == UINavigationControllerOperation.Push即可判斷,最后根據不同的方式返回不同的類。
到這里就可以看到轉場動畫的效果了,但是大家都知道,系統默認的Push 和 Pop動畫都支持手勢驅動,并且可以根據手勢移動距離改變動畫完成度。幸運的是,Cocoa 已經集成了相關方法,我們只用告訴它百分比就可以了。所以下一步就是手勢驅動。
在第二個UIViewController中給View添加一個滑動(Pan)手勢。
創建一個UIPercentDrivenInteractiveTransition屬性。
在手勢的監聽方法中計算手勢移動的百分比,并使用UIPercentDrivenInteractiveTransition屬性的updateInteractiveTransition()方法實時更新百分比。
最后在手勢的state為ended或cancelled時,根據手勢完成度決定是還原動畫還是結束動畫,使用UIPercentDrivenInteractiveTransition屬性的cancelInteractiveTransition()或finishInteractiveTransition()方法。
實現UINavigationControllerDelegate中的另一個返回UIViewControllerInteractiveTransitioning的方法,并在其中返回第4步創建的UIPercentDrivenInteractiveTransition屬性。
至此,Push 和 Pop 方式的自定義就完成了,具體細節看下面的示例。
自定義 Push & Pop 示例
此示例來自Kitten Yang的blog實現Keynote中的神奇移動效果,我將其用Swift實現了一遍,源代碼地址:MagicMove,下面是運行效果。
MagicMove.gif
初始化
創建兩個ViewController,一個繼承自UICollectionViewController,取名ViewController。另一個繼承UIViewController,取名DetailViewController。在Stroyboard中創建并綁定。
在Stroyboard中拖一個UINavigationController,刪去默認的 rootViewController,使ViewController作為其 rootViewController,再拖一條從ViewController到DetailViewController的 segue。
在ViewController中自定義UICollectionViewCell,添加UIImageView和UILabel。
在DetailViewController中添加UIImageView和UITextView
mm_inital.png
添加UIViewControllerAnimatedTransitioning
添加一個Cocoa Touch Class,繼承自NSObject,取名MagicMoveTransion,遵守UIViewControllerAnimatedTransitioning協議。
實現協議的兩個方法,并在其中編寫Push的動畫。具體的動畫實現過程都在代碼的注釋里 :
functransitionDuration(transitionContext: UIViewControllerContextTransitioning)->NSTimeInterval{return0.5}funcanimateTransition(transitionContext: UIViewControllerContextTransitioning){//1.獲取動畫的源控制器和目標控制器letfromVC = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey)as!ViewControllerlettoVC = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)as!DetailViewControllerletcontainer = transitionContext.containerView()//2.創建一個 Cell 中 imageView 的截圖,并把 imageView 隱藏,造成使用戶以為移動的就是 imageView 的假象letsnapshotView = fromVC.selectedCell.imageView.snapshotViewAfterScreenUpdates(false)? ? snapshotView.frame = container.convertRect(fromVC.selectedCell.imageView.frame, fromView: fromVC.selectedCell)? ? fromVC.selectedCell.imageView.hidden =true//3.設置目標控制器的位置,并把透明度設為0,在后面的動畫中慢慢顯示出來變為1toVC.view.frame = transitionContext.finalFrameForViewController(toVC)? ? toVC.view.alpha =0//4.都添加到 container 中。注意順序不能錯了container.addSubview(toVC.view)? ? container.addSubview(snapshotView)//5.執行動畫UIView.animateWithDuration(transitionDuration(transitionContext), delay:0, options:UIViewAnimationOptions.CurveEaseInOut, animations: { () ->VoidinsnapshotView.frame = toVC.avatarImageView.frame? ? ? ? ? ? toVC.view.alpha =1}) { (finish:Bool) ->VoidinfromVC.selectedCell.imageView.hidden =falsetoVC.avatarImageView.image = toVC.image? ? ? ? ? ? snapshotView.removeFromSuperview()//一定要記得動畫完成后執行此方法,讓系統管理 navigationtransitionContext.completeTransition(true)? ? }}
使用動畫
讓ViewController遵守UINavigationControllerDelegate協議。
在ViewController中設置NavigationController的代理為自己:
overridefuncviewDidAppear(animated: Bool){super.viewDidAppear(animated)self.navigationController?.delegate =self}
實現UINavigationControllerDelegate協議方法:
funcnavigationController(navigationController: UINavigationController, animationControllerForOperation operation: UINavigationControllerOperation, fromViewController fromVC: UIViewController, toViewController toVC: UIViewController)->UIViewControllerAnimatedTransitioning? {ifoperation ==UINavigationControllerOperation.Push{returnMagicMoveTransion()? ? }else{returnnil}}
在ViewController的controllerCell的點擊方法中,發送segue
overridefunccollectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath){self.selectedCell = collectionView.cellForItemAtIndexPath(indexPath)as!MMCollectionViewCellself.performSegueWithIdentifier("detail", sender:nil)}
在發送segue的時候,把點擊的image發送給DetailViewController
overridefuncprepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?){ifsegue.identifier =="detail"{letdetailVC = segue.destinationViewControlleras!DetailViewControllerdetailVC.image =self.selectedCell.imageView.image? ? }}
至此,在點擊 Cell 后,就會執行剛剛自定義的動畫了。接下來就要加入手勢驅動。
手勢驅動
在DetailViewController的ViewDidAppear()方法中,加入滑動手勢。
letedgePan =UIScreenEdgePanGestureRecognizer(target:self, action:Selector("edgePanGesture:"))? ? edgePan.edges =UIRectEdge.Leftself.view.addGestureRecognizer(edgePan)
在手勢監聽方法中,創建UIPercentDrivenInteractiveTransition屬性,并實現手勢百分比更新。
funcedgePanGesture(edgePan: UIScreenEdgePanGestureRecognizer){letprogress = edgePan.translationInView(self.view).x /self.view.bounds.widthifedgePan.state ==UIGestureRecognizerState.Began{self.percentDrivenTransition =UIPercentDrivenInteractiveTransition()self.navigationController?.popViewControllerAnimated(true)? ? }elseifedgePan.state ==UIGestureRecognizerState.Changed{self.percentDrivenTransition?.updateInteractiveTransition(progress)? ? }elseifedgePan.state ==UIGestureRecognizerState.Cancelled|| edgePan.state ==UIGestureRecognizerState.Ended{ifprogress >0.5{self.percentDrivenTransition?.finishInteractiveTransition()? ? ? ? }else{self.percentDrivenTransition?.cancelInteractiveTransition()? ? ? ? }self.percentDrivenTransition =nil}}
實現返回UIViewControllerInteractiveTransitioning的方法并返回剛剛創建的UIPercentDrivenInteractiveTransition屬性。
funcnavigationController(navigationController: UINavigationController, interactionControllerForAnimationController animationController: UIViewControllerAnimatedTransitioning)->UIViewControllerInteractiveTransitioning? {ifanimationControllerisMagicMovePopTransion{returnself.percentDrivenTransition? ? }else{returnnil}}
OK,到現在,手勢驅動就寫好了,但是還不能使用,因為還沒有實現 Pop 方法!現在自己去實現 Pop 動畫吧!請參考源代碼:MagicMove
Modal
modal轉場方式即使用presentViewController()方法推出的方式,默認情況下,第二個視圖從屏幕下方彈出。下面就來介紹下 modal 方式轉場動畫的自定義。
創建一個文件繼承自NSObject, 并遵守UIViewControllerAnimatedTransitioning協議。
實現該協議的兩個基本方法:
//指定轉場動畫持續的時長functransitionDuration(transitionContext: UIViewControllerContextTransitioning)->NSTimeInterval//轉場動畫的具體內容funcanimateTransition(transitionContext: UIViewControllerContextTransitioning)
以上兩個步驟和Push & Pop的自定義一樣,接下來就是不同的。
如果使用Modal方式從一個 VC 到另一個 VC,那么需要第一個 VC 遵循UIViewControllerTransitioningDelegate協議,并實現以下兩個協議方法:
//present動畫optionalfuncanimationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController)->UIViewControllerAnimatedTransitioning?//dismiss動畫optionalfuncanimationControllerForDismissedController(dismissed: UIViewController)->UIViewControllerAnimatedTransitioning?
在第一個 VC 的prepareForSegue()方法中,指定第二個 VC 的transitioningDelegate為 self。
由第3步中兩個方法就可以知道,在創建轉場動畫時,最好也創建兩個動畫類,一個用于Present, 一個用于Dismiss,如果只創建一個動畫類,就需要在實現動畫的時候判斷是Present還是Dismiss。
這時,轉場動畫就可以實現了,接下來就手勢驅動了
在第一個 VC 中創建一個UIPercentDrivenInteractiveTransition屬性,并且在prepareForSegue()方法中為第二個 VC.view 添加一個手勢,用以 dismiss. 在手勢的監聽方法中處理方式和Push & Pop相同。
實現UIViewControllerTransitioningDelegate協議的另外兩個方法,分別返回Present和Dismiss動畫的百分比。
//百分比PushfuncinteractionControllerForPresentation(animator: UIViewControllerAnimatedTransitioning)->UIViewControllerInteractiveTransitioning? {returnself.percentDrivenTransition }//百分比PopfuncinteractionControllerForDismissal(animator: UIViewControllerAnimatedTransitioning)->UIViewControllerInteractiveTransitioning? {returnself.percentDrivenTransition }
至此,Modal方式的自定義轉場動畫就寫完了。自己在編碼的時候有一些小細節需要注意,下面將展示使用Modal方式的自定義動畫的示例。
自定義 Modal 示例
此示例和上面一個示例一樣,來自Kitten Yang的blog實現3D翻轉效果,我也將其用Swift實現了一遍,同樣我的源代碼地址:FlipTransion,運行效果如下:
FlipTransion.gif
初始化
創建兩個UIViewController, 分別命名為:FirstViewController和SecondViewController。并在Storyboard中添加兩個UIViewController并綁定。
分別給兩個視圖添加兩個UIImageView,這樣做的目的是為了區分兩個控制器。當然你也可以給兩個控制器設置不同的背景,總之你開心就好。但是,既然做,就做認真點唄。注意:如果使用圖片并設置為Aspect Fill或者其他的 Fill,一定記得調用imageView的clipsToBounds()方法裁剪去多余的部分。
分別給兩個控制器添加兩個按鈕,第一個按鈕拖線到第二個控制器,第二個控制器綁定一個方法用來dismiss。
ft_inital.png
添加UIViewControllerAnimatedTransitioning
添加一個Cocoa Touch Class,繼承自NSObject,取名BWFlipTransionPush(名字嘛,你開心就好。),遵守UIViewControllerAnimatedTransitioning協議。
實現協議的兩個方法,并在其中編寫Push的動畫。具體的動畫實現過程都在代碼的注釋里 :
funcanimateTransition(transitionContext: UIViewControllerContextTransitioning){letfromVC = transitionContext.viewControllerForKey(UITransitionContextFromViewControllerKey)as!FirstViewControllerlettoVC = transitionContext.viewControllerForKey(UITransitionContextToViewControllerKey)as!SecondViewControllerletcontainer = transitionContext.containerView()? ? container.addSubview(toVC.view)? ? container.bringSubviewToFront(fromVC.view)//改變m34vartransfrom =CATransform3DIdentitytransfrom.m34 = -0.002container.layer.sublayerTransform = transfrom//設置anrchPoint 和 positionletinitalFrame = transitionContext.initialFrameForViewController(fromVC)? ? toVC.view.frame = initalFrame? ? fromVC.view.frame = initalFrame? ? fromVC.view.layer.anchorPoint =CGPointMake(0,0.5)? ? fromVC.view.layer.position =CGPointMake(0, initalFrame.height /2.0)//添加陰影效果letshadowLayer =CAGradientLayer()? ? shadowLayer.colors = [UIColor(white:0, alpha:1).CGColor,UIColor(white:0, alpha:0.5).CGColor,UIColor(white:1, alpha:0.5)]? ? shadowLayer.startPoint =CGPointMake(0,0.5)? ? shadowLayer.endPoint =CGPointMake(1,0.5)? ? shadowLayer.frame = initalFrameletshadow =UIView(frame: initalFrame)? ? shadow.backgroundColor =UIColor.clearColor()? ? shadow.layer.addSublayer(shadowLayer)? ? fromVC.view.addSubview(shadow)? ? shadow.alpha =0//動畫UIView.animateWithDuration(transitionDuration(transitionContext), delay:0, options:UIViewAnimationOptions.CurveEaseOut, animations: { () ->VoidinfromVC.view.layer.transform =CATransform3DMakeRotation(CGFloat(-M_PI_2),0,1,0)? ? ? ? ? ? shadow.alpha =1.0}) { (finished:Bool) ->VoidinfromVC.view.layer.anchorPoint =CGPointMake(0.5,0.5)? ? ? ? ? ? fromVC.view.layer.position =CGPointMake(CGRectGetMidX(initalFrame),CGRectGetMidY(initalFrame))? ? ? ? ? ? fromVC.view.layer.transform =CATransform3DIdentityshadow.removeFromSuperview()? ? ? ? ? ? transitionContext.completeTransition(!transitionContext.transitionWasCancelled())? ? }}
動畫的過程我就不多說了,仔細看就會明白。
使用動畫
讓FirstViewController遵守UIViewControllerTransitioningDelegate協議,并將self.transitioningDelegate設置為 self。
實現UIViewControllerTransitioningDelegate協議的兩個方法,用來指定動畫類。
//動畫PushfuncanimationControllerForPresentedController(presented: UIViewController, presentingController presenting: UIViewController, sourceController source: UIViewController)->UIViewControllerAnimatedTransitioning? {returnBWFlipTransionPush()}//動畫PopfuncanimationControllerForDismissedController(dismissed: UIViewController)->UIViewControllerAnimatedTransitioning? {returnBWFlipTransionPop()}
OK,如果你完成了Pop動畫,那么現在就可以實現自定義 Modal 轉場了?,F在只差手勢驅動了。
手勢驅動
想要同時實現Push和Pop手勢,就需要給兩個viewController.view添加手勢。首先在FirstViewController中給自己添加一個屏幕右邊的手勢,在prepareForSegue()方法中給SecondViewController.view添加一個屏幕左邊的手勢,讓它們使用同一個手勢監聽方法。
實現監聽方法,不多說,和之前一樣,但還是有仔細看,因為本示例中轉場動畫比較特殊,而且有兩個手勢,所以這里計算百分比使用的是KeyWindow。同時不要忘了:UIPercentDrivenInteractiveTransition屬性。
funcedgePanGesture(edgePan: UIScreenEdgePanGestureRecognizer){letprogress =abs(edgePan.translationInView(UIApplication.sharedApplication().keyWindow!).x) /UIApplication.sharedApplication().keyWindow!.bounds.widthifedgePan.state ==UIGestureRecognizerState.Began{self.percentDrivenTransition =UIPercentDrivenInteractiveTransition()ifedgePan.edges ==UIRectEdge.Right{self.performSegueWithIdentifier("present", sender:nil)? ? ? ? }elseifedgePan.edges ==UIRectEdge.Left{self.dismissViewControllerAnimated(true, completion:nil)? ? ? ? }? ? }elseifedgePan.state ==UIGestureRecognizerState.Changed{self.percentDrivenTransition?.updateInteractiveTransition(progress)? ? }elseifedgePan.state ==UIGestureRecognizerState.Cancelled|| edgePan.state ==UIGestureRecognizerState.Ended{ifprogress >0.5{self.percentDrivenTransition?.finishInteractiveTransition()? ? ? ? }else{self.percentDrivenTransition?.cancelInteractiveTransition()? ? ? ? }self.percentDrivenTransition =nil}}
實現UIViewControllerTransitioningDelegate協議的另外兩個方法,分別返回Present和Dismiss動畫的百分比。
//百分比PushfuncinteractionControllerForPresentation(animator: UIViewControllerAnimatedTransitioning)->UIViewControllerInteractiveTransitioning? {returnself.percentDrivenTransition}//百分比PopfuncinteractionControllerForDismissal(animator: UIViewControllerAnimatedTransitioning)->UIViewControllerInteractiveTransitioning? {returnself.percentDrivenTransition}
現在,基于Modal的自定義轉場動畫示例就完成了。獲取完整源代碼:FlipTransion
Segue
這種方法比較特殊,是將Stroyboard中的拖線與自定義的UIStoryboardSegue類綁定自實現定義轉場過程動畫。
首先我們來看看UIStoryboardSegue是什么樣的。
@availability(iOS, introduced=5.0)classUIStoryboardSegue:NSObject{// Convenience constructor for returning a segue that performs a handler block in its -perform method.@availability(iOS, introduced=6.0)? ? convenienceinit(identifier:String?, source:UIViewController, destination:UIViewController, performHandler: () ->Void)init!(identifier:String?, source:UIViewController, destination:UIViewController)// Designated initializervaridentifier:String? {get}varsourceViewController:AnyObject{get}vardestinationViewController:AnyObject{get}funcperform()}
以上是UIStoryboardSegue類的定義。從中可以看出,只有一個方法perform(),所以很明顯,就是重寫這個方法來自定義轉場動畫。
再注意它的其他屬性:sourceViewController和destinationViewController,通過這兩個屬性,我們就可以訪問一個轉場動畫中的兩個主角了,于是自定義動畫就可以隨心所欲了。
只有一點需要注意:在拖線的時候,注意在彈出的選項中選擇custom。然后就可以和自定義的UIStoryboardSegue綁定了。
那么,問題來了,這里只有perform,那 返回時的動畫怎么辦呢?請往下看:
Dismiss
由于perfrom的方法叫做:segue,那么返回轉場的上一個控制器叫做:unwind segue
解除轉場(unwind segue)通常和正常自定義轉場(segue)一起出現。
要解除轉場起作用,我們必須重寫perform方法,并應用自定義動畫。另外,導航返回源視圖控制器的過渡效果不需要和對應的正常轉場相同。
其實現步驟為:
創建一個IBAction方法,該方法在解除轉場被執行的時候會選擇地執行一些代碼。這個方法可以有你想要的任何名字,而且不強制包含其它東西。它需要定義,但可以留空,解除轉場的定義需要依賴這個方法。
解除轉場的創建,設置的配置。這和之前的轉場創建不太一樣,等下我們將看看這個是怎么實現的。
通過重寫UIStoryboardSegue子類里的perform()方法,來實現自定義動畫。
UIViewController類提供了特定方法的定義,所以系統知道解除轉場即將執行。
當然,這么說有一些讓人琢磨不透,不知道什么意思。那么,下面再通過一個示例來深入了解一下。
Segue 示例
這個示例是我自己寫的,源代碼地址:SegueTransion,開門見山,直接上圖。
GIF演示
SegueTransion.gif
初始化
創建兩個UIViewController, 分別命名為:FirstViewController和SecondViewController。并在Storyboard中添加兩個UIViewController并綁定。
分別給兩個控制器添加背景圖片或使用不同的背景色,用以區分。在FirstViewController中添加一個觸發按鈕,并拖線到SecondViewController中,在彈出的選項中選擇custion。
st_inital.png
Present
添加一個Cocoa Touch Class,繼承自UIStoryboardSegue,取名FirstSegue(名字請隨意)。并將其綁定到上一步中拖拽的segue上。
重寫FirstSegue中的perform()方法,在其中編寫動畫邏輯。
overridefuncperform(){varfirstVCView =self.sourceViewController.viewasUIView!varsecondVCView =self.destinationViewController.viewasUIView!letscreenWidth =UIScreen.mainScreen().bounds.size.widthletscreenHeight =UIScreen.mainScreen().bounds.size.height? ? ? secondVCView.frame =CGRectMake(0.0, screenHeight, screenWidth, screenHeight)letwindow =UIApplication.sharedApplication().keyWindow? ? ? window?.insertSubview(secondVCView, aboveSubview: firstVCView)UIView.animateWithDuration(0.5, delay:0, usingSpringWithDamping:0.5, initialSpringVelocity:0, options:UIViewAnimationOptions.CurveLinear, animations: { () ->VoidinsecondVCView.frame =CGRectOffset(secondVCView.frame,0.0, -screenHeight)? ? ? ? ? }) { (finished:Bool) ->Voidinself.sourceViewController.presentViewController(self.destinationViewControlleras!UIViewController,? ? ? ? ? ? ? ? ? animated:false,? ? ? ? ? ? ? ? ? completion:nil)? ? ? }? }
還是一樣,動畫的過程自己看,都是很簡單的。
Present手勢
這里需要注意,使用這種方式自定義的轉場動畫不能動態手勢驅動,也就是說不能根據手勢百分比動態改變動畫完成度。
所以,這里只是簡單的添加一個滑動手勢(swip)。
在FisrtViewController中添加手勢:
varswipeGestureRecognizer:UISwipeGestureRecognizer=UISwipeGestureRecognizer(target:self, action:"showSecondViewController")? swipeGestureRecognizer.direction =UISwipeGestureRecognizerDirection.Upself.view.addGestureRecognizer(swipeGestureRecognizer)
實現手勢監聽方法:
funcshowSecondViewController(){self.performSegueWithIdentifier("idFirstSegue", sender:self)}
現在已經可以present了,接下來實現dismiss。
Dismiss
在FirstViewController中添加一個IBAction方法,方法名可以隨便,有沒有返回值都隨便。
在Storyboard中選擇SecondViewController按住control鍵拖線到SecondViewController的Exit圖標。并在彈出選項中選擇上一步添加IBAction的方法。
st_unwind.png
在Storyboard左側的文檔視圖中找到上一步拖的segue,并設置identifier
st_unwindSegue.png
再添加一個Cocoa Touch Class,繼承自UIStoryboardSegue,取名FirstSegueUnWind(名字請隨意)。并重寫其perform()方法,用來實現dismiss動畫。
在FirstViewController中重寫下面方法。并根據identifier判斷是不是需要 dismiss,如果是就返回剛剛創建的FirstUnWindSegue。
overridefuncsegueForUnwindingToViewController(toViewController: UIViewController, fromViewController: UIViewController, identifier: String?)->UIStoryboardSegue{ifidentifier =="firstSegueUnwind"{returnFirstUnwindSegue(identifier: identifier, source: fromViewController, destination: toViewController, performHandler: { () ->Voidin})? ? }returnsuper.segueForUnwindingToViewController(toViewController, fromViewController: fromViewController, identifier: identifier)}
最后一步,在SecondViewController的按鈕的監聽方法中實現 dismiss,注意不是調用self.dismiss...!
@IBActionfuncshouldDismiss(sender: AnyObject){self.performSegueWithIdentifier("firstSegueUnwind", sender:self)? }
給SecondViewController添加手勢,將手勢監聽方法也設置為以上這個方法, 參考代碼:SegueTransion。
總結
一張圖總結一下3種方法的異同點。
總結.png
到這里,終于吧3中方法的自定義都寫完了,寫這篇 blog 花了我一天的時間!希望我自己和看過的同學都能記住!同時,有錯誤的地方歡迎提出。
文/伯恩的遺產(簡書作者)
原文鏈接:http://www.lxweimin.com/p/38cd35968864#
著作權歸作者所有,轉載請聯系作者獲得授權,并標注“簡書作者”。