首页 > 技术文章 > ViewController之间的转场和数据传递

xilifeng 2016-03-05 01:24 原文


ViewController之间的转场和数据传递

可以正向传递值,

反向传递值.


注意反向传值的时候,方法的位置:

https://github.com/urmyfaith/GRDBUsage/blob/master/GRDBUsage/ViewControllers/MainTableViewController.swift#L66-L86

 

使用StoryBoard+segue完成,以前一直是使用纯代码来完成.

 

在github上有个例子:https://github.com/urmyfaith/GRDBUsage


下面的文章来自:https://www.andrewcbancroft.com/2016/02/22/fade-views-inout-with-fadeable-a-swift-protocol-extension/


就不翻译了,看下图片就好。


在Youtube上看了几篇动手操纵的,视频不清晰,简直是误导人。

 

还是看apple官方的文档,讲的比较清楚:


xcdoc://?url=developer.apple.com/library/prerelease/ios/featuredarticles/ViewControllerPGforiPhoneOS/UsingSegues.html#//apple_ref/doc/uid/TP40007457-CH15-SW8


http://developer.apple.com/library/prerelease/ios/featuredarticles/ViewControllerPGforiPhoneOS/UsingSegues.html#//apple_ref/doc/uid/TP40007457-CH15-SW8

推荐阅读