Use animation grouping. I you use groups, set beginTime with your
offset for each animation's time to start. The duration of each
animation must be the full duration of the entire animation put
together end to end. Your group animation should also have the same
duration. Here's some pseudo
/xlinterpreter
On 21 Mar 2009, at 00:07, Matt Long wrote:
Use animation grouping. I you use groups, set beginTime with your
offset for each animation's time to start. The duration of each
animation must be the full duration of the entire animation put
together end to end. Your group animation should
Your layer's transform.scale knows nothing of the toValue in the
animation. You have to explicitly set it in the layer in addition to
animating it. This also means that you need to add the animation using
the correct keypath otherwise it will use the default animation
instead of yours.
Ok. You've just raised the bar! ;-) Seems that you would have to
specify the key path you're wanting for each animation which leads me
to think you won't be able to use grouping as you envision as
setAnimations on the CAAnimationGroup only takes an array rather than
a dictionary in which
I'll address the issue with the animation ignoring your duration
first. Try placing your addAnimation call before the
setValue:forKeyPath. Let me know if that works. Also, you will *need*
to specify a fromValue in your animation. If you want the current
value (in the case where an
A crash when trying to add your layer again after a call to
removeFromSuperlayer suggests that you're not retaining the layer and
it's been autoreleased. You either need to re-allocate each time or
retain it yourself. How are you allocating your CALayer inside of your
Layer object?
-Matt
It's not really clear what you are asking. Your final question is
Does this sound correct? to which I would respond, yes. Though
earlier in the message you ask for advice on the remaining parts.
It would help if you were to clarify what you mean. When you say ...a
miracle happens...(string
Not sure what you mean by capable of running tiger. If you have a
machine capable of running Leopard, it should be able to run tiger.
Someone correct me if I'm wrong as I haven't actually done this, but
can' t you simply get an external drive you connect through USB and
install tiger onto
I don't know for sure the answer to whether or not the Quartz Composer
filters are the same as what Core Image gives you, but I would bet
they are. Have you seen this reference?
You can add controls to your View in IB and then use a QTMovieLayer to
display your movie (assuming you are Leopard only). Just make sure
when you add the QTMovieLayer to your view's sub-layers that you use -
insertSublayer:atIndex passing it an index of zero. This will keep all
of the
How very interesting...
I wanted to confirm this so I wrote a little code. Here's an image of
the results.
http://cimgf.com/files/BlurryLayer.png
And here's the Xcode project:
http://cimgf.com/files/BlurryLayer.zip
Thanks for pointing that out David.
-Matt
On Jan 19, 2009, at 11:21 AM,
Joe,
Can you post some code? We can't really know what might be the cause
without it.
Thanks.
-Matt
On Jan 17, 2009, at 5:30 PM, Joe Wildish wrote:
I am sub-classing CALayer and experiencing some strange behaviour.
Sometimes the content of one of my sub-classes is blurred. I can't
Because you can't. These are the only properties you can animate:
http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CoreAnimation_guide/Articles/AnimProps.html
-Matt
On Jan 16, 2009, at 10:46 AM, Adam Venturella wrote:
Basically, I was thinking: Hey, why can't I use CABasicAnimation
Yes. It's what they're made for. What are you trying to do?
-Matt
On Jan 16, 2009, at 11:23 AM, Adam Venturella wrote:
So something like this would be better served with an NSTimer I take
it?
On Fri, Jan 16, 2009 at 9:54 AM, Matt Long matt.l...@matthew-
long.com wrote:
Because you can't
, Adam Venturella wrote:
Set the volume on an Audio Queue (make a fade out/fade in)
So on the interval, I will call:
AudioQueueSetParameter (queueObject, kAudioQueueParam_Volume, value );
Where value is 0-1
On Fri, Jan 16, 2009 at 10:34 AM, Matt Long matt.l...@matthew-long.com
wrote:
Yes
Inputs and Outputs in the root patch can be accessed with
@path.patchname.value where patchname is the name of the input or
output.
http://www.cocoabuilder.com/archive/message/cocoa/2008/12/27/226313
-Matt
On Jan 15, 2009, at 1:44 PM, Jonathan Selander wrote:
Does anybody have an idea on
autoreleased
at that point.
hth,
-Matt
On Jan 8, 2009, at 12:10 AM, Bridger Maxwell wrote:
Hey,
Is the animation your own subclass of CAAnimation? I am justing using
CAKeyframeAnimation.
TTFN
Bridger
On Tue, Jan 6, 2009 at 1:45 PM, Matt Long matt.l...@matthew-
long.comwrote:
Bridger,
As far
If you are using a QCView, use this:
http://developer.apple.com/technotes/tn2005/tn2146.html
If you are using Core Animation (i.e. QCCompositionLayer), try this
blog post:
http://www.cimgf.com/2008/09/24/core-animation-tutorial-core-animation-and-quartz-composer-qccompositionlayer/
and
Seth,
Synchronization is done at a lower level. You need to get the movie
time base of the movie you want to be the master and then set the
master time base for the movie you want to be the slave. Since this is
done at the Movie primitive level it doesn't matter that you are using
Bridger,
As far as I can tell there is nothing inherent in the CA API to do
what you want, however, KVC is available to you. When you create your
animation, do this:
[animation setValue:objectLayer forKey:@parentLayer];
Where objectLayer is the layer the animation is going to be run on.
Both? I can see reasons to want both depending upon what the developer
is providing the end-user. How about a parameter letting me specify? ;-)
-Matt
On Dec 30, 2008, at 7:51 AM, Mike Abdullah wrote:
What is the desired intent of the -connect method? If you call it
while already connected,
Have you tried setting a Clear renderer as Layer 1?
Are you loading the composition in a QCView or a Core Animation
QCCompositionLayer? Also, do your dimensions match between the
composition and the view you're loading it into?
-Matt
On Dec 26, 2008, at 8:30 AM, Gustavo Pizano wrote:
The quartz composition key paths are going to be:
@patch.pitch.value
@patch.roll.value
If you are using a QCCompositionLayer, you can simply call [layer
setValue:[NSNumber numberWithFloat:pitch]
forKeyPath@patch.pitch.value] or even more simply [layer setValue:
[NSNumber
Matt Gemmell is the guy to read on this: http://whathaveyoutried.com/
The shortcut function you are asking for doesn't exist. So now what?
What have you tried? People are much more likely to provide answers to
questions that show what you are currently doing. You're taking the
risk that
I'm hoping that all of the asterisks are just artifacts from a copy/
paste maneuver or something, however, if they are not then you're
missing some serious fundamentals. This code will never compile.
Let's just assume a copy/paste issue. If you are wanting to animate
the size of the frame,
It would appear that you are right. I took your code and plugged it
into an xcode project and found that the manager property is not being
observed. I knew that you couldn't use KVO for animatable properties
in a CALayer, but it appears that CALayers don't allow KVO at all. As
soon as I
Try this: http://www.matthew-long.com/2007/11/09/xcode-30-tutorial/
Are you new to programming as well or just new to Cocoa/Objective-C?
-Matt
On Dec 4, 2008, at 4:25 PM, [EMAIL PROTECTED] wrote:
___
Cocoa-dev mailing list
Jon,
I'm not sure I understand the whole problem here, but from your
initial message I put together a simple demo project that will take
the input value from a text field and use that as the path for an
NSImageView. It does it on the fly (e.g. as you type). Here is the
demo project:
, and it does not
work (in my case). I must be missing something.
Read the container doc... still not quite grokking - but getting
clearer. Part of my problem is relative newness to cocoa and still
battling lingo.
Gary
On Dec 1, 2008, at 7:57 PM, Matt Long wrote:
Gary,
I haven't used
Gary,
I haven't used IKImageView, however, it does implement the
NSAnimatablePropertyContainer protocol:
http://developer.apple.com/documentation/Cocoa/Reference/NSAnimatablePropertyContainer_protocol/Introduction/Introduction.html#/
/apple_ref/occ/intf/NSAnimatablePropertyContainer
This
- Layers can have rounded rects by setting the layer's cornerRadius
property. BTW, you can't create layers in a NIB. The *must* be created
in code.
- Layers do not inherit from NSResponder so clicks (and double-clicks)
must be registered through a backing layer
- You can easily hide a view
Core Animation using layers would make this simpler for you, I think.
You can still get the click from the layer backed view, but then add
your image to the view's layer tree as a layer. Animating a layer is
trivial in CA.
I did a blog post on how to animate a layer to the clicked point in
You can use an NSXMLDocument:
NSString *webpageString = [[[NSString alloc] initWithContentsOfURL:@http://www.google.com
] autorelease];
NSError *error = nil;
NSXMLDocument *document = [[NSXMLDocument alloc]
initWithXMLString:webpageString
Got it. Thanks for the clarification.
-Matt
On Nov 23, 2008, at 6:29 AM, Michael Ash wrote:
On Sun, Nov 23, 2008 at 12:46 AM, Matt Long [EMAIL PROTECTED]
wrote:
Ok. This is interesting. I wrote a little code to see what might be
going
on.
Whatever was true when the AppKit release notes
Have you tried :
[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue
forKey:kCATransactionDisableActions];
// Your code here
[CATransaction commit];
See also:
Ok. This is interesting. I wrote a little code to see what might be
going on.
Whatever was true when the AppKit release notes were published has
either changed or the term supported has a loose definition. Thanks
for pointing that out, Mike, but I don't think it's accurate or I've
I'll find a reference when I get a chance, but I recall reading
somewhere that what you're trying to do won't work. You will need to
use CAOpenGLLayer if you want to add sub-layers to it.
Just to test it, don't add the sub-layer and see if it shows up then.
If it doesn't then you may have
You need both of these lines when you create your animation:
[animation setRemovedOnCompletion:NO];
[animation setFillMode:kCAFillModeForwards];
Here is a related blog post:
http://www.cimgf.com/2008/10/25/core-animation-tutorial-slider-based-layer-rotation/
-Matt
On Nov 12, 2008, at 7:57
on Amazon for Core Animation for Mac
OS X and the iPhone: Creating Compelling Dynamic User Interfaces ;-)
Many thanks
2008/11/12 Matt Long [EMAIL PROTECTED]:
You need both of these lines when you create your animation:
[animation setRemovedOnCompletion:NO];
[animation setFillMode:kCAFillModeForwards
You also need to set it to not remove the animation on completion.
[animation setRemovedOnCompletion:NO]
-Matt
On Nov 11, 2008, at 1:00 AM, Michael A. Crawford wrote:
I have a number of layers that use rotation animation about the Z-
axis. Whenever the animation(s) complete the layer
Jeshua,
I put together a little demo app that works in the simulator. Haven't
tried on my device yet, though. Take a look here:
http://www.cimgf.com/files/ImageFlip.zip
And one comment about the code. If you don't want a transition between
images when using a keyframe animation for the
Look at overriding the layer transition. You can use a page curl
filter, if that's your desired effect, to transition changes to the
layer's content property.
- Create a CATransition object.
- Create a CIFilter that implements a page curl (Check out Apple's
Core Image Filters docs and
Hey Jim,
I don't know much about NSAnimation as I haven't used it, however, I
can try to answer your three questions from a Core Animation standpoint.
1. If you want to know whether an animation is still running, just
check to see if it is still in the animations dictionary in the layer.
Patrick,
I believe the only animatable properties are the ones explicitly
labeled animatable in the documentation. That is why (I believe)
there is a section labeled Animatable Properties in the Core
Animation Programming guide. I think the reason is that you can't
guarantee that your
Hey Steve,
Your call to setWantsLayer won't take effect until the next run loop.
So here is what happens (I think).
- First call to changeRightView:
- turns on layer backing for next run loop
- adds the animation (transition) for next run loop
- sets the delegate for
Colin,
Not sure I completely understand that issue, but in a QTMovieLayer,
the movie is tied to the layer dimensions. If you resize the layer,
you resize the movie. The layer itself has a frame and a bounds
property. All you should need to do is grab [myMovieLayer bounds] or
Someone correct me if I'm wrong, but this is completely *on*-topic.
Core Animation, it's capabilities and limitations are very pertinent.
I don't know the answer to your question, but I certainly think it's
on-topic. I would like to know the answers you get, myself. Then
again, maybe you
Carmen,
I don't know anything about reading pixels back from VRAM and this CPU
analysis you refer to. Why do you need to do that again?
You might want to look into using Core Animation for what you are
trying to do. For that matter, you could very easily create a simple
Quartz
If you compiled your libs using the normal linux/unix ./configure,
make, make install routine, you likely don't have universal binaries.
Can't be sure your issue without seeing your linker error messages,
but this is a likely cause.
-Matt
On Sep 23, 2008, at 11:50 AM, Harsh Trivedi
to work. ;-)
On Sep 18, 2008, at 5:00 PM, Brad Gibbs wrote:
On Sep 18, 2008, at 3:18 PM, Matt Long wrote:
You've got some fundamental issues here.
That doesn't surprise me...
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do
You've got some fundamental issues here. This call in particular:
imageLayer drawLayer:imageLayer inContext:ctx];
It doesn't make sense.
-drawLayer:inContext is a delegate method. You are overriding drawing
functionality for the layer in question. Instead you would set the
layer's delegate
I think you need to clarify what you mean by swapping of layers into
views. The page curl transition works fine in a CALayer. I just set
the transition for the opacity key so that whenever opacity gets
changed, the transition between the previous layer opacity and the new
is done with a
I've noticed that when using the mask property in a CALayer, the mask
itself defines what part of the containing layer shows through rather
than what part of the layer is actually covered or masked. I'm sure
it's just me, but this logic seems inverted from what it ought to be.
Is there a
Are you trying to remove views or animations? Animations are removed
from a layer by default which can be overridden in the
removedOnCompletion property (in CAAnimation) in an explicit animation.
If you're trying to remove views, however, your code is wrong. You
need to find the view you
I can't speak to the example you mention specifically, but I had tried
to scale font sizes this way as well and never got the smooth
transition either. Instead I used something like this:
CATransform3D transform = CATransform3DMakeScale(factor, factor,
factor);
[mainLayer
When you call addSubLayer, you are in essence telling the layer to
animate so any properties you changed in the layer will animate after
adding the layer. You are doing this in your awakeFromNib which is
likely why you don't see the animation when it runs--not sure though.
You might want
This might help:
http://www.cimgf.com/2008/05/13/from-hacker-to-microisv-custom-file-formats/
In essence you create a folder and set attributes on it as you
suspected. Though these are referred to as packages instead of
bundles. Take a look at NSFileManager. You can create a directory that
Hey Graham. I wrote a blog post not too long ago that demonstrates
adding layers to a root layer. You can see it here: http://www.cimgf.com/2008/03/15/core-animation-tutorial-dashboard-effect/
I think you want to get the root content layer and then call
insertSublayer or addSublayer to it.
and start adding your code to it. That's really all you *need* to
know.
-Matt
--
Matt Long
[EMAIL PROTECTED]
http://www.matthew-long.com/
On May 23, 2008, at 12:49 PM, Johnny Lundy [EMAIL PROTECTED] wrote:
I decided to once again go verbatim through Cocoa Fundamentals. So
I recently wrote a blog post with a demo xcode project that shows an
implementation of updating a progress indicator for file copy. You can
see it here: http://www.cimgf.com/2008/05/03/cocoa-tutorial-file-copy-with-progress-indicator/
It's a lowest common denominator example, so it might
It's included for 10.5. I don't think you want Image Capture for your
app, though as this API is mainly for downloading images from the
camera after a photo shoot. I don't believe there is any mechanism for
causing the picture to be taken (from a button click in your app for
example).
Does anyone know if there is a way to programatically set the Image
Capture.app preference called When a camera is connected, open:. I
want to set this to No Applicaiton using code. I would think that
there is some plist file containing this preference, but I've yet to
find such a thing.
I execute this code and it successfully copies my file from source to
destination:
- (IBAction)startCopy:(id)sender;
{
FSFileOperationRef fileOp = FSFileOperationCreate(NULL);
FSRef source;
FSRef destination;
FSPathMakeRef( (const UInt8 *)[[sourceFilePath stringValue]
This might help you: http://www.matthew-long.com/2007/11/09/xcode-30-tutorial/
It's a bit shorter tutorial than the Apple one.
-Matt
On Apr 15, 2008, at 9:25 AM, Mike R. Manzano wrote:
Please read one of the many fine tutorials on the subject, including
this one:
Hey Mani,
I never solved the problem completely, however, I realized that what
you need to do, or so it seems, is to somehow get notified when the
animation has finished and then actually move the button to the
position where the animation stopped. It seems really convoluted to
me, but I
Man! That sure simplified things. Thanks for the tip. Works perfectly.
I ended up using NSRunLoopCommonModes which is apparently Leopard
only. But that's fine for my app.
Thanks.
-Matt
On Mar 19, 2008, at 7:16 PM, Wim Lewis wrote:
On Mar 19, 2008, at 6:00 PM, Matt Long wrote:
[self
You could get a char array from your initial NSString and then use
stringByAppendingFormat:@%c on an NSString in a loop. Notice the
space after the %c.
-Matt
J. Todd Slack wrote:
Hi John,
Yes, I have, Are you thinking insertString:atIndex:?
So at a basic level, can I get the string
67 matches
Mail list logo