mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
35 lines
762 B
Objective-C
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
|