Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-15-2009, 04:25 PM   #13 (permalink)
RodOfIPOD
IPOD Training Wheels
 
Join Date: May 2009
Location: Seattle WA
Age: 45
Posts: 21
Default How would one add text and or a rectangle?

So i added the following code (i tried both before the [contentView addSubview: imageView] and after) to your LoadView routine:

Code:
	CGContextRef context = UIGraphicsGetCurrentContext();
	CGContextSetRGBStrokeColor(context, .97, .83, .15, 1.0);
	CGContextSetRGBFillColor(context, 0.0, 0.0, 1, 1.0);
	CGContextSetLineWidth(context, 1.0);
	CGContextAddRect(context, CGRectMake(100, 100, 100, 100));
	CGContextStrokePath(context);
	
	[[UIColor redColor] set];
	UIFont *font = [UIFont boldSystemFontOfSize:16];
	CGPoint point = CGPointMake(100,100);
	[@"HELLO" drawAtPoint:point withFont:font];

and neither the box nor the text shows up and yet it shows up perfectly in my non scroll view from my app :P

I guess my real question is how do i attach text and or rectangle drawings to an image so that the image can include these?

Any ideas?

Last edited by RodOfIPOD; 06-15-2009 at 04:32 PM.
RodOfIPOD is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 284
18 members and 266 guests
cakesy, crooksy88, Eskema, Falcon80, ghanalupo, jojo453, josh, kiancheong, lowf, mixer555, odysseus31173, SalvoMaltese, shay_somech, SkodaBuddy, StefanL, Stitch, Susan03, thadre
Most users ever online was 779, 05-11-2009 at 09:55 AM.
» Stats
Members: 24,280
Threads: 39,072
Posts: 171,337
Top Poster: smasher (2,575)
Welcome to our newest member, Susan03
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:09 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.