On Sep 3, 2010, at 13:16, Pessoal wrote:

> I have a custom view called HeaderView and I need to draw a pattern in this
> view. The final result that I want to achieve is this:
> http://cl.ly/2F5q
> 
> And it's working but when I resize the window and my drawRect is called the
> pattern change his orientation. Like this:
> http://cl.ly/2F8t

(a) You might need to post your 'drawRect:' code so that we can see what's 
going on.

(b) The *most common* cause of this kind of thing is misinterpreting the NSRect 
parameter to 'drawRect:'. It can be any (sub)part of the view, so you can't 
align your pattern to this rect. Instead, you must align your pattern to the 
view origin, regardless of what's being drawn.

There are other possibilities, but this is a good place to start.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to