Use NS_RETURNS_RETAINED macro to save time (#843)

* Use NS_RETURNS_RETAINED macro to save time

* Update changelog and do the thing with the license headers
This commit is contained in:
Adlai Holler
2018-03-21 08:13:09 -07:00
committed by GitHub
parent e954b1045a
commit 2b12654810
61 changed files with 239 additions and 184 deletions

View File

@@ -1,12 +1,18 @@
//
// ASTextLine.h
// Modified from YYText <https://github.com/ibireme/YYText>
// Texture
//
// Created by ibireme on 15/3/10.
// Copyright (c) 2015 ibireme.
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the /ASDK-Licenses directory of this source tree. An additional
// grant of patent rights can be found in the PATENTS file in the same directory.
//
// This source code is licensed under the MIT-style license found in the
// LICENSE file in the root directory of this source tree.
// Modifications to this file made after 4/13/2017 are: Copyright (c) through the present,
// Pinterest, Inc. Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
#import <UIKit/UIKit.h>
@@ -22,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface ASTextLine : NSObject
+ (instancetype)lineWithCTLine:(CTLineRef)CTLine position:(CGPoint)position vertical:(BOOL)isVertical;
+ (instancetype)lineWithCTLine:(CTLineRef)CTLine position:(CGPoint)position vertical:(BOOL)isVertical NS_RETURNS_RETAINED;
@property (nonatomic) NSUInteger index; ///< line index
@property (nonatomic) NSUInteger row; ///< line row
@@ -73,7 +79,7 @@ typedef NS_ENUM(NSUInteger, ASTextRunGlyphDrawMode) {
@interface ASTextRunGlyphRange : NSObject
@property (nonatomic) NSRange glyphRangeInRun;
@property (nonatomic) ASTextRunGlyphDrawMode drawMode;
+ (instancetype)rangeWithRange:(NSRange)range drawMode:(ASTextRunGlyphDrawMode)mode;
+ (instancetype)rangeWithRange:(NSRange)range drawMode:(ASTextRunGlyphDrawMode)mode NS_RETURNS_RETAINED;
@end
NS_ASSUME_NONNULL_END