{"id":18270573,"url":"https://github.com/kgn/KGModal","last_synced_at":"2025-04-05T01:30:42.689Z","repository":{"id":4940913,"uuid":"6097976","full_name":"kgn/KGModal","owner":"kgn","description":"KGModal is an easy drop in control that allows you to display any view in a modal popup.","archived":false,"fork":false,"pushed_at":"2016-02-24T10:27:16.000Z","size":530,"stargazers_count":454,"open_issues_count":11,"forks_count":96,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-03-29T05:10:03.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ANXS/postgresql","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kgn.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-10-05T23:19:40.000Z","updated_at":"2025-03-27T22:17:00.000Z","dependencies_parsed_at":"2022-08-20T21:20:25.683Z","dependency_job_id":null,"html_url":"https://github.com/kgn/KGModal","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGModal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGModal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGModal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kgn%2FKGModal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kgn","download_url":"https://codeload.github.com/kgn/KGModal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276022,"owners_count":20912285,"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":[],"created_at":"2024-11-05T11:38:44.375Z","updated_at":"2025-04-05T01:30:42.191Z","avatar_url":"https://github.com/kgn.png","language":"Objective-C","readme":"KGModal is an easy drop in control that allows you to display any view in a modal popup. The modal will automatically scale to fit the content view and center it on screen with nice animations!\n\n![](https://raw.github.com/kgn/KGModal/master/Screenshot.jpg)\n\nYou supply your own content view and KGModal does the rest:\n\n``` obj-c\n[[KGModal sharedInstance] showWithContentView:contentView andAnimated:YES];\n```\n\nThere are a couple other options but it's purposely designed to be simple and easy to use:\n\n``` obj-c\n// Determines if the modal should dismiss if the user taps outside of the modal view\n// Defaults to YES\n@property (nonatomic) BOOL tapOutsideToDismiss;\n\n// Determines if the close button or tapping outside the modal should animate the dismissal\n// Defaults to YES\n@property (nonatomic) BOOL animateWhenDismissed;\n\n// Determins close button type (None/Left/Right)\n// Defaults to Left\n@property (nonatomic) KGModalCloseButtonType closeButtonType;\n\n// Determines whether close button will display on the left or right\n// Defaults to left\n@property (nonatomic) KGModalCloseButtonLocation closeButtonLocation;\n\n// The background color of the modal window\n// Defaults black with 0.5 opacity\n@property (strong, nonatomic) UIColor *modalBackgroundColor;\n\n// The background display style, can be a transparent radial gradient or a transparent black\n// Defaults to gradient, this looks better but takes a bit more time to display on the retina iPad\n@property (nonatomic) enum KGModalBackgroundDisplayStyle backgroundDisplayStyle;\n\n// The shared instance of the modal\n+ (id)sharedInstance;\n\n// Set the content view to display in the modal and display with animations\n- (void)showWithContentView:(UIView *)contentView;\n\n// Set the content view to display in the modal and whether the modal should animate in\n- (void)showWithContentView:(UIView *)contentView andAnimated:(BOOL)animated;\n\n// Hide the modal with animations\n- (void)hide;\n\n// Hide the modal with animations,\n// run the completion after the modal is hidden\n- (void)hideWithCompletionBlock:(void(^)())completion;\n\n// Hide the modal and whether the modal should animate away\n- (void)hideAnimated:(BOOL)animated;\n\n// Hide the modal and whether the modal should animate away,\n// run the completion after the modal is hidden\n- (void)hideAnimated:(BOOL)animated withCompletionBlock:(void(^)())completion;\n```\n\nCheck out the ExampleApp to see it in action!\n\n###Installation via Cocoapods\n\nAdd `pod 'KGModal', '~\u003e 0.0.1'` to your `Podfile` and run `pod` to install.\n","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgn%2FKGModal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkgn%2FKGModal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkgn%2FKGModal/lists"}