an-ttt / TTTPresentView

PresentView like jianshu JD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TTTPresentView

image

PresentView like jianshu JD two steps:

1. 
#import "UIViewController+TTTPresentView.h"

  [self TTTPresentViewController:toPresentVC percentToShow:0.5];

2.
#import "TTTPresentContainerView.h"
- (IBAction)dismissView:(UIButton *)sender
{
    
    TTTPresentContainerView *containerVC = (TTTPresentContainerView *)self.view.superview;
    
    NSAssert(containerVC && [containerVC isKindOfClass:[TTTPresentContainerView class]], @"TTTPresentContainerView *containerVC = ((UIView *)self).superview should not nil");
    
    [containerVC dismissView];
}

see more in demo.

About

PresentView like jianshu JD


Languages

Language:Objective-C 100.0%