Latest 1.0.1
Homepage https://github.com/jiangtiteng/TTModalView
License MIT
Platforms ios 6.0, requires ARC
Dependencies TTAnimations
Authors

TTModalView是一个自定义内容的模态窗口组件,可以任意定制窗口的内容,支持frame,autolayout等方式定位,支持定制modal层的大小以及窗口层次,支持50多种窗口弹出效果.灵活的设计能满足大部分弹出窗口的需求

Demo

TTModalView

Basic Usage

  1. pod ‘TTModalView’
  2. import TTModalView/TTModalView.h

  3. api介绍
    初始化方法

    TTModalView *     _modalView = [[TTModalView alloc] initWithContentView:nil delegate:nil];
     TTModalView *  _modalView.modalWindowFrame = CGRectMake(0,0,self.view.bounds.size.width, self.view.bounds.size.height);
    _modalView.modalWindowLevel = UIWindowLevelNormal;

    设置弹入弹出的动画样式

      _modalView.presentAnimationStyle = SlideInUp;
     _modalView.dismissAnimationStyle = SlideOutDown;
    

    展示,在展示方法中灵活定位content位置

     [_modalView showWithDidAddContentBlock:^(UIView *contentView) {           
                    [contentView mas_makeConstraints:^(MASConstraintMaker *make) {
                            make.left.trailing.equalTo(contentView.superview);
                            make.bottom.equalTo(contentView.superview);
                            make.height.equalTo(@220);
                    }];
            }];
    

    消失

    [_modalView dismiss];

    指定消失时候的动画样式

    [_modalView dismissWithDismissBlock:^{
    
    } dismissAnimationStyle:SlideOutDown];  

    另外支持设置动画时间,完成时候移除,modal位置详见demo

    License

    TTAnimation is licensed under the MIT license. (http://opensource.org/licenses/MIT)

Latest podspec

{
    "name": "TTModalView",
    "license": "MIT",
    "version": "1.0.1",
    "summary": "A modalview in Ios",
    "description": "A modalview in Ios,support custom content and present,dismiss animationstyle",
    "homepage": "https://github.com/jiangtiteng/TTModalView",
    "authors": {
        "titeng.jiang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/jiangtiteng/TTModalView.git",
        "tag": "1.0.1"
    },
    "public_header_files": "TTModalView/*.h",
    "source_files": "TTModalView/*.{h,m}",
    "requires_arc": true,
    "dependencies": {
        "TTAnimations": []
    },
    "platforms": {
        "ios": "6.0"
    }
}

Pin It on Pinterest

Share This