{"id":1205,"url":"https://github.com/GabrielAlva/Cool-iOS-Camera","last_synced_at":"2025-07-30T20:32:53.280Z","repository":{"id":26116952,"uuid":"29561388","full_name":"GabrielAlva/Cool-iOS-Camera","owner":"GabrielAlva","description":"A fully customisable and modern camera implementation for iOS made with AVFoundation.","archived":false,"fork":false,"pushed_at":"2018-05-21T22:17:29.000Z","size":2761,"stargazers_count":1300,"open_issues_count":9,"forks_count":152,"subscribers_count":47,"default_branch":"master","last_synced_at":"2024-11-29T06:35:02.382Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabrielAlva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-20T23:45:29.000Z","updated_at":"2024-09-20T10:11:55.000Z","dependencies_parsed_at":"2022-08-07T11:16:24.244Z","dependency_job_id":null,"html_url":"https://github.com/GabrielAlva/Cool-iOS-Camera","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielAlva%2FCool-iOS-Camera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielAlva%2FCool-iOS-Camera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielAlva%2FCool-iOS-Camera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielAlva%2FCool-iOS-Camera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabrielAlva","download_url":"https://codeload.github.com/GabrielAlva/Cool-iOS-Camera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228187584,"owners_count":17882329,"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:15:41.231Z","updated_at":"2024-12-04T20:31:07.094Z","avatar_url":"https://github.com/GabrielAlva.png","language":"Objective-C","funding_links":[],"categories":["Hardware","Objective-C  Stars 1000以内排名整理"],"sub_categories":["Camera","Other free courses"],"readme":"![Platform](https://img.shields.io/badge/platform-iOS-brightgreen.svg)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n![Level](https://img.shields.io/badge/level-over%209000-1CCDD6.svg)\n\n![Custom Camera.](https://github.com/GabrielAlva/Cool-iOS-Camera/blob/master/Resources/MarkdownImage.png)\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\n## Features\n- Extremely simple and easy to use\n- Controls autofocus \u0026 exposure\n- Customizable interface\n- Code-made UI assets that do not lose resolution quality \u0026 resize dynamically depending on the screen size of the device.\n- Added animations to the UI elements for a more intuitive and responsive feel.\n- Overlays over any presented view controller or view\n- Made for iPhone \u0026 iPad\n\n## Installation\n* Include the `AVFoundation.Framework` library in your project, click on your project's target, navigate to Build Phases, then go to Link Binary With Libraries, click on the + and add the AVFoundation.Framework.\n* Browse to the directory of the demo app and drag the `CustomizableCamera` folder into your Xcode project.\n* import `\"CameraSessionView.h\"` to the view controller that will invoke the camera.\n\n## Usage \n\nUsing **CustomizableCamera** in your app is very fast and simple.\n\n### Displaying the camera view and adopting its delegate\n\nAfter importing the `\"CameraSessionView.h\"` into the view controller, adopt its `\u003cCACameraSessionDelegate\u003e` delegate.\n\nNext, declare a CameraSessionView property:\n```objective-c\n@property (nonatomic, strong) CameraSessionView *cameraView;\n```\n\nNow in the place where you would like to invoke the camera view (on the action of a button or viewDidLoad) instantiate it, set it's delegate and add it as a subview:\n```objective-c\n_cameraView = [[CameraSessionView alloc] initWithFrame:self.view.frame];\n_cameraView.delegate = self;\n[self.view addSubview:_cameraView];\n```\n\nNow implement **one** of this two delegate functions depending on whether you would like to get back a `UIImage` or `NSData` for an image when the shutter on the camera is pressed,\n\nFor a UIImage:\n```objective-c\n-(void)didCaptureImage:(UIImage *)image {\n  //Use the image that is received\n}\n```\nFor NSData:\n```objective-c\n-(void)didCaptureImageWithData:(NSData *)imageData {\n  //Use the image's data that is received\n}\n```\n\n### Dismissing the camera view\n\nYou can hide the camera view either by pressing the dismiss button on it or by writing `[self.cameraView removeFromSuperview];` on the invoking view controller (it can be written inside one of the two delegate functions in order to dismiss it after taking a photo). \n\n## Customization\n\nOnce you have your `CameraSessionView` instance you can customize the appearance of the camera using its api, below are some samples:\n\nTo change the color of the top bar including its transparency:\n```objective-c\n[_cameraView setTopBarColor:[UIColor colorWithRed:0.97 green:0.97 blue:0.97 alpha: 0.64]];\n```\nTo hide the flash button:\n```objective-c\n[_cameraView hideFlashButton]; //On iPad flash is not present, hence it wont appear.\n```\nTo hide the switch camera's button:\n```objective-c\n[_cameraView hideCameraToogleButton];\n```\nTo hide the dismiss button:\n```objective-c\n[_cameraView hideDismissButton];\n```\nIf no customization is made, the camera view will use its default look.\n\n## Example\n\nYou can find a full example on usage and customization on the Xcode project attached to this repository.\n\n## Contributor\n\n* Christopher Cohen\n\n## License\n\nThe MIT License (MIT)\n\n**Copyright (c) 2015 Gabriel Alvarado (gabrielle.alva@gmail.com)**\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 all\ncopies 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%2FGabrielAlva%2FCool-iOS-Camera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGabrielAlva%2FCool-iOS-Camera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGabrielAlva%2FCool-iOS-Camera/lists"}