完成第一个小游戏MoonWarrior之后,就开始和UI撕扯不清了,最近一直让做UI界面,这个做完做那个,实现也没什么难度,但就是耗时间,而且windows平台下开发,cocostudio UI编辑器被各种吐槽,但也没办法,吐槽过后还是得继续使用,各种大神都是在Mac平台下开发的,我也想试试呢,虽然换个平台我就是个连工具都不会用的超级菜鸟了...
下面我就说点这段时间碰到的一些问题吧
1.cocostudio UI编辑器提供的输入框UITextField不带光标
这个真心很尴尬,这样用户怎么知道自己已经点中了可以输入了呢,网上虽然有不少提问这方面问题的,可完全没有根本的解决方案,群里也讨论过这个问题,基本上是大神们花时间重写控件,出于立场成了保密资料,所以到现在也没有开源的源码可供参考使用。我还是个菜鸟,当然不可能写出这么高端的源码,只是用了治标的方法表面上解决了这个问题,网上有个大大的博客写了带光标的输入框(这个大大很眼熟吧,MoonWarrior中背景的滚动我们也参考了他的博客),利用这个大大写的控件,将该控件覆盖在获取的UITextField控件上,并将UITextField控件隐藏,这样就形成了假象的带光标的UI输入框
带光标的输入框,请参考:http://blog.csdn.net/onerain88/article/details/7572315
2.cocostudio UI