Custom Cut rounded IOS

Source: Internet
Author: User

nsmutableattributedstring *attstring = [[nsmutableattributedstringalloc] Initwithstring:@ " attack on the Giants "];

Nsshadow *shadow = [[nsshadowalloc]init];

Shadow. Shadowcolor = [uicolordarkgraycolor];

Shadow. Shadowblurradius =1;

    [attstring setattributes:[ nsdictionary Dictionarywithobjectsandkeys:shadow, nsshadowattributename nil ] range: Nsmakerange ( 0 , attstring . length

UILabel *l = [[UILabelalloc]init];

L.frame =cgrectmake(+,-) ;

L. BackgroundColor = [uicolorclearcolor];

L.attributedtext = attstring;

[selfaddsubview: l];





-(void) createui{

    

    uibezierpath *maskpath = [ uibezierpath bezierpathwithroundedrect: _ CODEBTN bounds byroundingcorners: uirectcornertopleft< Span style= "COLOR: #000000" > | Uirectcornerbottomleft cornerradii: Cgsizemake ( 5 , 5

cashapelayer *masklayer = [[cashapelayeralloc] init];

Masklayer. frame =_codebtn. bounds;

Masklayer. path = Maskpath. Cgpath;

_codebtn. layer. Mask = Masklayer;

    uibezierpath *maskpath1 = [ uibezierpath bezierpathwithroundedrect: _coutrybtn bounds byroundingcorners: uirectcornertopright< Span style= "COLOR: #000000" > | Uirectcornerbottomright cornerradii: Cgsizemake ( 5 , 5

cashapelayer *masklayer1 = [[cashapelayeralloc] init];

MaskLayer1. frame =_coutrybtn. bounds;

MaskLayer1. path = maskPath1. Cgpath;

_coutrybtn. layer. Mask = maskLayer1;

    uibezierpath *maskpath2 = [ uibezierpath bezierpathwithroundedrect: _phoneno bounds byroundingcorners: uirectcornertopleft< Span style= "COLOR: #000000" > | Uirectcornerbottomleft cornerradii: Cgsizemake ( 5 , 5

cashapelayer *masklayer2 = [[cashapelayeralloc] init];

MaskLayer2. frame =_phoneno. bounds;

MaskLayer2. path = maskPath2. Cgpath;

_phoneno. layer. Mask = MaskLayer2;

    uibezierpath *maskpath3 = [ uibezierpath bezierpathwithroundedrect: _sendbtn bounds byroundingcorners: uirectcornertopright< Span style= "COLOR: #000000" > | Uirectcornerbottomright cornerradii: Cgsizemake ( 5 , 5

cashapelayer *masklayer3 = [[cashapelayeralloc] init];

MaskLayer3. frame =_sendbtn. bounds;

MaskLayer3. path = MaskPath3. Cgpath;

_sendbtn. layer.mask = MaskLayer3;

_testlabel.layer.maskstobounds = YES;

_testlabel.layer.cornerradius = 5;

//

_sumbitlabel.layer.maskstobounds = YES;

_sumbitlabel.layer.cornerradius = 5;

}

Custom Cut rounded IOS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.