{"id":21373998,"url":"https://github.com/itenfay/DYFToast","last_synced_at":"2025-07-13T08:31:57.042Z","repository":{"id":56908107,"uuid":"199883909","full_name":"itenfay/DYFToast","owner":"itenfay","description":"采用链式编程和点语法操作，实现 iOS 仿真安卓吐司提示框。(Using chain programming and point syntax operation to realize the simulation of Android's Toast in iOS.)","archived":false,"fork":false,"pushed_at":"2024-05-13T07:19:58.000Z","size":1758,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-02T10:13:52.412Z","etag":null,"topics":["block","chain-programming","cocoapods","ios","ios-toast","objective-c","point-syntax-operation","toast"],"latest_commit_sha":null,"homepage":"https://www.jianshu.com/p/956414babc5e","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/itenfay.png","metadata":{"files":{"readme":"README-en.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-31T15:35:28.000Z","updated_at":"2024-06-02T10:13:56.215Z","dependencies_parsed_at":"2022-08-21T03:50:20.980Z","dependency_job_id":"f1ecf69e-7e01-4b93-8c27-983787d5c7d3","html_url":"https://github.com/itenfay/DYFToast","commit_stats":null,"previous_names":["dgynfi/dyftoast","itenfay/dyftoast"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2FDYFToast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2FDYFToast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2FDYFToast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itenfay%2FDYFToast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itenfay","download_url":"https://codeload.github.com/itenfay/DYFToast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225868407,"owners_count":17537026,"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","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":["block","chain-programming","cocoapods","ios","ios-toast","objective-c","point-syntax-operation","toast"],"created_at":"2024-11-22T08:29:38.046Z","updated_at":"2024-11-22T08:30:02.607Z","avatar_url":"https://github.com/itenfay.png","language":"Objective-C","funding_links":[],"categories":["OOM-Leaks-Crash"],"sub_categories":["Toast"],"readme":"\u003cdiv align=center\u003e\n\u003cimg src=\"https://github.com/itenfay/DYFToast/raw/master/images/DYFToast.png\" width=\"60%\"\u003e\n\u003c/div\u003e\n\n[中文版](README.md) | **English Version**\n\n## DYFToast\n\nUsing chain programming and point syntax operation to realize the simulation of Android's Toast in iOS.\n\n[![License MIT](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](LICENSE)\u0026nbsp;\n[![CocoaPods](http://img.shields.io/cocoapods/v/DYFToast.svg?style=flat)](http://cocoapods.org/pods/DYFToast)\u0026nbsp;\n![CocoaPods](http://img.shields.io/cocoapods/p/DYFToast.svg?style=flat)\u0026nbsp;\n\n## Group (ID:614799921)\n\n\u003cdiv align=left\u003e\n\u0026emsp; \u003cimg src=\"https://github.com/itenfay/DYFToast/raw/master/images/g614799921.jpg\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n## Installation\n\nUsing [CocoaPods](https://cocoapods.org):\n\n```\npod 'DYFToast'\n```\n\nOr\n\n```\npod 'DYFToast', '~\u003e 2.1.1'\n```\n\n## Preview\n\n\u003cdiv align=left\u003e\n\u0026emsp; \u003cimg src=\"https://github.com/itenfay/DYFToast/raw/master/images/ToastPreview.gif\" width=\"30%\" /\u003e\n\u003c/div\u003e\n\n\u003e If this can help you, please give it a `stat`. Thanks!\n\n## Usage\n\n- Show toast with default settings\n\n```\n- (IBAction)defaultAction:(id)sender {\n    Toast().makeText(self.view, \"无效的验证码\", ToastDuration.LENGTH_SHORT).show();\n}\n```\n\n- Set gravity\n\n```\n- (IBAction)setGravityAction:(id)sender {\n    static int i = 0;\n\n    GravityType type = Gravity.TOP_EDGE;\n    char *message = \"网络连接超时，请重试\";\n    if (i == 0) {\n        type = Gravity.TOP_EDGE;\n        message = \"网络连接超时，请重试\";\n    } else if (i == 1) {\n        type = Gravity.TOP;\n        message = \"请求失败\";\n    } else if (i == 2) {\n        type = Gravity.CENTER;\n        message = \"清理完成\";\n    } else if (i == 3) {\n        type = Gravity.BOTTOM;\n        message = \"请输入用户名\";\n    }\n\n    i++;\n    if (i \u003e= 4) { i = 0; }\n\n    UIView *inView = self.navigationController.view;\n    Toast().makeText(inView, message, ToastDuration.LENGTH_LONG)\n    .setGravity(type)\n    .show();\n}\n```\n\n- Set background and text color\n\n```\n- (IBAction)setColorAction:(id)sender {\n    UIColor *bgColor   = [UIColor colorWithRed:120/255.0 green:210/255.0 blue:251/255.0 alpha:0.9];\n    UIColor *textColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:255/255.0 alpha:1.0];\n    char *message = \"Wrong username and password\";\n    Toast().makeText(self.view, message, ToastDuration.LENGTH_LONG)\n    .setGravity(Gravity.BOTTOM)\n    .setColor(bgColor, textColor)\n    .show();\n}\n```\n\n- Set corner with radius\n\n```\n- (IBAction)setCornerAction:(id)sender {\n    char *message = \"Please input email\";\n    Toast().makeText(self.view, message, ToastDuration.LENGTH_LONG)\n    .setGravity(Gravity.BOTTOM)\n    .setCorner(20)\n    .show();\n}\n```\n\n- Set border with the width and color of line\n\n```\n- (IBAction)setBorderAction:(id)sender {\n    char *message = \"手机号码格式不正确，请重输入\";\n    Toast().makeText(self.view, message, ToastDuration.LENGTH_LONGER)\n    .setGravity(Gravity.BOTTOM)\n    .setBorder(UIColor.orangeColor, 3)\n    .show();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitenfay%2FDYFToast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitenfay%2FDYFToast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitenfay%2FDYFToast/lists"}