加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

项目开发笔记-2015.12.21-swift

发布时间:2020-12-14 01:32:15 所属栏目:百科 来源:网络整理
导读:1、页面跳转 在storyboard,在需要跳转的页面的之间右键连线 选择modal 点击连的线 在Identifler里键入标示 在代码中使用 self.performSegueWithIdentifier("ro",sender: self) 就可以完成跳转 关闭当前页面使用以下代码 self.dismissViewControllerAnimated

1、页面跳转

在storyboard,在需要跳转的页面的之间右键连线


选择modal

点击连的线

在Identifler里键入标示


在代码中使用

self.performSegueWithIdentifier("ro",sender: self)
就可以完成跳转

关闭当前页面使用以下代码

self.dismissViewControllerAnimated(true,completion: nil)

2、主线程中更新界面

昨天在写代码的时候,涉及到界面的都会报错,今天问了别人,给我提醒了以下,自己去百度找了点

dispatch_async(dispatch_get_main_queue(),{ () -> Void in
                         在这里写界面代码
                    })

3、UILabel设置文字
 self.name.text = commonmethod.readTemporayData("name");

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读