Xcode插件BetterXib.zip

时间:2022-08-08 01:47:47
【文件属性】:
文件名称:Xcode插件BetterXib.zip
文件大小:93KB
文件格式:ZIP
更新时间:2022-08-08 01:47:47
开源项目 BetterXib是一个Xcode插件,用于帮助开发者管理一个项目中重复使用的UI控件。 在使用xib的过程中你是否碰到过这样的情景:你选中一个Label,修改它的字体、颜色、大小,然后使用。过了一会儿,在另一个地方你又要使用刚才配置过的Label,于是。。过了两秒钟你想起了上次使用它的地方,接着你熟练的搜索,复制,粘贴。又过了一会儿,你又要使用它。 如何解决? 当第三次我又要使用那个Label的时候,我想:"嗯,是时候创建一个“类”来解决这个问题啦!" 我的做法是:建一个以项目命名的xib文件,在这个文件中存放这个项目中重复使用的UI控件。在需要的时候直接从这个项目文件中复制,粘贴。 生活美好了一些! 接着,在学会儿编写Xcode插件后,我写了BetterXib它很小,但很有用! 现在你只需要按下Ctrl G,那个Label就会出现在你的面前! 使用方法 插件安装copy BetterXib.xcplugin to ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ or build target , after build, Xcode will help you copy the plug-in product to that directory. Then you should restart Xcode ,let Xcode load the plug-in. 使用按Ctrl G会引导生成一个控件模板文件,然后你可以在模板文件中存放项目中经常使用到的UI控件下次使用的时候,再按Ctrl G,模板文件会被打开,你就可以从里面选择你需要的控件啦。 标签:BetterXib
【文件预览】:
BetterXib-master
----BetterXib()
--------BetterXib.h(196B)
--------AddProjectWindowController.m(2KB)
--------MacTemplate.xml(675B)
--------BetterXib-Info.plist(1KB)
--------AddProjectWindowController.xib(11KB)
--------IOSTemplate.xml(614B)
--------AddProjectWindowController.h(357B)
--------Model()
--------IOSStoryboardTemplate.xml(691B)
--------BetterXib-Prefix.pch(182B)
--------BetterXib.m(13KB)
--------en.lproj()
----BetterXibTest()
--------main.m(242B)
--------BetterXibTest-Prefix.pch(172B)
--------AppDelegate.h(274B)
--------AppDelegate.m(12KB)
--------Base.lproj()
--------BetterXibTest-Info.plist(1KB)
--------Images.xcassets()
--------en.lproj()
----BetterXib.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(30KB)
--------xcuserdata()
----BetterXibTestTests()
--------BetterXibTestTests-Info.plist(690B)
--------en.lproj()
--------BetterXibTestTests.m(656B)
----BetterXib.xcplugin()
--------Contents()
----README.md(1KB)

网友评论