• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
drawing in uiview
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: drawing in uiview
      • From: Randall Meadows <email@hidden>
  • Prev by Date: Appropriate dealloc and finalize actions
  • Next by Date: RE: IBPlugin Inspector: get contents of the Library Media tab
  • Previous by thread: Re: Appropriate dealloc and finalize actions
  • Next by thread: Re: drawing in uiview
  • Index(es):
    • Date
    • Thread