{"id":13743255,"url":"https://github.com/atljeremy/JFMinimalNotifications","last_synced_at":"2025-05-09T01:30:29.899Z","repository":{"id":56915873,"uuid":"9871647","full_name":"atljeremy/JFMinimalNotifications","owner":"atljeremy","description":"An iOS UIView for presenting a minimalistic notification that doesn't block the UI and is highly configurable.","archived":false,"fork":false,"pushed_at":"2017-03-21T13:09:54.000Z","size":12043,"stargazers_count":942,"open_issues_count":9,"forks_count":101,"subscribers_count":35,"default_branch":"master","last_synced_at":"2024-04-26T04:02:40.721Z","etag":null,"topics":["customizable","ios","ios-uiview","jfminimalnotifications","notifications"],"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/atljeremy.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":"2013-05-05T17:04:15.000Z","updated_at":"2024-03-23T16:18:05.000Z","dependencies_parsed_at":"2022-08-20T21:20:26.575Z","dependency_job_id":null,"html_url":"https://github.com/atljeremy/JFMinimalNotifications","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atljeremy%2FJFMinimalNotifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atljeremy%2FJFMinimalNotifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atljeremy%2FJFMinimalNotifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atljeremy%2FJFMinimalNotifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atljeremy","download_url":"https://codeload.github.com/atljeremy/JFMinimalNotifications/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224796302,"owners_count":17371472,"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":["customizable","ios","ios-uiview","jfminimalnotifications","notifications"],"created_at":"2024-08-03T05:00:43.411Z","updated_at":"2024-11-15T14:31:05.268Z","avatar_url":"https://github.com/atljeremy.png","language":"Objective-C","funding_links":[],"categories":["Notification","Objective-C  Stars 1000以内排名整理","OOM-Leaks-Crash"],"sub_categories":["Toast"],"readme":"JFMinimalNotification\n===========\n\nThis is an iOS UIView for presenting a beautiful notification that is highly configurable and works for both iPhone and iPad. JFMinimalNotification is only available in ARC and targets iOS 7.0+.\n\n[![CocoaPods](https://img.shields.io/cocoapods/v/JFMinimalNotifications.svg)](https://cocoapods.org/pods/JFMinimalNotifications)\n[![CocoaPods](https://img.shields.io/cocoapods/dt/JFMinimalNotifications.svg)](https://cocoapods.org/pods/JFMinimalNotifications) \n[![CocoaPods](https://img.shields.io/cocoapods/at/JFMinimalNotifications.svg)](https://cocoapods.org/pods/JFMinimalNotifications)\n[![CocoaPods](https://img.shields.io/cocoapods/l/JFMinimalNotifications.svg?maxAge=2592000)]() \n[![CocoaPods](https://img.shields.io/cocoapods/p/JFMinimalNotifications.svg?maxAge=2592000)]()\n\nLooking for an Android version? Garrett Franks created one and it's awesome, check it out: [https://github.com/gfranks/GFMinimalNotifications](https://github.com/gfranks/GFMinimalNotifications)\n\nWhat It Looks Like:\n------------------\n\n![Example](https://github.com/atljeremy/JFMinimalNotifications/blob/master/Resources/example.gif?raw=true) ![Example](https://github.com/atljeremy/JFMinimalNotifications/blob/master/Resources/exampletop.gif?raw=true)\n\nSee a short video of this control here: [https://www.youtube.com/watch?v=jDYC-NYKl9A](https://www.youtube.com/watch?v=jDYC-NYKl9A)\n\n### Screen Shots\n\n![Examples](https://github.com/atljeremy/JFMinimalNotifications/blob/master/Resources/notification-examples.png?raw=true)\n\nInstallation:\n------------\n\n### CocoaPods\n\n`pod 'JFMinimalNotifications', '~\u003e 0.0.8'`\n\n### Directly include source into your projects\n\n- Simply copy the source files from the \"JFMinimalNotification\" folder into your project.\n- In your application's project app target settings, find the \"Build Phases\" section and open the \"Link Binary With Libraries\" block and click the \"+\" button and select the \"CoreGraphics.framework\".\n\n\nHow To Use It:\n-------------\n\n### Basic Example\n\n```objective-c\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    /**\n     * Create the notification\n     */\n    self.minimalNotification = [JFMinimalNotification notificationWithStyle:JFMinimalNotificationStyleDefault title:@\"This is my awesome title\" subTitle:@\"This is my awesome sub-title\"];\n    \n    /**\n     * Set the desired font for the title and sub-title labels\n     * Default is System Normal\n     */\n    UIFont* titleFont = [UIFont fontWithName:@\"STHeitiK-Light\" size:22];\n    [self.minimalNotification setTitleFont:titleFont];\n    UIFont* subTitleFont = [UIFont fontWithName:@\"STHeitiK-Light\" size:16];\n    [self.minimalNotification setSubTitleFont:subTitleFont];\n\n    /**\n     * Set any necessary edge padding as needed\n     */\n    self.minimalNotification.edgePadding = UIEdgeInsetsMake(0, 0, 10, 0);\n\n    /**\n     * Add the notification to a view\n     */\n    [self.view addSubview:self.minimalNotification];\n}\n\n/**\n * Showing the notification from a button handler\n */\n- (IBAction)show:(id)sender {\n    [self.minimalNotification show];\n}\n\n/**\n * Hiding the notification from a button handler\n */\n- (IBAction)dismiss:(id)sender {\n    [self.minimalNotification dismiss];\n}\n```\n\n### Constructors / Options\n\n```objective-c\n/**\n * Note: passing a dismissalDelay of 0 means the notification will NOT be automatically dismissed, you will need to \n * dismiss the notification yourself by calling -dismiss on the notification object. If you pass a dismissalDelay \n * value greater than 0, this will be the length of time the notification will remain visisble before being \n * automatically dismissed.\n */\n \n// With dismissalDelay\nself.minimalNotification = [JFMinimalNotification notificationWithStyle:JFMinimalNotificationStyleError title:@\"This is my awesome title\" subTitle:@\"This is my awesome sub-title\" dismissalDelay:3.0];\n \n// Without dismissalDelay and with touchHandler\nself.minimalNotification = [JFMinimalNotification notificationWithStyle:JFMinimalNotificationStyleError title:@\"This is my awesome title\" subTitle:@\"This is my awesome sub-title\" dismissalDelay:0.0 touchHandler:^{\n    [self.minimalNotification dismiss];\n}];\n```\n\n```objective-c\n// Available Styles\ntypedef NS_ENUM(NSInteger, JFMinimalNotificationStyle) {\n    JFMinimalNotificationStyleDefault,\n    JFMinimalNotificationStyleError,\n    JFMinimalNotificationStyleSuccess,\n    JFMinimalNotificationStyleInfo,\n    JFMinimalNotificationStyleWarning,\n    \n    /**\n     * @return Used to get a title and subtitle, no accessory views, and white bg with black label text. Use the .bakgroundColor property on the notification to set the desired background color and .textColor property on the titleLabel and subTitleLabel UILabel's to change text color.\n     */\n    JFMinimalNotificationStyleCustom,\n    \n    /**\n     * @return A dark blur with vibrancy effect in the bakground with white label text.\n     */\n    JFMinimalNotificationStyleBlurDark,\n    \n    /**\n     * @return A light blur with vibrancy effect in the bakground with black label text.\n     */\n    JFMinimalNotificationStyleBlurLight\n};\n```\n\nPlease see the example project include in this repo for an example of how to use this notification.\n    \nDelegate Methods:\n----------------\n\n    - (void)minimalNotificationWillShowNotification:(JFMinimalNotification*)notification;\n    - (void)minimalNotificationDidShowNotification:(JFMinimalNotification*)notification;\n    - (void)minimalNotificationWillDisimissNotification:(JFMinimalNotification*)notification;\n    - (void)minimalNotificationDidDismissNotification:(JFMinimalNotification*)notification;\n   \nLicense\n-------\nCopyright (c) 2012 Jeremy Fox ([jeremyfox.me](http://www.jeremyfox.me)). All rights reserved.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatljeremy%2FJFMinimalNotifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatljeremy%2FJFMinimalNotifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatljeremy%2FJFMinimalNotifications/lists"}