{"id":2372,"url":"https://github.com/Citrrus/BlurryModalSegue","last_synced_at":"2025-08-02T23:33:22.189Z","repository":{"id":12018873,"uuid":"14601981","full_name":"Citrrus/BlurryModalSegue","owner":"Citrrus","description":"A custom modal segue providing a blurred overlay effect.","archived":false,"fork":false,"pushed_at":"2016-02-11T16:07:35.000Z","size":1619,"stargazers_count":918,"open_issues_count":5,"forks_count":71,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-04-24T14:47:54.623Z","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":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Citrrus.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-11-21T22:27:00.000Z","updated_at":"2024-04-19T09:24:42.000Z","dependencies_parsed_at":"2022-08-27T16:51:20.569Z","dependency_job_id":null,"html_url":"https://github.com/Citrrus/BlurryModalSegue","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Citrrus%2FBlurryModalSegue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Citrrus%2FBlurryModalSegue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Citrrus%2FBlurryModalSegue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Citrrus%2FBlurryModalSegue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Citrrus","download_url":"https://codeload.github.com/Citrrus/BlurryModalSegue/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228503197,"owners_count":17930534,"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-01-05T20:16:12.176Z","updated_at":"2024-12-06T17:31:02.948Z","avatar_url":"https://github.com/Citrrus.png","language":"Objective-C","readme":"# BlurryModalSegue\n\nBlurryModalSegue is a UIStoryboardSegue subclass that provides a blur effect for modal storyboard segues.  It provides the look and feel of a transparent modal overlay without deviating from the modal presentation model provided by Apple.\n\n## Demo\n![](assets/blurry_modal.gif)\n\n## Installation\nVia [CocoaPods](http://cocoapods.org):\n```ruby\npod 'BlurryModalSegue'\n```\n\n## Usage\n\n### Storyboard Usage\n\nChange your modal storyboard segues from this:\n\n![](assets/modal_storyboard.png)\n\nTo this:\n\n![](assets/blurry_modal_storyboard.png)\n\nDone!\n\n_If nested view controllers are being presented (e.g., UINavigationController -\u003e UIViewController), make sure to set the background color of any nested views to [UIColor clearColor] so the blurry UIImageView is visible_\n### Custom Styling\n\nBlurryModalSegue conforms to the UIAppearance protocol.  Configure it once across the app:\n\n```objc\n#import \"BlurryModalSegue.h\"\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n    [[BlurryModalSegue appearance] setBackingImageBlurRadius:@(20)];\n    [[BlurryModalSegue appearance] setBackingImageSaturationDeltaFactor:@(.45)];\n    \n    return YES;\n}\n```\n\nAdditionally, you can customize individual instances before presentation, just implement ```prepareForSegue:sender:```:\n```objc\n#import \"BlurryModalSegue.h\"\n\n- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender\n{\n    if ([segue isKindOfClass:[BlurryModalSegue class]])\n    {\n        BlurryModalSegue* bms = (BlurryModalSegue*)segue;\n        \n        bms.backingImageBlurRadius = @(20);\n        bms.backingImageSaturationDeltaFactor = @(.45);\n        bms.backingImageTintColor = [[UIColor greenColor] colorWithAlphaComponent:.1];\n    }\n}\n\n```\n\n### Troubleshooting\nIf you just see a solid color instead of a blurry background after performing a segue, ensure that the view controllers being presented don't have a background color set on their views.  This is common when presenting a UINavigationController that is in turn presenting a root view controller.  The UIImageView that contains the blurry image is added as a subview to the `-[UIStorybardSegue destinationViewController]`'s `view` property.  In the case of a presented UINavigationController, it immediately presents a child view controller.  If that view controller has a solid background color, it could completely hide the blurry UIImageView.\n\n## Compatibility/Restrictions\n* iOS7+ only, as we take advantage of the new ```UIViewControllerTransitionCoordinator```.\n* ```UIModalTransitionStylePartialCurl``` is not supported and doesn't really make sense for this library.\n* For ```UIModalTransitionStyleCoverVertical```, eagle-eyed developers will notice that the effect is better during presentation than dismissal.  This is because ```[UIViewController -transitionCoordinator]``` only seems to support the presentation, not the dismissal.  I believe the dismissal could be implented using the ```[UIViewController -transitioningDelegate]```, but that is TBD.\n* Rotation after modal presentation is unsupported as the backing image will only be appropriate for the original orientation.\n\n## Acknowledgements\n* The blur effect in this library is courtesy of the [UIImage-BlurredFrame](https://github.com/Adrian2112/UIImage-BlurredFrame) library.\n","funding_links":[],"categories":["UI","Objective-C  Stars 1000以内排名整理","etc"],"sub_categories":["Transition","Layout","Other free courses"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCitrrus%2FBlurryModalSegue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCitrrus%2FBlurryModalSegue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCitrrus%2FBlurryModalSegue/lists"}