我新人刚学习swift,现在从leancloud中获取了一个列表,我点击某个内容后,怎么才能在跳转的页面里显示这个内容里的其他字段内容?
你可以在 override func prepare(for segue: UIStoryboardSegue, sender: Any?) { // Get the new view controller using segue.destinationViewController. // Pass the selected object to the new view controller. }这里面设置一下,然后就能把值传给 new view controller。
这你都知道?!iOS程序员?
严格来讲,只是swift
具体该怎么设置呢,这个地方不是太会写
简单的可以利用delegate
我用segue的方法,Xcode会提示cannot assign value of type,这种
其实你的问题很容易解决,无非就是不同UI转场过程中传值的问题
谢谢你,为我这个菜鸟解答了半天,我在看看基础知识吧
其实挺简单的,你搜一下segue+传值,很多这方面的解答
谢谢了,我找了些资料,我把数据写在本地可以,用leancloud还是不行,明天我贴个代码,您能帮我看下吗
你好,关于leancloud搜索这个您了解吗?我看他这个应用内搜索都是oc语法,swift的不知道改怎么写
你可以在swift里面调用oc的方法