Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 06-15-2009, 05:25 PM   #13 (permalink)
RodOfIPOD
IPOD Training Wheels
 
Join Date: May 2009
Location: Seattle WA
Age: 47
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 05:32 PM.
RodOfIPOD is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,741
Threads: 89,197
Posts: 380,546
Top Poster: BrianSlick (7,129)
Welcome to our newest member, AlexRob58
Powered by vBadvanced CMPS v3.1.0

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