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