1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // YYTextEffectWindow.h
- // YYKit <https://github.com/ibireme/YYKit>
- //
- // Created by ibireme on 15/2/25.
- // 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>
- #if __has_include(<YYKit/YYKit.h>)
- #import <YYKit/YYTextMagnifier.h>
- #import <YYKit/YYTextSelectionView.h>
- #else
- #import "YYTextMagnifier.h"
- #import "YYTextSelectionView.h"
- #endif
- NS_ASSUME_NONNULL_BEGIN
- /**
- A window to display magnifier and extra contents for text view.
-
- @discussion Use `sharedWindow` to get the instance, don't create your own instance.
- Typically, you should not use this class directly.
- */
- @interface YYTextEffectWindow : UIWindow
- /// Returns the shared instance (returns nil in App Extension).
- + (nullable instancetype)sharedWindow;
- /// Show the magnifier in this window with a 'popup' animation. @param mag A magnifier.
- - (void)showMagnifier:(YYTextMagnifier *)mag;
- /// Update the magnifier content and position. @param mag A magnifier.
- - (void)moveMagnifier:(YYTextMagnifier *)mag;
- /// Remove the magnifier from this window with a 'shrink' animation. @param mag A magnifier.
- - (void)hideMagnifier:(YYTextMagnifier *)mag;
- /// Show the selection dot in this window if the dot is clipped by the selection view.
- /// @param selection A selection view.
- - (void)showSelectionDot:(YYTextSelectionView *)selection;
- /// Remove the selection dot from this window.
- /// @param selection A selection view.
- - (void)hideSelectionDot:(YYTextSelectionView *)selection;
- @end
- NS_ASSUME_NONNULL_END
|