Swiftgram/submodules/AsyncDisplayKit/Source/NSParagraphStyle+ASText.h
2019-11-11 16:39:27 +04:00

35 lines
762 B
Objective-C

//
// NSParagraphStyle+ASText.h
// Texture
//
// Copyright (c) Pinterest, Inc. All rights reserved.
// Licensed under Apache 2.0: http://www.apache.org/licenses/LICENSE-2.0
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
/**
Provides extensions for `NSParagraphStyle` to work with CoreText.
*/
@interface NSParagraphStyle (ASText)
/**
Creates a new NSParagraphStyle object from the CoreText Style.
@param CTStyle CoreText Paragraph Style.
@return a new NSParagraphStyle
*/
+ (nullable NSParagraphStyle *)as_styleWithCTStyle:(CTParagraphStyleRef)CTStyle;
/**
Creates and returns a CoreText Paragraph Style. (need call CFRelease() after used)
*/
- (nullable CTParagraphStyleRef)as_CTStyle CF_RETURNS_RETAINED;
@end
NS_ASSUME_NONNULL_END