11/*
2- Version 0.1.7
2+ Version 0.1.8
33
44 WYPopoverController is available under the MIT license.
55
3030@protocol WYPopoverControllerDelegate;
3131
3232#ifndef WY_POPOVER_DEFAULT_ANIMATION_DURATION
33- #define WY_POPOVER_DEFAULT_ANIMATION_DURATION .20f
33+ #define WY_POPOVER_DEFAULT_ANIMATION_DURATION .25f
34+ #endif
35+
36+ #ifndef WY_POPOVER_MIN_SIZE
37+ #define WY_POPOVER_MIN_SIZE CGSizeMake (200 , 100 )
3438#endif
3539
3640typedef NS_OPTIONS (NSUInteger , WYPopoverArrowDirection) {
@@ -88,19 +92,22 @@ typedef NS_OPTIONS(NSUInteger, WYPopoverAnimationOptions) {
8892
8993// //////////////////////////////////////////////////////////////////////////////////////////////////////
9094
91- @interface WYPopoverController : NSObject
95+ @interface WYPopoverController : NSObject <UIAppearanceContainer>
9296
9397@property (nonatomic , weak ) id <WYPopoverControllerDelegate> delegate;
9498
95- @property (nonatomic , copy ) NSArray *passthroughViews;
96- @property (nonatomic , assign ) BOOL wantsDefaultContentAppearance;
97- @property (nonatomic , assign ) UIEdgeInsets popoverLayoutMargins;
98- @property (nonatomic , assign , readonly , getter = isPopoverVisible) BOOL popoverVisible;
99- @property (nonatomic , strong , readonly ) UIViewController* contentViewController;
100- @property (nonatomic , assign ) CGSize popoverContentSize;
99+ @property (nonatomic , copy ) NSArray *passthroughViews;
100+ @property (nonatomic , assign ) BOOL wantsDefaultContentAppearance;
101+ @property (nonatomic , assign ) UIEdgeInsets popoverLayoutMargins;
102+ @property (nonatomic , assign , readonly , getter =isPopoverVisible) BOOL popoverVisible;
103+ @property (nonatomic , strong , readonly ) UIViewController *contentViewController;
104+ @property (nonatomic , assign ) CGSize popoverContentSize;
105+ @property (nonatomic , assign ) CGFloat animationDuration;
101106
102107- (id )initWithContentViewController : (UIViewController *)viewController ;
103108
109+ //
110+
104111- (void )presentPopoverFromRect : (CGRect)rect
105112 inView : (UIView *)view
106113 permittedArrowDirections : (WYPopoverArrowDirection)arrowDirections
@@ -112,11 +119,13 @@ typedef NS_OPTIONS(NSUInteger, WYPopoverAnimationOptions) {
112119
113120- (void )presentPopoverAsDialogAnimated : (BOOL )animated ;
114121
115- - (void )presentPopoverFromRect : (CGRect)aRect
116- inView : (UIView *)aView
122+ //
123+
124+ - (void )presentPopoverFromRect : (CGRect)rect
125+ inView : (UIView *)view
117126 permittedArrowDirections : (WYPopoverArrowDirection)arrowDirections
118- animated : (BOOL )aAnimated
119- options : (WYPopoverAnimationOptions)aOptions ;
127+ animated : (BOOL )animated
128+ options : (WYPopoverAnimationOptions)options ;
120129
121130- (void )presentPopoverFromRect : (CGRect)rect
122131 inView : (UIView *)view
@@ -125,6 +134,7 @@ typedef NS_OPTIONS(NSUInteger, WYPopoverAnimationOptions) {
125134 options : (WYPopoverAnimationOptions)options
126135 completion : (void (^)(void ))completion ;
127136
137+
128138- (void )presentPopoverFromBarButtonItem : (UIBarButtonItem *)item
129139 permittedArrowDirections : (WYPopoverArrowDirection)arrowDirections
130140 animated : (BOOL )animated
@@ -133,6 +143,8 @@ typedef NS_OPTIONS(NSUInteger, WYPopoverAnimationOptions) {
133143- (void )presentPopoverAsDialogAnimated : (BOOL )animated
134144 options : (WYPopoverAnimationOptions)options ;
135145
146+ //
147+
136148- (void )dismissPopoverAnimated : (BOOL )animated ;
137149
138150@end
@@ -146,6 +158,6 @@ typedef NS_OPTIONS(NSUInteger, WYPopoverAnimationOptions) {
146158
147159- (void )popoverControllerDidDismissPopover : (WYPopoverController *)popoverController ;
148160
149- - (void )popoverController : (WYPopoverController *)popoverController willRepositionPopoverToRect : (inout CGRect *)rect inView : (inout UIView * __autoreleasing *)view ;
161+ - (void )popoverController : (WYPopoverController *)popoverController willRepositionPopoverToRect : (inout CGRect *)rect inView : (inout UIView **)view ;
150162
151163@end
0 commit comments