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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 10-01-2008, 01:25 PM   #6 (permalink)
PhoneyDeveloper
New Member
 
Join Date: Sep 2008
Posts: 1,431
PhoneyDeveloper is on a distinguished road
Default

OK, so you are calling drawRect or the code that you showed directly. You can't do that. To make a view draw itself send setNeedsDisplay. Update whatever state the view needs to draw itself and then send setNeedsDisplay.

You can't draw to a view outside drawRect and you can't call drawRect directly.

The invalid context that is mentioned in the error messages is the CGContext that is required for all drawing. When the framework calls a view's drawRect method it first sets up this context.
PhoneyDeveloper is offline   Reply With Quote
 

» Advertisements
» Online Users: 440
19 members and 421 guests
Absentia, apatsufas, brainspoon, comicool, Davor, Domele, habitatus, iMax 3060, jbro, john love, JohnnyFlash, linkmx, matador1978, m_rozzi, NSString, revg, RickSDK, teebee74
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,551
Threads: 94,078
Posts: 402,725
Top Poster: BrianSlick (7,990)
Welcome to our newest member, hongto24
Powered by vBadvanced CMPS v3.1.0

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