How to set texture to CALayer in ios? -


"itemprop =" text ">

How to apply for calayer with the level of ambiguity like a combination of image texture and calayer image like texture (below) can go?

postprop = "text">

You can use this

 < Code> UIImage * yourImage = [UIImage imageNamed: @ "Your Profile Image"]; Self.ourView.layer.contents = (__Bridge ID) yourImage.CGImage;  

Edit Try adding this sub-layer to the current layer. It will give you ideas for how to do this.

  This will draw some circle int radius = 30.0; UIBezierPath * Path = [UIBezierPath bezierPathWithRoundedRect: CGRectMake (0, 0, 20.0, 20.0) Radius: Radius: 0]; UIBezierPath * circlePath = [UIBezierPath bezierPathWithRoundedRect: CGRectMake (0, 0; 2.0 * radius, 2.0 * radius) cornerRadius: radius]; [Route apendapath: circlepath]; [Route set USFFFRRUURU: yes]; Casplayer * filler = [capsular layer]; FillLayer.path = Path. CGPath; FillLayer.fillRule = KCFlyRuleWed; FillLayer.fillColor = [UIColor blackColor] .CGColor; FillLayer.opacity = 0.7; [Self.view.layer addSublayer: filllayer];  

You can also try setting the mask

  [self.view.layer setMask: filllayer];  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -