• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Should I pixel align in a View subclass in method -initWithFrame:frame?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Should I pixel align in a View subclass in method -initWithFrame:frame?


  • Subject: Should I pixel align in a View subclass in method -initWithFrame:frame?
  • From: Peter Teeson <email@hidden>
  • Date: Tue, 08 May 2012 18:16:42 -0400

This is a continuation of my previous issue stroking a bezier path.
In my sub-class -initWithFrame:frame I do the following:
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code here.
        frame.size.width = 200.0;
        frame.size.height = 200.0;
        frame.origin.x = 50.0;
        frame.origin.y = 50.0;

Should I be pixel aligning it? And is this the correct way?
	frame = [self convertRectToBacking: frame];
	frame = [self convertRectFromBacking: frame];

	[self setFrame:frame];
	[self setNeedsDisplay:YES];
		… ….


Thanks….

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Should I pixel align in a View subclass in method -initWithFrame:frame?
      • From: Kyle Sluder <email@hidden>
    • Re: Should I pixel align in a View subclass in method -initWithFrame:frame?
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: Mapkit annotation arrays and writing to a file
  • Next by Date: Re: Should I pixel align in a View subclass in method -initWithFrame:frame?
  • Previous by thread: Re: Mapkit annotation arrays and writing to a file
  • Next by thread: Re: Should I pixel align in a View subclass in method -initWithFrame:frame?
  • Index(es):
    • Date
    • Thread