I am new to iPhone development and am currently developing a graphical tool developed for Silverlight.
I am currently using a gradient to “fill in” a rectangle representing a panel inside a chart. Is it possible to animate this gradient so that it changes color when the user touches the panel in the chart.
I have looked at Apple's Core Animation tutorials, but I don’t see a property that targets gradients. I suppose I could use the fade transition between two rectangles, one of which has my initial gradient, and the second with the “affected” version, but that would obviously mean drawing a few rectangle objects for each bar, and I suggest additional official overhead.
Any ideas?
Yes, you can animate gradients using Core Animation.
The CAGradientLayer class, released in version 3.0, has a good API for rendering gradients in a layer and animating color and color changes.
, , .
, CABasicAnimation, , . , .
, - , , .
Source: https://habr.com/ru/post/1724278/More articles:Need to send email from HTML pages - javascriptWhat is this exception: encryption buffering error in JsafeJCE JCE provider - javaWhy does my rdebug session say "*** No source file" - ruby | fooobar.comhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1724276/how-to-add-weights-to-a-mysql-table-and-select-random-values-according-to-these&usg=ALkJrhhB0JeeSBvaQVV2EFdoZ8ZqMec13AIn ruby, why does my IRB interactive debugging session always say "No source file," - ruby | fooobar.comHow to add hyperlink to dynamic gridview column - c #R error allocMatrix - rAndroid: Сделать изображение непрозрачным/прозрачным - androidRuby Utility Idiom - idiomsg ++ creates large binaries despite a small project - c ++All Articles