{"id":13696576,"url":"https://github.com/snail-z/zhPopupController","last_synced_at":"2025-05-03T17:31:44.960Z","repository":{"id":56933689,"uuid":"81288906","full_name":"snail-z/zhPopupController","owner":"snail-z","description":"Help you pop up custom views easily. and support pop-up animation, layout position, mask effect and gesture interaction etc.","archived":false,"fork":false,"pushed_at":"2020-04-03T00:52:24.000Z","size":7635,"stargazers_count":1500,"open_issues_count":40,"forks_count":258,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-04-08T12:07:29.221Z","etag":null,"topics":["actionsheet","alert","custom-view","drag","drop","elastic","fullscreen","gesture","mask","maskedinput","overlay","popup","present","qzone","share","sheet","sidebar","sina","spring"],"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/snail-z.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":"2017-02-08T04:53:19.000Z","updated_at":"2025-04-04T07:20:43.000Z","dependencies_parsed_at":"2022-08-21T00:40:25.078Z","dependency_job_id":null,"html_url":"https://github.com/snail-z/zhPopupController","commit_stats":null,"previous_names":["snail-z/snailquickmaskpopups","snail-z/snailpopupcontroller"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snail-z%2FzhPopupController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snail-z%2FzhPopupController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snail-z%2FzhPopupController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/snail-z%2FzhPopupController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/snail-z","download_url":"https://codeload.github.com/snail-z/zhPopupController/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252226771,"owners_count":21714867,"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":["actionsheet","alert","custom-view","drag","drop","elastic","fullscreen","gesture","mask","maskedinput","overlay","popup","present","qzone","share","sheet","sidebar","sina","spring"],"created_at":"2024-08-02T18:00:42.790Z","updated_at":"2025-05-03T17:31:43.930Z","avatar_url":"https://github.com/snail-z.png","language":"Objective-C","funding_links":[],"categories":["UI Components","Objective-C  Stars 1000以内排名整理","Objective-C"],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/snail-z/zhPopupController/blob/master/Preview/logo.jpg?raw=true\" width=\"700px\" height=\"128px\"\u003e\n\n[![Language](https://img.shields.io/badge/Language-%20Objective--C%20-orange.svg)](https://travis-ci.org/snail-z/zhPopupController)\n[![Version](https://img.shields.io/badge/pod-v2.0.0-brightgreen.svg)](http://cocoapods.org/pods/zhPopupController)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://cocoapods.org/pods/zhPopupController)\n[![Platform](https://img.shields.io/badge/platform-%20iOS8.0+%20-lightgrey.svg)](http://cocoapods.org/pods/zhPopupController)\n\nzhPopupController can help you pop up custom views easily. It supports custom pop-up animations, layout positions, mask effects, keyboard monitoring, gesture interaction, etc. it API simple and easy to use.\n\n### Version 2.0\n\nzhPopupController version 2.0 has been optimized and refactored. Some methods and properties in version 1.0 are no longer compatible. Please upgrade with caution.\nThe swift version is more lightweight and concise. if you want to know more, please see [here](https://github.com/snail-z/OverlayController).\n\n**Swift - [OverlayController](https://github.com/snail-z/OverlayController)**\n\n## Example\n\nTo run the example project, clone the repo, and run `pod install` from the Example directory first.\n\n## Requirements\n\n- Requires iOS 8.0 or later\n- Requires Automatic Reference Counting (ARC)\n\n## Installation\n\nzhPopupController is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\nplatform :ios, '8.0'\nuse_frameworks!\n\ntarget 'You Project' do\n    \n\tpod 'zhPopupController', '~\u003e 2.0'\n    \nend\n```\n\n## Preview \n\n\u003cimg src=\"https://github.com/snail-z/zhPopupController/blob/master/Preview/full1.gif?raw=true\" width=\"188px\"\u003e\n\n## Usage\n\n* Designated initializer，Must set your content view and its size. Bind the view to a popup controller，one-to-one\n  ```objc\n  _popupController = [[zhPopupController alloc] initWithView:customView size:alert.bounds.size];\n  _popupController.presentationStyle = zhPopupSlideStyleTransform;\n  _popupController.presentationTransformScale = 1.25;\n  _popupController.dismissonTransformScale = 0.85;\n  // ...\n  [_popupController showInView:self.view.window completion:NULL];\n  ```\n\n-----\n\n- Support following keyboard popup and hide\n\n  If you want to make the animation consistent: \n\n  You need to call the method \"becomeFirstResponder()\" in \"willPresentBlock\", don't call it before that.\n\n  You need to call the method \"resignFirstResponder()\" in \"willDismissBlock\".\n\n  ```objc\n  /// default is NO. if YES, Will adjust view position when keyboard changes\n  @property (nonatomic, assign) BOOL keyboardChangeFollowed;\n  \n  /// default is NO. if the view becomes first responder，you need set YES to keep the animation consistent\n  @property (nonatomic, assign) BOOL becomeFirstResponded;\n  ```\n  \n  ```objc\n  _popupController.becomeFirstResponded = YES;\n  _popupController.keyboardChangeFollowed = YES;\n  _popupController.willPresentBlock = ^(zhPopupController * _Nonnull popupController) {\n  \t[textField becomeFirstResponder];\n  };\n          \n  _popupController.willDismissBlock = ^(zhPopupController * _Nonnull popupController) {\n  \t[textField resignFirstResponder];\n  };\n  \n  //...\n  [_popupController show];\n  ```\n\n\u003cimg src=\"https://github.com/snail-z/zhPopupController/blob/master/Preview/full2.gif?raw=true\" width=\"188px\"\u003e\n\n- Support adjust the spacing between with the keyboard.by `keyboardOffsetSpacing`. You can through it adjust the spacing relative to the keyboard when the keyboard appears. default is 0, The pan gesture will be invalid when the keyboard appears.\n\n  ```objc\n  /// Adjust the spacing between with the keyboard\n  @property (nonatomic, assign) CGFloat keyboardOffsetSpacing;\n  ```\n\n-----\n\n- Support present/dismiss slide style. by`presentationStyle` `dismissonStyle`\n- Support Set popup view display position. by `layoutType`\n- Support Set popup view mask style. by `maskType`\n- Support set popup view priority. default is zhPopupWindowLevelNormal `windowLevel`\n- Support adjust the layout position by `offsetSpacing`\n- Support gesture dragging,default is NO. if YES, Popup view will allow to drag `panGestureEnabled`\n- Support dismiss automatically. the view will disappear after `dismissAfterDelay` seconds，default is 0 will not disappear\n   ```objc\n   /// Set popup view mask style. default is zhPopupMaskTypeBlackOpacity (maskAlpha: 0.5)\n   @property (nonatomic, assign) zhPopupMaskType maskType;\n   \n   /// Set popup view display position. default is zhPopupLayoutTypeCenter\n   @property (nonatomic, assign) zhPopupLayoutType layoutType;\n   \n   /// Set popup view present slide style. default is zhPopupSlideStyleFade\n   @property (nonatomic, assign) zhPopupSlideStyle presentationStyle;\n   \n   /// Set popup view dismiss slide style. default is `presentationStyle`\n   @property (nonatomic, assign) zhPopupSlideStyle dismissonStyle;\n   \n   /// Set popup view priority. default is zhPopupWindowLevelNormal\n   @property (nonatomic, assign) zhPopupWindowLevel windowLevel;\n   \n   /// The view will disappear after `dismissAfterDelay` seconds，default is 0 will not disappear\n   @property (nonatomic, assign) NSTimeInterval dismissAfterDelay;\n   \n   /// default is NO. if YES, Popup view will allow to drag\n   @property (nonatomic, assign) BOOL panGestureEnabled;\n   \n   /// Adjust the layout position by `offsetSpacing`\n   @property (nonatomic, assign) CGFloat offsetSpacing;\n   ```\n   \n   See demo for more usage.\n\n\n## Author\n\nsnail-z, haozhang0770@163.com\n\n## License\n\nzhPopupController is available under the MIT license. See the LICENSE file for more info.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnail-z%2FzhPopupController","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnail-z%2FzhPopupController","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnail-z%2FzhPopupController/lists"}