Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS 7 style popover #111

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion FPPopover.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'FPPopover'
s.version = '1.4.1'
s.version = '2.0.11'
s.license = 'BSD'
s.summary = 'Alternative to the native iOS UIPopoverController, with iPhone support and look and feel customization.'

Expand Down
16 changes: 6 additions & 10 deletions FPPopoverController.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,21 @@


@class FPPopoverController;

@protocol FPPopoverControllerDelegate <NSObject>

@optional
- (void)popoverControllerDidDismissPopover:(FPPopoverController *)popoverController;
- (void)presentedNewPopoverController:(FPPopoverController *)newPopoverController
- (void)presentedNewPopoverController:(FPPopoverController *)newPopoverController
shouldDismissVisiblePopover:(FPPopoverController*)visiblePopoverController;
@end

@interface FPPopoverController : UIViewController
{
UIView *_parentView;
}

//ARC-enable and disable support
#if __has_feature(objc_arc)
@property(nonatomic,weak) id<FPPopoverControllerDelegate> delegate;
@property(nonatomic,weak) id<FPPopoverControllerDelegate> delegate;
#else
@property(nonatomic,assign) id<FPPopoverControllerDelegate> delegate;
@property(nonatomic,assign) id<FPPopoverControllerDelegate> delegate;
#endif

/** @brief FPPopoverArrowDirectionAny, FPPopoverArrowDirectionVertical or FPPopoverArrowDirectionHorizontal for automatic arrow direction.
Expand All @@ -59,7 +56,7 @@
**/
-(id)initWithViewController:(UIViewController*)viewController;
-(id)initWithViewController:(UIViewController*)viewController
delegate:(id<FPPopoverControllerDelegate>)delegate;
delegate:(id<FPPopoverControllerDelegate>)delegate;

/** @brief Presenting the popover from a specified view **/
-(void)presentPopoverFromView:(UIView*)fromView;
Expand All @@ -77,8 +74,7 @@ typedef void (^FPPopoverCompletion)();
/** @brief Hide the shadows to get better performances **/
-(void)setShadowsHidden:(BOOL)hidden;

/** @brief Refresh popover **/
-(void)setupView;
- (void)setHeight:(double)contentHeight;


@end
Loading