mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Remove completely unused layoutManagerDelegate things (#2189)
This commit is contained in:
@@ -81,11 +81,6 @@ struct ASTextKitAttributes {
|
||||
An array of scale factors in descending order to apply to the text to try to make it fit into a constrained size.
|
||||
*/
|
||||
NSArray *pointSizeScaleFactors;
|
||||
|
||||
/**
|
||||
An optional delegate for the NSLayoutManager
|
||||
*/
|
||||
id<NSLayoutManagerDelegate> layoutManagerDelegate;
|
||||
|
||||
/**
|
||||
We provide an explicit copy function so we can use aggregate initializer syntax while providing copy semantics for
|
||||
@@ -105,7 +100,6 @@ struct ASTextKitAttributes {
|
||||
shadowOpacity,
|
||||
shadowRadius,
|
||||
pointSizeScaleFactors,
|
||||
layoutManagerDelegate,
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
lineBreakMode:(NSLineBreakMode)lineBreakMode
|
||||
maximumNumberOfLines:(NSUInteger)maximumNumberOfLines
|
||||
exclusionPaths:(NSArray *)exclusionPaths
|
||||
constrainedSize:(CGSize)constrainedSize
|
||||
layoutManagerDelegate:(id<NSLayoutManagerDelegate>)layoutManagerDelegate;
|
||||
constrainedSize:(CGSize)constrainedSize;
|
||||
|
||||
@property (nonatomic, assign, readwrite) CGSize constrainedSize;
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
maximumNumberOfLines:(NSUInteger)maximumNumberOfLines
|
||||
exclusionPaths:(NSArray *)exclusionPaths
|
||||
constrainedSize:(CGSize)constrainedSize
|
||||
layoutManagerDelegate:(id<NSLayoutManagerDelegate>)layoutManagerDelegate
|
||||
|
||||
{
|
||||
if (self = [super init]) {
|
||||
@@ -43,7 +42,6 @@
|
||||
_textStorage = (attributedString ? [[NSTextStorage alloc] initWithAttributedString:attributedString] : [[NSTextStorage alloc] init]);
|
||||
_layoutManager = [[ASLayoutManager alloc] init];
|
||||
_layoutManager.usesFontLeading = NO;
|
||||
_layoutManager.delegate = layoutManagerDelegate;
|
||||
[_textStorage addLayoutManager:_layoutManager];
|
||||
_textContainer = [[NSTextContainer alloc] initWithSize:constrainedSize];
|
||||
// We want the text laid out up to the very edges of the container.
|
||||
|
||||
@@ -100,8 +100,7 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet()
|
||||
lineBreakMode:attributes.lineBreakMode
|
||||
maximumNumberOfLines:attributes.maximumNumberOfLines
|
||||
exclusionPaths:attributes.exclusionPaths
|
||||
constrainedSize:shadowConstrainedSize
|
||||
layoutManagerDelegate:attributes.layoutManagerDelegate];
|
||||
constrainedSize:shadowConstrainedSize];
|
||||
}
|
||||
return _context;
|
||||
}
|
||||
|
||||
@@ -66,8 +66,7 @@
|
||||
lineBreakMode:NSLineBreakByWordWrapping
|
||||
maximumNumberOfLines:1
|
||||
exclusionPaths:nil
|
||||
constrainedSize:constrainedRect.size
|
||||
layoutManagerDelegate:nil];
|
||||
constrainedSize:constrainedRect.size];
|
||||
__block CGRect truncationUsedRect;
|
||||
|
||||
[truncationContext performBlockWithLockedTextKitComponents:^(NSLayoutManager *truncationLayoutManager, NSTextStorage *truncationTextStorage, NSTextContainer *truncationTextContainer) {
|
||||
|
||||
Reference in New Issue
Block a user