Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
質問を編集しています... CALAyer を使用して画像に線を描画したい場合はどうすればよいですか。
円の中に線を引きたい(円形の画像)。
例:- 線の 1 点が線の半径になり、もう 1 点が円の終点になります (アナログ時計のように)。iPhone のキャンパスが動くと、線も動きます (時計の秒針のように)。 )。
誰か助けてください。これを行う方法
前もって感謝します
UIGraphicsBeginImageContext(circleSize); [chartView.image drawInRect:CGRectMake(0, 0, circleSize.width, circleSize.height)]; // code to draw chartView.image=UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext();
このコードから、同じ画像を再描画できます