¡@

Home 

2014/10/15 ¤U¤È 10:13:46

iphone Programming Glossary: self.bounds

How do I make UILabel display outlined text?

http://stackoverflow.com/questions/1103148/how-do-i-make-uilabel-display-outlined-text

2 y str strlen str void drawRect CGRect rect CGContextRef theContext UIGraphicsGetCurrentContext CGRect viewBounds self.bounds CGContextTranslateCTM theContext 0 viewBounds.size.height CGContextScaleCTM theContext 1 1 CGContextSelectFont theContext..

How would I tint an image programatically on the iPhone?

http://stackoverflow.com/questions/1117211/how-would-i-tint-an-image-programatically-on-the-iphone

CGContextSetFillColor context CGColorGetComponents self.overlayColor.CGColor CGContextFillRect context self.bounds CGContextRestoreGState context Ordinarily to optimize the drawing you would restrict the actual drawing to only the area..

How can I change the saturation of an UIImage?

http://stackoverflow.com/questions/1144768/how-can-i-change-the-saturation-of-an-uiimage

rect CGContextRef context UIGraphicsGetCurrentContext CGContextSaveGState context CGContextTranslateCTM context 0.0 self.bounds.size.height flip image right side up CGContextScaleCTM context 1.0 1.0 CGContextDrawImage context rect self.image.CGImage.. context rect self.image.CGImage CGContextSetBlendMode context kCGBlendModeSaturation CGContextClipToMask context self.bounds image.CGImage restricts drawing to within alpha channel CGContextSetRGBFillColor context 0.0 0.0 0.0 desaturation CGContextFillRect..

How do I add a gradient to the text of a UILabel, but not the background?

http://stackoverflow.com/questions/1266179/how-do-i-add-a-gradient-to-the-text-of-a-uilabel-but-not-the-background

it CGContextRef context UIGraphicsGetCurrentContext CGContextSaveGState context CGContextTranslateCTM context 0.0f self.bounds.size.height CGContextScaleCTM context 1.0f 1.0f CGContextSelectFont context Helvetica 20.0f kCGEncodingMacRoman CGContextSetTextDrawingMode.. gradient CGGradientCreateWithColorComponents rgbColorspace components locations num_locations CGRect currentBounds self.bounds CGPoint topCenter CGPointMake CGRectGetMidX currentBounds 0.0f CGPoint midCenter CGPointMake CGRectGetMidX currentBounds..

Drawing incrementally in a UIView (iPhone)

http://stackoverflow.com/questions/1798414/drawing-incrementally-in-a-uiview-iphone

on every call void drawRect CGRect rect CGContextRef context UIGraphicsGetCurrentContext CGContextDrawImage context self.bounds maskRef draw the mask CGContextClipToMask context self.bounds maskRef respect alpha mask CGContextSetBlendMode context kCGBlendModeColorBurn.. UIGraphicsGetCurrentContext CGContextDrawImage context self.bounds maskRef draw the mask CGContextClipToMask context self.bounds maskRef respect alpha mask CGContextSetBlendMode context kCGBlendModeColorBurn set blending mode for Drop drop in myPoints.. drawAtPoint CGPointZero if myPoints count 0 Drop drop myPoints objectAtIndex myPoints count 1 CGContextClipToMask ctx self.bounds maskRef respect alpha mask CGContextAddEllipseInRect ctx CGRectMake drop.point.x drop.dropSize 2 drop.point.y drop.dropSize..

Enable copy and paste on UITextField without making it editable

http://stackoverflow.com/questions/1920541/enable-copy-and-paste-on-uitextfield-without-making-it-editable

How do I create/render a UIImage from a 3D transformed UIImageView?

http://stackoverflow.com/questions/1949003/how-do-i-create-render-a-uiimage-from-a-3d-transformed-uiimageview

_transform.m41 _transform.m14 _transform.m21 _transform.m42 _transform.m11 _transform.m24 _transform.m42 _rect self.bounds if UIGraphicsBeginImageContextWithOptions NULL UIGraphicsBeginImageContextWithOptions _rect.size NO 0.0 else UIGraphicsBeginImageContext..

iPhone, reproduce the magnifier effect

http://stackoverflow.com/questions/2030730/iphone-reproduce-the-magnifier-effect

over that and you're done. void drawRect CGRect rect CGContextRef context UIGraphicsGetCurrentContext CGRect bounds self.bounds CGImageRef mask UIImage imageNamed @ loupeMask .CGImage UIImage glass UIImage imageNamed @ loupeImage CGContextSaveGState..

Get a PDF/PNG as output from a UIWebView or UIView

http://stackoverflow.com/questions/2454309/get-a-pdf-png-as-output-from-a-uiwebview-or-uiview

QuartzCore QuartzCore.h @implementation UIView PDFWritingAdditions void renderInPDFFile NSString path CGRect mediaBox self.bounds CGContextRef ctx CGPDFContextCreateWithURL CFURLRef NSURL fileURLWithPath path mediaBox NULL CGPDFContextBeginPage ctx NULL..

How can i change the color of pagination dots of UIPageControl?

http://stackoverflow.com/questions/2942636/how-can-i-change-the-color-of-pagination-dots-of-uipagecontrol

rect CGContextRef context UIGraphicsGetCurrentContext CGContextSetAllowsAntialiasing context true CGRect currentBounds self.bounds CGFloat dotsWidth self.numberOfPages kDotDiameter MAX 0 self.numberOfPages 1 kDotSpacer CGFloat x CGRectGetMidX currentBounds.. dotSpanX self.numberOfPages kDotDiameter kDotSpacer CGFloat dotSpanY kDotDiameter kDotSpacer CGRect currentBounds self.bounds CGFloat x touchPoint.x dotSpanX 2 CGRectGetMidX currentBounds CGFloat y touchPoint.y dotSpanY 2 CGRectGetMidY currentBounds..

Is there a way to change page indicator dots color

http://stackoverflow.com/questions/3409319/is-there-a-way-to-change-page-indicator-dots-color

How to draw a “speech bubble” on an iPhone?

http://stackoverflow.com/questions/4442126/how-to-draw-a-speech-bubble-on-an-iphone

with a pointing triangle at the bottom . The Quartz drawing code that I used is as follows CGRect currentFrame self.bounds CGContextSetLineJoin context kCGLineJoinRound CGContextSetLineWidth context strokeWidth CGContextSetStrokeColorWithColor..

How to draw graphics in iphone gesture?

http://stackoverflow.com/questions/6173685/how-to-draw-graphics-in-iphone-gesture

context else if gR state UIGestureRecognizerStateChanged CGPoint location2 gR locationInView self panIndicator.frame self.bounds panIndicator.startPoint location panIndicator.endPoint location2 panIndicator setNeedsDisplay I don't know why PanIncicator..