摘要: import UIKit /// 定义一个结构体类型的错误类型 struct MyBundleError: Error { var errCode: Int = 0 /// 实现Error协议的localizedDescription只读实例属性 var localizedDescription: 阅读全文
posted @ 2021-07-21 19:40 sundayswift 阅读(141) 评论(0) 推荐(0) 编辑
摘要: git切换分支 首先通过 $ git branch -a 来查看所在目录的分支 $ git branch -a master * trunk remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/zhang 阅读全文
posted @ 2021-04-28 10:50 sundayswift 阅读(206) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/924c3047009e 为什么需要Throttle和Debounce Throttle和Debounce在前端开发可能比较经常用到,做iOS开发可能很多人不知道这个这个概念,其实很开发者在工作中或多或少都遇到过,就像设计模式有很多种,开发中用到了 阅读全文
posted @ 2021-03-15 02:08 sundayswift 阅读(1773) 评论(0) 推荐(0) 编辑
摘要: Git合并指定文件到另一个分支 经常被问到如何从一个分支合并特定的文件到另一个分支。其实,只合并你需要的那些commits,不需要的commits就不合并进去了。 合并某个分支上的单个commit 首先,用git log或sourcetree工具查看一下你想选择哪些commits进行合并,例如: 比 阅读全文
posted @ 2020-12-16 20:36 sundayswift 阅读(235) 评论(0) 推荐(0) 编辑
摘要: lz目前在整远程仓库。使用的https提交,在Git Bash 中经过一系列命令 报错remote: Invalid username or password fatal: Authentication failed for 'https://github.com/ ... 百度了解决方案,说是重新 阅读全文
posted @ 2020-11-29 20:41 sundayswift 阅读(575) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/weixin_42433480/article/details/96651379?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2~all~first_rank_v2~rank_ 阅读全文
posted @ 2020-11-22 00:46 sundayswift 阅读(397) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/a6bcdebd83f5 前提 在swift 开发过程中,尤其是第三方库中,我们多次看到首字母大写的Self,很多时候不明白其中意思,Self 与self 又有何区别呢? 今天在这里简单解释一下: self self 大家都熟悉,在UIViewCo 阅读全文
posted @ 2020-10-23 18:29 sundayswift 阅读(640) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/a907f0c09a60 Swift泛型介绍 泛型是为Swift编程灵活性的一种语法,在函数、枚举、结构体、类中都得到充分的应用,它的引入可以起到占位符的作用,当类型暂时不确定的,只有等到调用函数时才能确定具体类型的时候可以引入泛型。我们之前实际上 阅读全文
posted @ 2020-10-22 11:39 sundayswift 阅读(919) 评论(0) 推荐(0) 编辑
摘要: 检查pod版本及更新pod 检查pod版本 pod --version 更新pod sudo gem install -n /usr/local/bin sass sudo gem install -n /usr/local/bin cocoapods 如果还是出现框架版本不是最新版本,更新Pod缓 阅读全文
posted @ 2020-09-20 02:41 sundayswift 阅读(18820) 评论(0) 推荐(1) 编辑
摘要: git ping github.com 解决githubcom访问慢 https://blog.csdn.net/yh0503/article/details/90233216 GitHub.com域名查询 https://site.ip138.com/github.com/ 访问网址http:// 阅读全文
posted @ 2020-09-13 11:16 sundayswift 阅读(232) 评论(0) 推荐(0) 编辑