Reputation: 15
I'm new to Cocoa and kinda trying to create a timer.
I'm trying to move the NSImage inside the NSImageview up or down based on a timer.
Here is how I load the image inside the NSImageview:
NSRect fnRect = NSMakeRect(10 + (wheelWidth / 4) - 5, 30, numbersWidth, wheelHeight);
fnImageView = [[NSImageView alloc] initWithFrame:fnRect];
[fnImageView setImageScaling:NSScaleNone];
[fnImageView setImage:numbers];
[self addSubview:fnImageView];
If anyone can point me to a tutorial or give me a hint about how to do it I would appreciate it. Thanks.
Upvotes: 0
Views: 834
Reputation: 6384
You might want to look into CoreAnimation and working with layers.
Upvotes: 0
Reputation: 8371
Inside a NSImageView
isn't a NSImage
. It's just used to show the NSImage
.
What you want to do is probably a NSImageView
inside a NSView
where you could move it around.
NSView
NSImageView
in itNSImageView
around.Upvotes: 2