Introduction to the Catextlayer properties of iOS

Source: Internet
Author: User

1, Catextlayer Introduction

Catextlayer fast, efficient and simple to render plain text, nsattributedstring

/*The text layer provides simple text layout and rendering of plain * or attributed strings. The first line was aligned to the top of the * layer. */ns_assume_nonnull_beginca_class_available (10.5,2.0,9.0,2.0)@interfacecatextlayer:calayer{@private    structCatextlayerprivate *_state;}//the rendered string@property (nullable, copy)ID string;//Font@property (nullable) cftyperef font;//Font Size@property cgfloat fontSize;//text color@property (nullable) Cgcolorref Foregroundcolor;//whether the line is wrapped, the default no@property (getter=iswrapped) BOOL wrapped;//enumeration: Setting truncation Mode@property (copy) NSString *Truncationmode;//enumeration: Setting the mode to its@property (copy) NSString *Alignmentmode;//text is pixelated, default no@property BOOL allowsfontsubpixelquantization;@end/*truncation modes.*/Ca_extern NSString*ConstKcatruncationnone//no clipping, defaultCa_available_starting (10.5,3.2,9.0,2.0); Ca_extern nsstring*ConstKcatruncationstart//Trim Start SectionCa_available_starting (10.5,3.2,9.0,2.0); Ca_extern nsstring*ConstKcatruncationend//Trim End SectionCa_available_starting (10.5,3.2,9.0,2.0); Ca_extern nsstring*ConstKcatruncationmiddle//Trim middle sectionCa_available_starting (10.5,3.2,9.0,2.0);/*Alignment modes.*/Ca_extern NSString*ConstKcaalignmentnatural//defaultCa_available_starting (10.5,3.2,9.0,2.0); Ca_extern nsstring*ConstKcaalignmentleft//Align LeftCa_available_starting (10.5,3.2,9.0,2.0); Ca_extern nsstring*ConstKcaalignmentright//Align RightCa_available_starting (10.5,3.2,9.0,2.0); Ca_extern nsstring*ConstKcaalignmentcenter//Center AlignmentCa_available_starting (10.5,3.2,9.0,2.0); Ca_extern nsstring*ConstKcaalignmentjustified//Justify on both sidesCa_available_starting (10.5,3.2,9.0,2.0); Ns_assume_nonnull_end

Introduction to the Catextlayer properties of 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.