PTTextSearchToolbarController
@interface PTTextSearchToolbarController : UIViewController <PTTextSearchToolbarDelegate>
- (instancetype)initWithTextSearchManager:(PTTextSearchManager *)textSearchManager NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithNibName:(nullable NSString *)nibName
bundle:(nullable NSBundle *)bundle NS_UNAVAILABLE;
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
/**
* The delegate of this view controller.
*/
@property (nonatomic, weak, nullable) id<PTTextSearchToolbarControllerDelegate> delegate;
/**
* The text search manager used by this view controller.
*/
@property (nonatomic, readonly, strong) PTTextSearchManager *textSearchManager;
#pragma mark - Text search toolbar
/**
* The text search toolbar managed by this view controller.
*
* The delegate of the `PTTextSearchToolbar` is this view controller and should not be changed.
*/
@property (nonatomic, readonly, strong) PTTextSearchToolbar *toolbar;
#pragma mark Visibility
/**
* Whether the `toolbar` is currently hidden or shown.
*
* The default value of this property is `YES`.
*/
@property (nonatomic, assign, getter=isToolbarHidden) BOOL toolbarHidden;
/**
* Sets whether the `toolbar` is currently hidden, optionally animating the change.
*
* @param hidden Specify `YES` to hide the toolbar or `NO` to show it
* @param animated Specify `YES` if you want to animate the change in visibility or `NO` if you want the
* toolbar to appear immediately.
*/
- (void)setToolbarHidden:(BOOL)hidden
animated:(BOOL)animated;
/**
* The duration of the `toolbar`'s animation when shown or hidden.
*
* The default duration is `0.25` seconds.
*/
@property (nonatomic, assign) NSTimeInterval toolbarAnimationDuration;
@end
Undocumented
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithTextSearchManager:(PTTextSearchManager *)textSearchManager NS_DESIGNATED_INITIALIZER;Swift
init(textSearchManager: PTTextSearchManager) -
Undocumented
Declaration
Objective-C
- (instancetype)initWithNibName:(nullable NSString *)nibName bundle:(nullable NSBundle *)bundle NS_UNAVAILABLE; -
Undocumented
Declaration
Objective-C
- (nullable instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE; -
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE; -
Undocumented
Declaration
Objective-C
+ (instancetype)new NS_UNAVAILABLE; -
The delegate of this view controller.
Declaration
Objective-C
@property (nonatomic, weak, nullable) id<PTTextSearchToolbarControllerDelegate> delegate;Swift
weak var delegate: (any PTTextSearchToolbarControllerDelegate)? { get set } -
The text search manager used by this view controller.
Declaration
Objective-C
@property (nonatomic, strong, readonly) PTTextSearchManager *_Nonnull textSearchManager;Swift
var textSearchManager: PTTextSearchManager { get }
-
The text search toolbar managed by this view controller.
The delegate of the
PTTextSearchToolbaris this view controller and should not be changed.Declaration
Objective-C
@property (nonatomic, strong, readonly) PTTextSearchToolbar *_Nonnull toolbar;Swift
var toolbar: PTTextSearchToolbar { get }
-
Whether the
toolbaris currently hidden or shown.The default value of this property is
YES.Declaration
Objective-C
@property (nonatomic, assign, unsafe_unretained, readwrite, getter=isToolbarHidden) BOOL toolbarHidden;Swift
var isToolbarHidden: Bool { get set } -
Sets whether the
toolbaris currently hidden, optionally animating the change.Declaration
Objective-C
- (void)setToolbarHidden:(BOOL)hidden animated:(BOOL)animated;Swift
func setToolbarHidden(_ hidden: Bool, animated: Bool)Parameters
hiddenSpecify
YESto hide the toolbar orNOto show itanimatedSpecify
YESif you want to animate the change in visibility orNOif you want the toolbar to appear immediately. -
The duration of the
toolbar‘s animation when shown or hidden.The default duration is
0.25seconds.Declaration
Objective-C
@property (nonatomic) NSTimeInterval toolbarAnimationDuration;Swift
var toolbarAnimationDuration: TimeInterval { get set }
PTTextSearchToolbarController Class Reference