在iPhone应用程序中绘制一个带有某种颜色的图层

发布于 2024-09-17 10:59:53 字数 89 浏览 1 评论 0原文

我想知道如何在窗口中绘制具有某种颜色[CGColorRef]的图层

当我尝试将SubLayer添加到我的窗口时,应用程序正在退出而没有显示任何异常。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

波浪屿的海角声 2024-09-24 10:59:53

如果您的应用程序只是退出而没有调试错误,则仍然可能会向某些已释放的实例发送一条消息。尝试按照此处的说明打开 NSZombieEnabled:
http://www.codza.com/how-to-debug- exc_bad_access-on-iphone

这会在发送错误消息时告诉您。

此外,如果您想提出涉及特定代码的问题,您会得到更好的答复。尝试发布您的代码,也许我们可以帮助您进行基本的调试。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文