From c2296ab13eb46168740a7918569055046ee3bcf2 Mon Sep 17 00:00:00 2001 From: bird Date: Mon, 15 Apr 2019 18:51:44 +0800 Subject: [PATCH 1/2] Fix warnings --- YYText/Utility/YYTextUtilities.h | 12 ++++++------ YYText/Utility/YYTextUtilities.m | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/YYText/Utility/YYTextUtilities.h b/YYText/Utility/YYTextUtilities.h index 0c80199d..98c63825 100644 --- a/YYText/Utility/YYTextUtilities.h +++ b/YYText/Utility/YYTextUtilities.h @@ -233,13 +233,13 @@ static inline CGRect YYTextEmojiGetGlyphBoundingRectWithFontSize(CGFloat fontSiz Get the character set which should rotate in vertical form. @return The shared character set. */ -NSCharacterSet *YYTextVerticalFormRotateCharacterSet(); +NSCharacterSet *YYTextVerticalFormRotateCharacterSet(void); /** Get the character set which should rotate and move in vertical form. @return The shared character set. */ -NSCharacterSet *YYTextVerticalFormRotateAndMoveCharacterSet(); +NSCharacterSet *YYTextVerticalFormRotateAndMoveCharacterSet(void); @@ -364,10 +364,10 @@ static inline CGFloat YYTextCGPointGetDistanceToRect(CGPoint p, CGRect r) { /// Get main screen's scale. -CGFloat YYTextScreenScale(); +CGFloat YYTextScreenScale(void); /// Get main screen's size. Height is always larger than width. -CGSize YYTextScreenSize(); +CGSize YYTextScreenSize(void); /// Convert point to pixel. static inline CGFloat YYTextCGFloatToPixel(CGFloat value) { @@ -555,9 +555,9 @@ static inline CFRange YYTextCFRangeFromNSRange(NSRange range) { /// Returns YES in App Extension. -BOOL YYTextIsAppExtension(); +BOOL YYTextIsAppExtension(void); /// Returns nil in App Extension. -UIApplication * _Nullable YYTextSharedApplication(); +UIApplication * _Nullable YYTextSharedApplication(void); NS_ASSUME_NONNULL_END diff --git a/YYText/Utility/YYTextUtilities.m b/YYText/Utility/YYTextUtilities.m index 11eaefed..d784a416 100644 --- a/YYText/Utility/YYTextUtilities.m +++ b/YYText/Utility/YYTextUtilities.m @@ -13,7 +13,7 @@ #import #import "UIView+YYText.h" -NSCharacterSet *YYTextVerticalFormRotateCharacterSet() { +NSCharacterSet *YYTextVerticalFormRotateCharacterSet(void) { static NSMutableCharacterSet *set; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ @@ -56,7 +56,7 @@ return set; } -NSCharacterSet *YYTextVerticalFormRotateAndMoveCharacterSet() { +NSCharacterSet *YYTextVerticalFormRotateAndMoveCharacterSet(void) { static NSMutableCharacterSet *set; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ @@ -99,7 +99,7 @@ static int matrix_invert(__CLPK_integer N, double *matrix) { return error; } -CGAffineTransform YYTextCGAffineTransformGetFromPoints(CGPoint before[3], CGPoint after[3]) { +CGAffineTransform YYTextCGAffineTransformGetFromPoints(CGPoint before[_Nullable 3], CGPoint after[_Nullable 3]) { if (before == NULL || after == NULL) return CGAffineTransformIdentity; CGPoint p1, p2, p3, q1, q2, q3; @@ -266,7 +266,7 @@ CGRect YYTextCGRectFitWithContentMode(CGRect rect, CGSize size, UIViewContentMod return rect; } -CGFloat YYTextScreenScale() { +CGFloat YYTextScreenScale(void) { static CGFloat scale; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ @@ -275,7 +275,7 @@ CGFloat YYTextScreenScale() { return scale; } -CGSize YYTextScreenSize() { +CGSize YYTextScreenSize(void) { static CGSize size; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ @@ -290,7 +290,7 @@ CGSize YYTextScreenSize() { } -BOOL YYTextIsAppExtension() { +BOOL YYTextIsAppExtension(void) { static BOOL isAppExtension = NO; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ From 0e8c0d3d32174528ef61663cecbb71c208b80a1c Mon Sep 17 00:00:00 2001 From: bird Date: Mon, 15 Apr 2019 19:00:41 +0800 Subject: [PATCH 2/2] Fix warnings --- YYText/YYText.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/YYText/YYText.h b/YYText/YYText.h index 0900d8b9..239066d9 100644 --- a/YYText/YYText.h +++ b/YYText/YYText.h @@ -30,6 +30,14 @@ FOUNDATION_EXPORT const unsigned char YYTextVersionString[]; #import #import #import +#import +#import +#import +#import +#import +#import +#import +#import #else #import "YYLabel.h" #import "YYTextView.h" @@ -47,4 +55,12 @@ FOUNDATION_EXPORT const unsigned char YYTextVersionString[]; #import "NSAttributedString+YYText.h" #import "NSParagraphStyle+YYText.h" #import "UIPasteboard+YYText.h" +#import "YYTextSelectionView.h" +#import "UIView+YYText.h" +#import "YYTextTransaction.h" +#import "YYTextWeakProxy.h" +#import "YYTextAsyncLayer.h" +#import "YYTextMagnifier.h" +#import "YYTextEffectWindow.h" +#import "YYTextContainerView.h" #endif