Home > DeveloperSection > Interviews > Define Gradient color in iOS.

Posted on    December-30-2015 7:18 AM

 iPhone iPhone  Ios  Objective C 
 1 Answer(s)
  526  View(s)
Rate this:

Tarun Kumar

Total Post:107

Posted on    December-30-2015 8:18 AM

Quartz provides two opaque data types for creating gradients—CGShadingRef and CGGradientRef. We can use either of these to create axial or radial gradients. A Gradient is a filling of color that varies from one color to another color.

There are main two types of gradients, that are as follows:
1. Axial Gradient: It is described by 2 points, different color is available at each point. All points that lie on a line perpendicular to the axis have the same color value.
2. Radial gradient: It is described by circle where one color available at centre and changes when moving towards the edges and gradient radius of circular sections are defined by the radii of the end circles. and the radius of each intermediate circle varies linearly from one end to the other.

Don't want to miss updates? Please click the below button!

Follow MindStick