From 7b02207537d35bfa1714bf8beafc921f717d100a Mon Sep 17 00:00:00 2001 From: 单军华 Date: Wed, 11 Jul 2018 10:47:42 +0800 Subject: [PATCH] 首次上传 --- screendisplay/Pods/YYText/YYText/Utility/UIView+YYText.h | 72 ++++++++++++++++++++++++++++++++++++ 1 files changed, 72 insertions(+), 0 deletions(-) diff --git a/screendisplay/Pods/YYText/YYText/Utility/UIView+YYText.h b/screendisplay/Pods/YYText/YYText/Utility/UIView+YYText.h new file mode 100755 index 0000000..9472834 --- /dev/null +++ b/screendisplay/Pods/YYText/YYText/Utility/UIView+YYText.h @@ -0,0 +1,72 @@ +// +// UIView+YYText.h +// YYText <https://github.com/ibireme/YYText> +// +// Created by ibireme on 13/4/3. +// Copyright (c) 2015 ibireme. +// +// This source code is licensed under the MIT-style license found in the +// LICENSE file in the root directory of this source tree. +// + +#import <UIKit/UIKit.h> + +NS_ASSUME_NONNULL_BEGIN + +/** + Provides extensions for `UIView`. + */ +@interface UIView (YYText) + +/** + Returns the view's view controller (may be nil). + */ +@property (nullable, nonatomic, readonly) UIViewController *yy_viewController; + +/** + Returns the visible alpha on screen, taking into account superview and window. + */ +@property (nonatomic, readonly) CGFloat yy_visibleAlpha; + +/** + Converts a point from the receiver's coordinate system to that of the specified view or window. + + @param point A point specified in the local coordinate system (bounds) of the receiver. + @param view The view or window into whose coordinate system point is to be converted. + If view is nil, this method instead converts to window base coordinates. + @return The point converted to the coordinate system of view. + */ +- (CGPoint)yy_convertPoint:(CGPoint)point toViewOrWindow:(UIView *)view; + +/** + Converts a point from the coordinate system of a given view or window to that of the receiver. + + @param point A point specified in the local coordinate system (bounds) of view. + @param view The view or window with point in its coordinate system. + If view is nil, this method instead converts from window base coordinates. + @return The point converted to the local coordinate system (bounds) of the receiver. + */ +- (CGPoint)yy_convertPoint:(CGPoint)point fromViewOrWindow:(UIView *)view; + +/** + Converts a rectangle from the receiver's coordinate system to that of another view or window. + + @param rect A rectangle specified in the local coordinate system (bounds) of the receiver. + @param view The view or window that is the target of the conversion operation. If view is nil, this method instead converts to window base coordinates. + @return The converted rectangle. + */ +- (CGRect)yy_convertRect:(CGRect)rect toViewOrWindow:(UIView *)view; + +/** + Converts a rectangle from the coordinate system of another view or window to that of the receiver. + + @param rect A rectangle specified in the local coordinate system (bounds) of view. + @param view The view or window with rect in its coordinate system. + If view is nil, this method instead converts from window base coordinates. + @return The converted rectangle. + */ +- (CGRect)yy_convertRect:(CGRect)rect fromViewOrWindow:(UIView *)view; + +@end + +NS_ASSUME_NONNULL_END -- Gitblit v1.8.0