3 Star 1 Fork 0

Gitee 极速下载 / TSActionAlertView2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/TsnumiDC/TSActionAlertView
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

TSActionAlertView

介绍: TSActionAlertView 是用Objective-C实现的一个弹窗

2018.4.14 增加了cocoapod的支持,可以直接用 TSActionAlertView来添加到项目中

1. 弹窗背景有两种 TSActionAlertViewBackgroundStyle

TSActionAlertViewBackgroundStyle 说明
TSActionAlertViewBackgroundStyleSolid 背景半透明
TSActionAlertViewBackgroundStyleGradient 背景渐变

2. 弹窗的出现动画有五种 TSActionAlertViewTransitionStyle

TSActionAlertViewTransitionStyle 说明
TSActionAlertViewTransitionStyleSlideFromBottom 上来,然后下去
TSActionAlertViewTransitionStyleFade 渐变
TSActionAlertViewTransitionStyleBounce 弹出
TSActionAlertViewTransitionStyleDropDown 下落
TSActionAlertViewTransitionStyleSlideFromTop 下滑,然后上去

效果: 效果图加载中...

3. 弹窗的用法

1. 继承 TSActionAlertView
2. 实现添加自定义控件
@interface TSActionDemoView()

@property (strong,nonatomic)UIButton * headerBtn;//头部视图
@property (strong,nonatomic)UITextField * inputField;//输入框
@property (strong,nonatomic)UIButton * sureBtn;//确定按钮
@property (strong,nonatomic)UIButton * cancelBtn;//取消按钮

@end
3. 懒加载子控件
4. 给控件添加事件,可以借助提供的handler,也可以自己写
@property (strong,nonatomic)TSActionAlertViewStringHandler stringHandler;
5. 实现继承的以下方法
 - (void)layoutContainerView{
//布局containerview的位置,就是那个看得到的视图
}

- (void)setupContainerViewAttributes{
//设置containerview的属性,比如切边啥的
}

- (void)setupContainerSubViews{
//给containerview添加子视图
}

- (void)layoutContainerViewSubViews{
//设置子视图的frame
}

4. 弹窗的调用和隐藏

    TSActionDemoView * demoAlertView  = [TSActionDemoView actionAlertViewWithAnimationStyle:TSActionAlertViewTransitionStyleSlideFromTop];
    [demoAlertView show];
    
    [demoAlertView dismissAnimated:YES];

5. 其他功能

代理的使用:定义了代理来在视图的出现,消失的时候进行一些回调 点击背景自动隐藏: 设置属性 isAutoHidden=YES

遵循协议:TSActionAlertViewDelegate

- (void)actionAlertViewWillShow;//即将出现
- (void)actionAlertViewDidShow;//已经出现
- (void)actionAlertViewWillDismiss;//即将消失
- (void)actionAlertViewDidDismiss;//已经消失
- (void)actionAlertViewDidSelectBackGroundView;//点击了背景

具体效果请看demo 更多用法: 简书文章地址 效果实例 只是一些参考效果,丑是没办法的...

1. 正常弹窗

正常弹窗

2. 输入弹窗

正常弹窗

3. web弹窗

正常弹窗

4. 下拉列表选项弹窗

正常弹窗

5. 跳转弹窗

正常弹窗

空文件

简介

万能弹窗,有了它,所有的弹窗都像view一样简单,可以用于所有带灰色蒙层的地方 在开发中我们总是遇到使用各种各样的弹窗的情况,有的用作提示,有的用作功能,弹窗种类很多 他们的共同之 展开 收起
Objective-C 等 2 种语言
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors/TSActionAlertView2.git
git@gitee.com:mirrors/TSActionAlertView2.git
mirrors
TSActionAlertView2
TSActionAlertView2
master

搜索帮助