{"id":13990214,"url":"https://github.com/shmxybfq/TFPopup","last_synced_at":"2025-07-22T12:31:22.048Z","repository":{"id":48303798,"uuid":"165611154","full_name":"shmxybfq/TFPopup","owner":"shmxybfq","description":"🚀🚀🚀TFPopup不生产弹框,它只是弹框的弹出工🚀🚀🚀默认支持多种动画方式一行调用,支持完全自定义动画.","archived":false,"fork":false,"pushed_at":"2022-08-18T02:51:26.000Z","size":29856,"stargazers_count":247,"open_issues_count":17,"forks_count":31,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-18T02:01:19.812Z","etag":null,"topics":["actionsheet","alert","loading","pop","popup","sheet","tfpopup","toast","xpopup"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shmxybfq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-14T06:56:42.000Z","updated_at":"2025-06-12T13:19:03.000Z","dependencies_parsed_at":"2022-07-24T23:46:31.984Z","dependency_job_id":null,"html_url":"https://github.com/shmxybfq/TFPopup","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/shmxybfq/TFPopup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmxybfq%2FTFPopup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmxybfq%2FTFPopup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmxybfq%2FTFPopup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmxybfq%2FTFPopup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shmxybfq","download_url":"https://codeload.github.com/shmxybfq/TFPopup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shmxybfq%2FTFPopup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266495962,"owners_count":23938634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actionsheet","alert","loading","pop","popup","sheet","tfpopup","toast","xpopup"],"created_at":"2024-08-09T13:02:28.233Z","updated_at":"2025-07-22T12:31:17.013Z","avatar_url":"https://github.com/shmxybfq.png","language":"Objective-C","funding_links":[],"categories":["Objective-C"],"sub_categories":[],"readme":"# TFPopup\n\n[![License MIT](https://img.shields.io/badge/License-MIT-orange)]()\u0026nbsp;\n[![Platform iOS](https://img.shields.io/badge/platform-iOS-grayblue)]()\u0026nbsp;\n[![Pod 1.2.0](https://img.shields.io/badge/pod-1.2.0-blue)]()\u0026nbsp;\n\n### 中文版 | [English](https://github.com/shmxybfq/TFPopup/blob/master/README_EN.md)\n\n**🚀🚀🚀不耦合view代码,可以为已创建过 / 未创建过的view添加弹出方式;\n\u003cbr\u003e🚀🚀🚀TFPopup不是弹框,它只是一种弹出方式;**\n\u003cbr\u003e使用TFPopup做弹框会让你的弹框变的异常简单:\n\u003cbr\u003e1.已经有一个view。\n\u003cbr\u003e2.用喜欢的方式将它弹出来。\u003cbr\u003e\n\n## 注意\n文档包含大量gif图片,可能加载较慢\u003cbr\u003e\n项目分别包含Swift 和 OC Demo\n\n## 特点\n- 和view代码不耦合\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;你可以将一个新的/已存在的view调用弹出方法将他弹出来\n- 默认支持多种弹出方式\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;无动画覆盖  /  缩放弹出  /  滑动弹出  /  基于某点的泡泡方式弹出  /  基于frame变化的弹出  /  基于于遮罩的遮罩弹出  /  折叠弹出\n- 在弹出方式基础上可以通过**调节参数**来调整**弹出效果**\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**拖动：** 开启/关闭拖动  /  是否开启拖动弹性效果  /  设置拖动松手后自动消失距离\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**拖动方式：** 自由模式下弹框可全方向拖动,松手后触发消失  /  组合模式下可自由组合上下左右四个方向进行方向识别\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**时间调整：** 动画时间  /  动画延迟开始时间/动画延迟消失时间  /  弹框自动消失时间\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**时间曲线：** 通过UIViewAnimationOptions设置动画时间曲线\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**弹出背景：** 是否使用背景  /  调整背景颜色  /  背景色透明  /  背景点击事件及默认自动点击消失  /  背景显示、消失透明度动画\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**渐隐和位置：** 弹出渐隐  /  消失渐隐  /  弹出位置变化  /  消失位置变化\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**尺寸和位置：** 弹出区域计算尺寸设置  /  弹框尺寸  /  位置偏移量  /  初始位置  /  目标位置  /  是否始终保持原位置\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**属性动画：** 可分别设置显示、消失时的属性动画,只需要设置属性:属性值、初始值、结束值即可使用丰富的属性动画效果\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**泡泡：** 泡泡基准点  /  泡泡八个弹出方向\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**mask：** 可分别设置显示、消失时的mask,只需要设置属性:mask初始path、mask结束path即可\u003cbr\u003e\n- 保留弹出全过程接口，支持完全自定义弹出方式、动画、和背景\u003cbr\u003e\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**TFPopupDataSource**此代理包含弹出动画需要的各种参数配置，在动画开始后会依次被调用\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**TFPopupBackgroundDelegate**同TFPopupDataSource一样，可通过实现一个或多个方法来截断和修改弹出过程以实现完全自定义背景和背景动画\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;**TFPopupDelegate**代理包含整个弹出过程事件，TFPopup使view本身实现此代理来封装以上动画效果的组合和弹出，你可以在弹框类中\n\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;重写一个或多个方法来截断和修改弹出过程以实现完全自定义动画效果\n\n\n## 弹出效果图示例\n\n**拖动**\n___\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/drag1.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/drag2.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/drag3.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/drag0.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/drag4.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n**自定义动画效果**\n___\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/cus-6.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/cus-2.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/cus-3.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/cus-4.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/cus-5.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/cus-1.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n**默认动画效果**\n\n___\n\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/exa1.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/exa2.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/exa3.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/exa4.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/exa5.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/exa6.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003c/div\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/exa7.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/exa8.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/exa9.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n**基于默认动画效果的参数自由组合**\n\n___\n\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/nor-bubble.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/nor-mask.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFProductResource/blob/master/TFPopup-Example/nor-slide.gif\" width=\"30%\" height=\"30%\"\u003e\n\u003c/div\u003e\n\n\n## 使用\n图片加载较慢请耐心等待或在项目目录中查找使用截图资源\n\u003cbr/\u003e\n\n### 普通用法\n不设置TFPopupParam\n\u003cbr/\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFPopup/blob/master/Example/TFPopupOperatingInstruction.png\" width=\"100%\" height=\"100%\"\u003e\n\u003c/div\u003e\n\n### 高级用法\n通过设置TFPopupParam修改弹出方式和动画等\n\u003cbr/\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFPopup/blob/master/Example/TFPopupParam.png\" width=\"100%\" height=\"100%\"\u003e\n\u003c/div\u003e\n\n### 自定义用法\n通过在view上重写TFPopupDataSource 和 TFPopupBackgroundDelegate 的一个或多个方法来实现你想要的效果\n\u003cbr/\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFPopup/blob/master/Example/delegateAndDatasource.png\" width=\"100%\" height=\"100%\"\u003e\n\u003c/div\u003e\n\n## 自定义用法请注意！！！\n下图此属性TFPopupExtension是弹框view整个弹框过程中保存内部属性的一个model,所有和弹框过程相关的属性都在这里\n\u003cbr/\u003e\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFPopup/blob/master/Example/UIView+TFPopup.png\" width=\"100%\" height=\"100%\"\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\nTFPopupExtension model详情\n\u003cdiv\u003e\n\u003cimg src=\"https://github.com/shmxybfq/TFPopup/blob/master/Example/TFPopupExtension.png\" width=\"100%\" height=\"100%\"\u003e\n\u003c/div\u003e\n\n\n## 使用补充\n##### 以上方式简单描述了使用方法,具体效果和使用请参照demo !\n##### 此框架会一直更新维护【转行除外】请放心使用。\n\n## 安装\n```\npod 'TFPopup'\n```\n\n## 如果\n使用过程中有bug或不足，请随时issues我或者联系我；\u003cbr\u003e\n现有功能满足不了你的需求，请随时issues我或者联系我；\u003cbr\u003e\n有更好的建议或者优化，请随时issues我或者联系我；\u003cbr\u003e\nQQ:927141965;\u003cbr\u003e\n邮箱shmxybfq@163.com;\u003cbr\u003e\n\n\n\n        \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshmxybfq%2FTFPopup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshmxybfq%2FTFPopup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshmxybfq%2FTFPopup/lists"}