Beeframework 是一款iOS快速开发框架,它以UISignal强大的路由功能替代原有Delegate方式,完成复杂且高效的的UI信号路由。具体见[url]http://baike.baidu.com/view/4634432.htm?subLemmaId=4634432&fromenter=BeeFramework[/url]
本文以arc的方式添加Beeframework,使用[url=http://cocoapods.org]cocoapods[/url]工具。
1.安装cocoapods
sudo gem install cocoapods
安装完成后提示:
[img]https://img-my.csdn.net/uploads/201211/19/1353295957_1837.png[/img]
2.新建arc工程
[img]http://dl2.iteye.com/upload/attachment/0085/3381/19d6d33d-404c-3289-82a7-39a1aeb80fd2.jpg[/img]
关闭工程
3. 添加Podfile
在工程根目录下添加Podfile文件,内容为
4. 运行pod install
[img]http://dl2.iteye.com/upload/attachment/0085/3387/45ea3691-dc2f-3503-b7b2-2332c87ba852.jpg[/img]
5.打开BeeFrameWorkTest.xcworkspace
[img]http://dl2.iteye.com/upload/attachment/0085/3390/2bde15ba-a037-3dc4-a68f-1c4ea4b1fa35.jpg[/img]
OK,我们已经建好了一个为该项目添加好了Beeframework,现在来测试下吧。
直接运行
[img]http://dl2.iteye.com/upload/attachment/0085/3394/b7497392-c819-3e83-8c3c-38612c5cbe71.jpg[/img]
:-( ,发现一个错误。
如果你没有这个错误恭喜你可以跳过这一步了,打开工程设置
[img]http://dl2.iteye.com/upload/attachment/0085/3398/3de68f3c-ee99-34b3-86a8-b7f7416edccb.jpg[/img]
添加"$(SRCROOT)/Pods/build/Debug-iphonesimulator"至Library Search path
重新运行,又报了两个错!:-<<
[img]http://dl2.iteye.com/upload/attachment/0085/3400/b3ec52f7-9fb6-3c2d-9c05-1c0e2e3e1b79.png[/img]
打开Pods工程下的BeeFramework里的Bee_Precompile.h,设置__BEE_UNITTEST__ 为0,
重新运行,OK,这世界清静了!
[img]http://dl2.iteye.com/upload/attachment/0085/3412/eec60854-5336-3121-ae6a-c1d3c1557652.jpg[/img]
下面测试下BeeFramework是否安装成功,打开ViewController.xib添加一个按钮,设置父类为BeeUIButton
[img]http://dl2.iteye.com/upload/attachment/0085/3392/c156880f-6d41-3836-addf-a75c56bdb0ad.jpg[/img]
运行后,界面如下:
[img]http://dl2.iteye.com/upload/attachment/0085/3405/447ee1c9-7dc7-37ef-90b1-43d9e7bf9d34.jpg[/img]
OK,点击Button,查看控制台,BeeFramework 工作了!!
[img]http://dl2.iteye.com/upload/attachment/0085/3407/92ea6743-17a6-3630-8f69-5b343a0320e1.jpg[/img]
本文代码下载[url]https://github.com/ilikeido/BeeFrameworkTest/tree/master/lesson1[/url]
本文以arc的方式添加Beeframework,使用[url=http://cocoapods.org]cocoapods[/url]工具。
1.安装cocoapods
sudo gem install cocoapods
安装完成后提示:
[img]https://img-my.csdn.net/uploads/201211/19/1353295957_1837.png[/img]
2.新建arc工程
[img]http://dl2.iteye.com/upload/attachment/0085/3381/19d6d33d-404c-3289-82a7-39a1aeb80fd2.jpg[/img]
关闭工程
3. 添加Podfile
在工程根目录下添加Podfile文件,内容为
platform :ios,'5.0'
pod 'BeeFramework', :head
4. 运行pod install
[img]http://dl2.iteye.com/upload/attachment/0085/3387/45ea3691-dc2f-3503-b7b2-2332c87ba852.jpg[/img]
5.打开BeeFrameWorkTest.xcworkspace
[img]http://dl2.iteye.com/upload/attachment/0085/3390/2bde15ba-a037-3dc4-a68f-1c4ea4b1fa35.jpg[/img]
OK,我们已经建好了一个为该项目添加好了Beeframework,现在来测试下吧。
直接运行
[img]http://dl2.iteye.com/upload/attachment/0085/3394/b7497392-c819-3e83-8c3c-38612c5cbe71.jpg[/img]
:-( ,发现一个错误。
ld: library not found for -lPods
如果你没有这个错误恭喜你可以跳过这一步了,打开工程设置
[img]http://dl2.iteye.com/upload/attachment/0085/3398/3de68f3c-ee99-34b3-86a8-b7f7416edccb.jpg[/img]
添加"$(SRCROOT)/Pods/build/Debug-iphonesimulator"至Library Search path
重新运行,又报了两个错!:-<<
[img]http://dl2.iteye.com/upload/attachment/0085/3400/b3ec52f7-9fb6-3c2d-9c05-1c0e2e3e1b79.png[/img]
打开Pods工程下的BeeFramework里的Bee_Precompile.h,设置__BEE_UNITTEST__ 为0,
重新运行,OK,这世界清静了!
[img]http://dl2.iteye.com/upload/attachment/0085/3412/eec60854-5336-3121-ae6a-c1d3c1557652.jpg[/img]
下面测试下BeeFramework是否安装成功,打开ViewController.xib添加一个按钮,设置父类为BeeUIButton
[img]http://dl2.iteye.com/upload/attachment/0085/3392/c156880f-6d41-3836-addf-a75c56bdb0ad.jpg[/img]
运行后,界面如下:
[img]http://dl2.iteye.com/upload/attachment/0085/3405/447ee1c9-7dc7-37ef-90b1-43d9e7bf9d34.jpg[/img]
OK,点击Button,查看控制台,BeeFramework 工作了!!
[img]http://dl2.iteye.com/upload/attachment/0085/3407/92ea6743-17a6-3630-8f69-5b343a0320e1.jpg[/img]
本文代码下载[url]https://github.com/ilikeido/BeeFrameworkTest/tree/master/lesson1[/url]