» Home » CALayer » Page 1
iphone : remove CALayer when animation stop, CALayer flash before disappear
Category : Mobile Programming

create a simple project in XCode
set view to receive multi-touch events
respond in touchesBegan, create CALayer when detect touch event
make a opacity fade out animation for CALayer
when animation stop, remove CALayer from parent

Expect: CALayer disappear normally

Actual: CALayer flash (blink) before disappear

full source code:

View Replies

How to convert from the upmost CALayer coordinates to the hit CALayer coordinates?
Category : Development Tools & Services

I have a tree of CALayers, and each one has its own tranform and position.

Starting from:

-(void)touchesBeganWithEvent:(NSEvent *)theEvent {
id object=[self.layer hitTest:[self convertPoint:[theEvent locationInWindow]
if ([ object isKindOfClass:[TangramTileLayer class]]) {
[ object displayTouchAt:...]; }

View Replies

CGPath on CALayer
Category : Mobile Programming

I want to draw CGPath on CALayer, but when I render CGPath in CALayer it always draw in the main UIView. Tell me how can I draw CGPath on CALayer.

When I try to draw path on CALayer it gives me something like this:


View Replies

TAGS : CGPath CALayer

CGContext vs CALayer
Category : Operating Systems

I'm trying to get a handle on Quartz 2D and looking at the online book Quartz 2D Graphics for Mac OS X Developers.

One very basic thing that is confusing me is the CGContext. For example, I can draw a simple "U" shape with the code below and use it in a CAShapeLayer without referencing a CGContext. Is the context implied/provided by default by the CA

View Replies

CATiledLayer to CALayer
Category : Mobile Programming

I have a view with a CATiledLayer backing. I want to take the visible tiles from this CATiledLayer UIView and add it to another view as its CALayer backing, thus recreating the visible image in another UIView that doesnt use CATiledLayer.

The reason I want to do this is I will use this second UIView to mask the effect of updating the CATiledLayer backed UIView - this currently produ

View Replies

CATextLayer on the top of CALayer?
Category : Operating Systems

I am trying to get this CATextLayer on top of my CALayer using zPosition, but the CATextLayer seems to always be behind the CALayer?

CALayer *sublayer = [CALayer layer];
sublayer.backgroundColor = [UIColor colorWithRed:0/255.0 green:156.0/255.0 blue:222.0/255.0 alpha:1.0].CGColor;
sublayer.shadowOffset = CGSizeMake(0, 3);
sublayer.shadowRadius = 5.0;

View Replies

bringSubviewToFront for CALayer
Category : Mobile Programming

I'm wondering if there is a way to bring layer on top of others layers of view. Something like bringSubviewToFront does for UIView class. I think it can be done with zPosition property of the CALayer but this means I have to check zPosition for all layers and then set proper value.

Thanks in advance.

View Replies

Purpose of CALayer?
Category : Mobile Programming

I'm slightly used as to what the purpose of CALayer's existence is. Why not just put the properties in a UIView?


View Replies

TAGS : Purpose CALayer

how to do self rotating CALayer
Category : Mobile Programming

When i Clicked on view its create a star shape path.

Now i want to spin the star which is added to CALayer.

Can any one help me out.... How to spin the CALayer on iphone.

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch=[touches anyObject];
currentPoint=[touch locationInView:self.view];

View Replies

Clickable CALayer UIs
Category : Development Tools & Services

I have a coverflow-like image carousel grabbing photos w/iPhoto scripting bridge. I have the view set to accept first responder and have implemented methods for left and right arrows, but cannot figure out, conceptually, how to approach making the layers clickable. I know that accepting mouse-down events is the containing view's job, but I can't put the pieces together in my head.

View Replies

2012 / 2017 Copyrights BigHow , All Rights Reserved .