Quote:
Originally Posted by PhoneyDeveloper
I assume you're not calling the drawRect yourself and this isn't happening in a secondary thread. There must be some other factor that you're not telling us.
|
Yeah. It's being called using the following code:
Code:
[stopButton addTarget:self action:@selector( drawSquare ) forControlEvents:UIControlEventTouchUpInside];
drawSquare is the method that calls the code in my first post.
Quote:
Originally Posted by PhoneyDeveloper
Is this a simple UIView subclass? Does it ever draw correctly? Are you calling super drawRect? Does your app have unexplained crashes? Memory corruption might be the cause.
|
Yes.
It draws correctly when you call it from drawRect, but not when you hook it up to a button (see above code)
No explained crashes.