drawing in uiview
drawing in uiview
- Subject: drawing in uiview
- From: Jos Timanta Tarigan <email@hidden>
- Date: Sat, 10 Oct 2009 10:41:47 -0700 (PDT)
hi,
i got a very basic question on iphone development. so i add an uiview via IB and try to update it by making my own interface called updateInterface(). in the update interface i put this code:
CGRect frame = [polyView frame];
NSArray*polypath = [[selfclass]pointsForPolygonInRect:frame numberOfSides:[myPolynumberOfSides]];
CGContextRefmyContext = UIGraphicsGetCurrentContext();
int i = 0;
CGContextSetRGBStrokeColor(myContext, 0, 0, 1, 1);
for (NSValue* value in polypath) {
CGPoint point = [value CGPointValue];
if (i == 0) {
CGContextMoveToPoint(myContext, point.x, point.y);
i++;
}
else {
CGContextAddLineToPoint(myContext, point.x, point.y);
}
}
CGContextClosePath(myContext);
im trying to draw a polygon here built by lines from one point to antoher. the "pointsForPolygonInRect" is working properly but my UIview(polyView) isnt showing anything. i dont really understand what happened up there, i just googled it around working for a proper method. im very new to cocoa-dev so please do a more human language ;)
thank you
=================================
http://www.svnstrk.blogspot.com
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden