forked from werner77/WEPopover
-
Notifications
You must be signed in to change notification settings - Fork 1
/
WEPopoverController.h
executable file
·68 lines (53 loc) · 2.28 KB
/
WEPopoverController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// WEPopoverController.h
// WEPopover
//
// Created by Werner Altewischer on 02/09/10.
// Copyright 2010 Werner IT Consultancy. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "WEPopoverContainerView.h"
#import "WETouchableView.h"
@class WEPopoverController;
@protocol WEPopoverControllerDelegate<NSObject>
@optional
- (void)popoverControllerDidDismissPopover:(WEPopoverController *)popoverController;
- (BOOL)popoverControllerShouldDismissPopover:(WEPopoverController *)popoverController;
@end
/**
* @brief Popover controller for the iPhone, mimicing the iPad UIPopoverController interface. See that class for more details.
*/
@interface WEPopoverController : NSObject<WETouchableViewDelegate> {
UIViewController *contentViewController;
UIView *__weak view;
WETouchableView *backgroundView;
BOOL popoverVisible;
UIPopoverArrowDirection popoverArrowDirection;
id <WEPopoverControllerDelegate> __unsafe_unretained delegate;
CGSize popoverContentSize;
WEPopoverContainerViewProperties *containerViewProperties;
id <NSObject> context;
NSArray *passthroughViews;
}
@property(nonatomic) UIViewController *contentViewController;
@property (weak, nonatomic, readonly) UIView *view;
@property (nonatomic, readonly, getter=isPopoverVisible) BOOL popoverVisible;
@property (nonatomic, readonly) UIPopoverArrowDirection popoverArrowDirection;
@property (nonatomic, unsafe_unretained) id <WEPopoverControllerDelegate> delegate;
@property (nonatomic, assign) CGSize popoverContentSize;
@property (nonatomic) WEPopoverContainerViewProperties *containerViewProperties;
@property (nonatomic) id <NSObject> context;
@property (nonatomic, copy) NSArray *passthroughViews;
- (id)initWithContentViewController:(UIViewController *)theContentViewController;
- (void)dismissPopoverAnimated:(BOOL)animated;
- (void)presentPopoverFromBarButtonItem:(UIBarButtonItem *)item
permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections
animated:(BOOL)animated;
- (void)presentPopoverFromRect:(CGRect)rect
inView:(UIView *)view
permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections
animated:(BOOL)animated;
- (void)repositionPopoverFromRect:(CGRect)rect
inView:(UIView *)view
permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections;
@end