/YCPopover

a popover from bottom or center,you just need define a viewcontroller.

Primary LanguageObjective-CMIT LicenseMIT

YCPopover

a popover from bottom or center,you just need define a viewcontroller.

image

Usage

Method1: using Cocoapods:

pod 'YCPopover'

then

#import <UIViewController+YCPopover.h>

Method2: moving YCPopoverCompontfolder into your project.

then

#import <UIViewController+YCPopover.h>

Example

you just need define a viewcontroller(eg. PopoverViewController) , there are two kinds of styles,ActionSheet or Alert. you just to write a line to show.

①ActionSheet
PopoverViewController *vc = [PopoverViewController new];
[self yc_centerPresentController:vc presentedSize:CGSizeMake(200, 300) completeHandle:^(BOOL presented) {
  if (presented) {
    NSLog(@"弹出了");
  }else{
    NSLog(@"消失了");
  }
}];
②Alert
PopoverViewController *vc = [PopoverViewController new];
[self yc_bottomPresentController:vc presentedHeight:220 completeHandle:^(BOOL presented) {
  if (presented) {
    NSLog(@"弹出了");
  }else{
    NSLog(@"消失了");
  }
}];