That's cool - when I used PNGs and rotated them, they looked all aliased on
the iPhone so I went with CAShapeLayers instead. Thanks for that link
though.
On Sun, Dec 6, 2009 at 12:21 AM, Scott Anguish wrote:
> not sure if this is helpful, but on http://www.abandoninplace.com/ in
> SampleCode, th
not sure if this is helpful, but on http://www.abandoninplace.com/ in
SampleCode, there is an example of using a dial created with Core Animation.
On Dec 3, 2009, at 3:34 PM, Eric E. Dolecki wrote:
> Will do. One question - when I am rotating around z - it's using the top
> left of the shapeLaye
My rootLayer was using the view's bounds, etc. so this works now:
rootLayer = [CALayer layer];
rootLayer.frame = CGRectMake(240, 160, 240, 160) ;*//self.view.bounds;*
[self.view.layer addSublayer:rootLayer];
boxPath = CGPathCreateMutable();
CGPoint center = CGPointMake(0,0);*//self.view.cente
On Dec 3, 2009, at 12:34 PM, Eric E. Dolecki wrote:
> [shapeLayer setAnchorPoint:CGPointMake(240, 160)];
>
> It just rotates around the top left corner (meaning it comes into and out of
> view)... I am looking to simply spin the shape where it sits from it's
> center.
The anchorPoint is in a uni
Will do. One question - when I am rotating around z - it's using the top
left of the shapeLayer as the anchor point. Trying to set it differently
isn't changing the anchor point...
CABasicAnimation *rotationAnimation;
rotationAnimation =[CABasicAnimation animationWithKeyPath:@
"transform.rotation
On Thu, Dec 3, 2009 at 12:07 PM, Eric E. Dolecki wrote:
> If I use CAShapeLayer, can I use CGAffineTransform on it? I need to pour
> through the docs now I guess.
Yes, please brush up on Core Animation. You can apply arbitrary
transformations to a layer, or you can use the rotation/position
prop
Cool - thanks for that heads up.
If I use CAShapeLayer, can I use CGAffineTransform on it? I need to pour
through the docs now I guess.
On Thu, Dec 3, 2009 at 2:40 PM, Kyle Sluder wrote:
> On Thu, Dec 3, 2009 at 11:24 AM, Eric E. Dolecki
> wrote:
> > I really don't know if this is the correc
On Thu, Dec 3, 2009 at 11:24 AM, Eric E. Dolecki wrote:
> I really don't know if this is the correct approach - should I be using some
> more complex way of displaying and rotating hands on an analog clock?
Yes, use vector-based drawing with CAShapeLayer.
--Kyle Sluder
__
I have 2 UIImageView, each containing a PNG (about 2 pixels wide for the
images). When I rotate these around, the edges of the PNGs look terrible and
I was trying to get MORE anti-aliasing to happen to smooth out the jaggies.
hourHand.layer.anchorPoint = CGPointMake( 0.0, 0.9 );
*//TOTAL GUESS