2
一个简单的圆圈当我的iPhone应用程序的视图负荷,我动态创建一个UIImageView和我的图像放在它里面。我想借鉴的UIImageView上面简单的圆形,但一直未能使迄今做的。借鉴了的UIImageView
我写了这个代码,并试图在另一对象中recieving事件画一个圈......
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(context, 0, 0, 255, 0.5);
CGContextFillRect(context, CGRectMake(10, 10, 10, 10));
...但
没有任何反应
我收到一个错误。
<Error>: CGContextSetRGBStrokeColor: invalid context 0x0
<Error>: CGContextFillRects: invalid context 0x0
我试图画出一切,无济于事。我究竟做错了什么?
只是好奇,@George,为什么[被删除这个(http://stackoverflow.com/posts/5683492/revisions)一段时间? – Arjan 2011-04-16 07:34:33