You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For radial, same things and also an adaptation must be done when computing locations (now it is [0, 1])
I try with that but not sure that we must do that
varlocations:[CGFloat]=[]letsize:CGFloat=1/ CGFloat(colors.count)varpos:CGFloat=0
for _ in 0..<colors.count {
locations.append( pos)
pos += size
}
locations.append(1)
The text was updated successfully, but these errors were encountered:
TIL, great idea. I prefer to add an associated value to the enum since we provide similar API for Animtable and some other properties. But we need to handle the parsing careful to apply default 1 to not break the existing @IBInspectable var _gradientMode: String?.
We could add easily repeating gradient
We can find the concept in css
https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_gradient-linear_repeating2
https://developer.apple.com/library/content/documentation/InternetWeb/Conceptual/SafariVisualEffectsProgGuide/Gradients/Gradient.html
We need for that the number of repetitions
We could add parameter to the
GradientMode
or I prefer to add a var inGradientDesignable
For Linear it is very easy
For radial, same things and also an adaptation must be done when computing
locations
(now it is [0, 1])I try with that but not sure that we must do that
The text was updated successfully, but these errors were encountered: