{"id":2448,"url":"https://github.com/status302/NoticeBar","last_synced_at":"2025-08-03T00:30:48.867Z","repository":{"id":62449106,"uuid":"76107835","full_name":"status302/NoticeBar","owner":"status302","description":"😍A simple NoticeBar written by Swift 3, similar with QQ notice view.","archived":false,"fork":false,"pushed_at":"2018-04-17T02:51:26.000Z","size":458,"stargazers_count":233,"open_issues_count":3,"forks_count":33,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-05-29T04:51:52.605Z","etag":null,"topics":["ios","ios-swift","ios-thirdparty","ios-ui","qq-notice","swift"],"latest_commit_sha":null,"homepage":"https://vsccw.com","language":"Swift","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/status302.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":"2016-12-10T11:15:21.000Z","updated_at":"2023-06-07T13:21:10.000Z","dependencies_parsed_at":"2022-11-01T23:17:24.721Z","dependency_job_id":null,"html_url":"https://github.com/status302/NoticeBar","commit_stats":null,"previous_names":["qiuncheng/noticebar"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status302%2FNoticeBar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status302%2FNoticeBar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status302%2FNoticeBar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status302%2FNoticeBar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/status302","download_url":"https://codeload.github.com/status302/NoticeBar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503226,"owners_count":17930543,"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":["ios","ios-swift","ios-thirdparty","ios-ui","qq-notice","swift"],"created_at":"2024-01-05T20:16:14.020Z","updated_at":"2024-12-06T17:31:07.788Z","avatar_url":"https://github.com/status302.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Alert \u0026 Action Sheet"],"readme":"NoticeBar\n===\n😍A simple NoticeBar written by Swift 3, similar with QQ notice view.😀  \n[![Build Status](https://travis-ci.org/qiuncheng/NoticeBar.svg?branch=master)](https://travis-ci.org/qiuncheng/NoticeBar)\n[![](https://img.shields.io/badge/Swift-3.0-yellowgreen.svg)](https://github.com/qiuncheng/NoticeBar)\n[![](https://img.shields.io/badge/support-iOS8-lightgrey.svg)](https://github.com/qiuncheng/NoticeBar)\n[![pod version](https://img.shields.io/badge/Pod-v0.1.5-brightgreen.svg)](https://cocoapods.org/pods/NoticeBar)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![](https://img.shields.io/badge/platform-iOS-yellow.svg)](https://github.com/qiuncheng/NoticeBar)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/qiuncheng/NoticeBar/master/LICENSE)\n\n#### ScreenShots\n\u003cp\u003e\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/notice_bar_error.jpg?raw=true\" width=\"20%\" height=\"20%\"\u003e\n\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/notice_bar_success.jpg?raw=true\" width=\"20%\" height=\"20%\"\u003e\n\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/notice_bar_atttention.jpg?raw=true\" width=\"20%\" height=\"20%\"\u003e\n\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/notice_bar_info.jpg?raw=true\" width=\"20%\" height=\"20%\"\u003e\n\u003c/p\u003e\n\u003cp\u003e\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/notice_bar_below_status.jpg?raw=true\" width=\"20%\" height=\"20%\"\u003e\n\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/notice_bar_statusbar.jpg?raw=true\" width=\"20%\" height=\"20%\"\u003e\n\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/notice_bar_navigationbar.jpg?raw=true\" width=\"20%\" height=\"20%\"\u003e\n\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/notice_bar_tabbar.jpg?raw=true\" width=\"20%\" height=\"20%\"\u003e\n\u003c/p\u003e\n\n**Remember: If you want the status bar style change, you must set the `View controller-based status bar appearance` to `NO` in the `info.plist`.**\n\nSupport\n===\nSwift 3.0 \u0026 iOS 8+\n\nInstallation\n===\n#### CocoaPods\n1. add `pod 'NoticeBar'` to your Podfile.\n2. Run `pod install` OR `pod update`.\n3. `import Noticebar`\n\n#### Carthage\n1. Add Noticebar to your Cartfile. e.g., `github \"qiuncheng/Noticebar\" ~\u003e 0.1.5`\n2. Run `carthage update`\n3. Follow the rest of the [standard Carthage installation](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application) instructions to add Noticebar to your project.\n4. `import NoticeBar`\n\n#### Manually\n1. [Download](https://github.com/qiuncheng/NoticeBar/archive/master.zip) the full file.\n2. Drag the NoticeBar folder to your project.\n\nExample\n===\n#### Four Default Types:\n+ NoticeBarAnimationType.info\n+ NoticeBarAnimationType.attention\n+ NoticeBarAnimationType.success\n+ NoticeBarAnimationType.error\n\nHow to use? For example: -\u003e `NoticeBarAnimationType.info`:\n```Swift\n/// title : The message you want to show\n/// defaultType : Above four types with different style above.\nlet noticeBar = NoticeBar(title: \"#message\", defaultType:.info)\n/// duration : How long the noticeBar will stay. And it will dismiss automatically. \n/// completed :optional. When the noticeBar dismissed, what you want to do, nothing type nil.\nnoticeBar.show(duration: #TimeInterval, completed: { (#Bool) in\n})\n```\n#### Custom `NoticeBarConfig`\nThe NoticeBarConfig will manage the NoticeBar's `title` default is `nil`, `image` if needed, `textColor` default is `UIColor.black`, `backgroundColor` default is `UIColor.white`, `animationType` default is from `NoticeBarAnimationType.top`, `barStyle` default is `NoticeBarStyle.onNavigationBar`, `margin` default is `10.0` which will determine the space between `image` and `title`, the space between `NoticeBar left` and `image`.  \nHow to use? For example:\n```\n/// NoticeBarConfig : There are some other NoticeBarConfig init, it's up to you which to use.\nlet config = NoticeBarConfig(title: \"#message you want to show.\", image: #image, textColor: UIColor.white, backgroundColor: UIColor.red, barStyle: NoticeBarStyle.onNavigationBar, animationType: NoticeBarAnimationType.top )\nlet noticeBar = NoticeBar(config: config)\n/// do something before noticeBar show.      \n/// such as : UIApplication.shared.statusBarStyle = .lightContent\nnoticeBar.show(duration: 2.0, completed: {\n    (finished) in\n    if finished {\n        /// do something here.\n        /// such as : UIApplication.shared.statusBarStyle = .default\n    }\n})\n```\nTODO\n===\n- [ ] Add background image\n- [ ] Add custom view\n- [x] Add custom super view, now is keyWindows.\n- [ ] Add dismiss action manually, now dimiss is automatically.\n\nThanks\n===\n1. [QQ's Notice View](https://itunes.apple.com/cn/app/qq/id444934666?mt=8) which the idea come from.  \n\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/qq_notice_view_2.jpg?raw=true\" width=\"50%\" height=\"50%\"\u003e  \n\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/qq_notice_view_1.jpg?raw=true\" width=\"50%\" height=\"50%\"\u003e\n2. [Pin's Notice View](https://itunes.apple.com/us/app/pin-jian-tie-ban-kuo-zhan/id1039643846?mt=8) which I take example by.   \n\u003cimg src=\"https://github.com/qiuncheng/NoticeBar/blob/master/Screenshots/pin_notice_view.jpg?raw=true\" width=\"50%\" height=\"50%\"\u003e\n\nLICENCE\n===\nUnder [MIT License](https://github.com/qiuncheng/NoticeBar/blob/master/LICENSE)\n\nCopyright (c) 2016 QiunCheng. All rights reserved.\n\nAbout me\n===\nA student in Xidian University. [MY RESUME](https://qiuncheng.github.io/resume.html).   \nIf you have a new idea about this project, [Please let me know.](mailto:qiuncheng@gmail.com) OR pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatus302%2FNoticeBar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatus302%2FNoticeBar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatus302%2FNoticeBar/lists"}