简体   繁体   English

在目标C中的可可Mac应用程序中使用动画动态调整imageview的大小

[英]Dynamically resize imageview with animation in cocoa mac application in objective c

I am having a cocoa application for mac in objective c. 我在目标c中有针对Mac的可可应用程序。

I am slightly new to mac application. 我是Mac应用程序的新手。

In my app, I want to implement growing imageview animation like shown below in the images. 在我的应用中,我想实现不断增长的imageview动画,如下图所示。

图片1图片2

As seen from the screenshots, when my window loads, I have some data to feel as it increases its value. 从屏幕截图中可以看到,当我的窗口加载时,随着其值的增加,我会有一些数据感觉。

From 0 to the maximum value. 从0到最大值。

It should show like its rising from 0 to the values that I have specified. 它应该显示为从0上升到我指定的值。

I have seen lots of circular animations but didn't get much idea from that. 我看过很多圆形动画,但并没有从中得到很多想法。

please give me suggestions on this. 请给我建议。

Please ignore if mistakes as I am new to mac development. 如果我是Mac开发新手,请忽略是否有错误。

Thanks in advance. 提前致谢。

You should create mask and apply it to NSImageView layer object using the only image (one for 100%). 您应该使用唯一的图像(一个代表100%)创建遮罩并将其应用于NSImageView图层对象。

Read following article and don't be afraid it's about iOS-development, CoreAnimation is available in Cocoa too. 阅读下面的文章 ,不要担心它与iOS开发有关,CoreAnimation也可在Cocoa中使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM