objective c - Cocoa-touch - drawing with core graphics to a touch point -


Then I have to do something that seems very easy but the other is proving intelligent, I just got a square at this point I want to make a touch that I cant speak to get it to work though in touch I call a custom method called Draus Square which is sent to CGRCant. I know that I should do something wrong, but I do not have enough information about the ancient depiction of encoded / coco-touch. Any help would be greatly appreciated. Here's my code:

  - (zero) Drawsquare: (CGRTact) Rect {// Get CGContext from this view CGContextRef context = UIGraphicsGetCurrentContext (); // Create a Rectangle CGContextSetFillColorWithColor (Reference, [UIColor redColor] .CGColor); // Define a rectangle CGContextAddRect (reference, rect); // CGContextFillPath draw (reference); } - (Zero) touches: (NSSAT *) touches the event: (UITT * touches in touch) for the event (UEVENT *) {event} {// receives coordination of touch with respect to the given scene. CG Point Touchpoint = [Touch Location InViv: Self]; CGRCact Rect = CGRactMake (TouchPoint.X, TouchPoint.I, 50, 50); [Auto draw: rect;]; }}  

Do not try to do your drawing in your event methods. Update the list of what you want to attract, and send -setNeedsDisplay.


Comments