ios7 - How to make this kind of effect in iOS, blur effect it is increasing leaner to lower side -


i searched this, didn't found exact solution problem, answer making blur effect shows making blur effect on entire frame want blur effect below image

enter image description here

in image blur effect @ bottom to, increasing leaner lower side

can 1 know how this, ideas or sample code ... :)

use cagradientlayer

uicolor *thecolor = [[uicolor alloc] initwithred:146.0/255.0 green:146.0/255.0 blue:146.0/255.0 alpha:1];  cagradientlayer *gradientlayer = [cagradientlayer layer];  cgrect gradientlayerframe = theview.frame; gradientlayerframe.origin.x = 0; gradientlayerframe.origin.y = 0; gradientlayer.frame = gradientlayerframe;  //build colors array gradient nsarray *colors = [nsarray arraywithobjects:                    (id)[thecolor cgcolor],                    (id)[[thecolor colorwithalphacomponent:0.9f] cgcolor],                    (id)[[thecolor colorwithalphacomponent:0.6f] cgcolor],                    (id)[[thecolor colorwithalphacomponent:0.4f] cgcolor],                    (id)[[thecolor colorwithalphacomponent:0.3f] cgcolor],                    (id)[[thecolor colorwithalphacomponent:0.1f] cgcolor],                    (id)[[uicolor clearcolor] cgcolor],                    nil];  gradientlayer.colors = colors;  [yourview.layer insertsublayer:gradientlayer atindex:0]; 

swift version of code here


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -