作者qwsxaz369 (1234567)
看板MacDev
标题[问题] 怎麽import github上的code ?
时间Sat Feb 14 22:54:33 2015
我在gihub上找到一个不错的 范例
https://github.com/Rannie/Toast-Swift
想要把code 拿进来用
我看了一下范例程式 看起来像是把
./Toast/HRToast+UIView.swift 加入专案就可以work了?!
http://i.imgur.com/u3bhvo6.png
我不知道
Create Group
Create folder references
两者差别在哪里
加进来之後
http://i.imgur.com/OFI5NyF.png
并且我在我的按钮的 action 加入了
http://i.imgur.com/VMZtOY2.png
运行之後只要点击按钮就会喷错
http://i.imgur.com/0X9wU2g.png
http://i.imgur.com/fLZo7v0.png
而且我不知道该怎麽解决这个错误 QQ
我试着用github 上的 CocoaPods 安装 但是发现不知道怎麽安装
我把专案 用 git clone 到桌面 进到桌面 输入 pod 'Toast-Swift'
结果回覆我的是
[!] Unknown command: `Toast-Swift` Did you mean: list
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.117.240.114
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/MacDev/M.1423925676.A.B6E.html
2F:→ darktt: 你看看跟你做的差了多少 02/15 08:34
3F:→ darktt: 另外加入档案的时後,我是有勾选"Copy items if needed" 02/15 08:36
4F:→ howdiun: 你应该把那一段加在Podfile里面,然後pod install 02/16 09:28
5F:推 fishead1116: 第二个error 你找看看code里面哪里有是nil 但是被强 02/17 16:35
6F:→ fishead1116: 强制读取的(!) 02/17 16:35