draw a layer with some color in iPhone Application

心不动则不痛 提交于 2019-12-14 00:08:00

问题


I would like to know how to draw a layer with some color [CGColorRef] in a window

When i am trying to addSubLayer to my window , the application is exiting without showing any exception.


回答1:


If your app is just quitting with no debug error, there still could be a message sent to some deallocated instance. Try turning on NSZombieEnabled by following the instructions here: http://www.codza.com/how-to-debug-exc_bad_access-on-iphone

This will tell you when a bad message is sent.

Further, if you'd like to ask a question involving specific code, you'll get better responses. Try posting your code and maybe we can help you with basic debugging.



来源:https://stackoverflow.com/questions/3638872/draw-a-layer-with-some-color-in-iphone-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!