Swift3.0 代理传值,属性传值
来源:互联网 发布:淘宝联盟的优惠券在哪 编辑:程序博客网 时间:2024/05/21 16:21
1.代理传值()MapViewController传值
protocol MapViewDelegate : NSObjectProtocol
{
func selectedAddress(mapViewController:MapViewController,address:String?)
}
weak var delegate:MapViewDelegate?
self.delegate?.selectedAddress(mapViewController:self,address: currentAddress)
2.接收值 AddOrderViewController
mapVC.delegate =self
extension AddOrderViewController:MapViewDelegate{
func selectedAddress(mapViewController:MapViewController, address:String?) {
guardlet path = addresselse { return }
if mapViewController.view.tag ==1 {
self.source = path
//nOrder.sourcePlace = path
let paths = [IndexPath(row:0, section:0)]
self.tableView.reloadRows(at: paths, with: .automatic)
}else{
self.destination = path
//nOrder.destinationPlace = path
let paths = [IndexPath(row:1, section:0)]
self.tableView.reloadRows(at: paths, with: .automatic)
}
}
}
- Swift3.0 代理传值,属性传值
- swift3.0 传值总结(属性、代理、闭包、通知)
- Swift3.0-反向传值
- swift3.0三种反向传值
- Swift3.0 代理
- 属性传值与代理传值
- 代理传值和属性传值
- swift3.0中的代理协议
- swift3.0反射的到struct中的属性值和属性名
- Swift3.0中代理的使用方法
- Swift3.0 中代理的使用方法
- 代理传值与属性传值简单描述
- iOS传值一属性传值,代理传值
- 代理 单例 属性 block 四大传值方式
- 传值方式(block, 属性,代理 ,单例)
- Swift3.0中文教程: 10.属性
- Swift3.0--运行时加载属性列表
- 二十五 Swift3.0之 属性
- python和java的区别(python内存管理)
- ssm框架利用timer类创建定时任务
- Activity 全屏,沉浸式模式这一篇就够了
- Difference Between FTP and TFTP
- 关于 mac 下轻松 反编译安卓apk
- Swift3.0 代理传值,属性传值
- OpenCV与matlab部分函数的对应关系
- 简述cookies和session的区别
- Android 系统字体大小影响UI显示问题
- C++判断ip是否为保留ip
- JFace中Dialog类的使用方法
- JAVA使用jsoup技术实现网站URL解析爬取|爬取网站登陆后页面动态数据
- expdp与impdp参数用法
- R语言 柱状图与折线图 趋势图 highcharter (hc_yAxis_multiples)图