Codec ░ background

361Transparent Background of Custom Drawing Class

Usually common problems already have simple solution. Like that one:

Problem
You subclassed UIView, you want to do some custom drawing in drawRect, but no matter what you do or where you draw, the background of the view remains black.

- (void)drawRect:(CGRect)rect {
 // Drawing code
 CGContextRef context = UIGraphicsGetCurrentContext();
 CGContextSetRGBFillColor(context, 0.0, 0.0, 1.0, 1.0);
 CGContextFillEllipseInRect(context, rect);
}

Solution
In the ViewController, which call the drawing class, add

myDrawingClass.opaque = NO;

- or even nicer. In the drawing class’ init function:

self.opaque = NO;

And not like that
- adding “self.opaque = NO;” in the drawRect: function
- CGContextClearRect(context, rect);
- CGContextSetAlpha(context, 0.5f);

590Adding an UIAlertView 569Layering one UIImage onto of another UIImage 385Rotating an UIView 355Programmatically capture UIView 338Accessing RGBA Pixel Data

175Curling Images at Twitter

curl -F ‘image=@test.png;type=image/png’ -H ‘Expect:’ -u username:password http://twitter.com/account/update_profile_background_image.xml

hmm nice.

the logical thing to do.

instead of text messages, send images…

update: turning tiling on.
curl -F ‘image=@test.png;type=image/png’ -F ’tile=true’ -H ‘Expect:’ -u username:password http://twitter.com/account/update_profile_background_image.xml

second -F flag creates second form field.

update: same applies to user profile image
curl -F ‘image=@icon.png;type=image/png’ -H ‘Expect:’ -u username:password http://twitter.com/account/update_profile_image.xml

update: absolute image paths
curl -F ‘image=@/Users/x/Desktop/icon.png;type=image/png’ -H ‘Expect:’ -u username:password http://twitter.com/account/update_profile_image.xml

there seems to be a bug in the max shell object, preventing cd to work. it also does not like relative paths (~)…

361Transparent Background of Custom Drawing Class 334Combining Images with UIImage & CGContext – (Offscreen drawing) 319Chaning Colors in Twitter with the API 442Transparent Background in Safari 4.0 119Updating to OS 3.0 from beta 5

442Transparent Background in Safari 4.0

http://127.0.0.1/transparent/

Enable Debug Menu in Safari 4.0:

defaults write com.apple.Safari IncludeInternalDebugMenu 1

via http://trac.webkit.org/wiki/WebDevelopers

Also, an interesing option is to modify the .nib file of Safari and insert a new menu:
http://pointum.com/safari-tweaks.html

609Hide/Show Files in the Mac OSX GUI 606Safari 4 – Debug and Develop 566Writing and Reading Preferences 553CAAnimation and the Snapback Problem 391Creating a RAM Disk in OSX

37Perform method in Background

[self performSelectorInBackground:@selector(method) withObject:nil];

& wrap method in autorelease pool.

maybe also of interest:
http://code.google.com/p/plactorkit/ Dictated but not read.

484Printing Selectors in NSLog 361Transparent Background of Custom Drawing Class 175Curling Images at Twitter 442Transparent Background in Safari 4.0 56buttonWithType