{"id":17225392,"url":"https://github.com/yeahdongcn/rscameraswitchsample","last_synced_at":"2025-08-23T18:13:05.601Z","repository":{"id":12114941,"uuid":"14704733","full_name":"yeahdongcn/RSCameraSwitchSample","owner":"yeahdongcn","description":"A pure code implementation of http://dribbble.com/shots/929359-Camera-Switch with beautiful animations.","archived":false,"fork":false,"pushed_at":"2014-04-30T08:23:21.000Z","size":218,"stargazers_count":40,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T14:55:23.886Z","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/yeahdongcn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-26T02:20:52.000Z","updated_at":"2023-04-19T17:22:29.000Z","dependencies_parsed_at":"2022-09-03T13:53:11.152Z","dependency_job_id":null,"html_url":"https://github.com/yeahdongcn/RSCameraSwitchSample","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/yeahdongcn%2FRSCameraSwitchSample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2FRSCameraSwitchSample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2FRSCameraSwitchSample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2FRSCameraSwitchSample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeahdongcn","download_url":"https://codeload.github.com/yeahdongcn/RSCameraSwitchSample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248804783,"owners_count":21164131,"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-10-15T04:13:25.986Z","updated_at":"2025-04-14T00:53:08.146Z","avatar_url":"https://github.com/yeahdongcn.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"RSCameraSwitchSample\n====================\n\nA pure code implementation of http://dribbble.com/shots/929359-Camera-Switch\n\nThe image below is what this control looks in dribbble\n\n![ScreenShot](https://d13yacurqjgara.cloudfront.net/users/2637/screenshots/929359/camera-button.png)\n\nand this is what my control looks like \n\n![ScreenShot](https://s3.amazonaws.com/cocoacontrols_production/uploads/control_image/image/2335/iOS_Simulator_Screen_shot_Nov_26__2013__10.24.14_AM.png)\n\nsimilar but still have some difference in material.\n\nUsage, creation:\n\n    self.cameraSwitch = [[RSCameraSwitch alloc] initWithFrame:CGRectMake(100, 100, 165, 50)];\n    self.cameraSwitch.tintColor = [UIColor blackColor];\n    self.cameraSwitch.offColor = [[self class] colorWithARGBHex:0xff498e14];\n    self.cameraSwitch.onColorLight = [[self class] colorWithARGBHex:0xff9dd32a];\n    self.cameraSwitch.onColorDark = [[self class] colorWithARGBHex:0xff66a61b];\n    self.cameraSwitch.delegate = self;\n    [self.view addSubview:self.cameraSwitch];\n    \nevent handling:\n\n    - (void)clicked:(BOOL)isFront\n    {\n        // When using GPUImage, put [self.videoCamera rotateCamera]; here,\n        // Otherwise do:\n        if (isFront) {\n            NSLog(@\"front button selected\");\n        } else {\n            NSLog(@\"back button selected\");\n        }\n    }\n\n\n[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/yeahdongcn/rscameraswitchsample/trend.png)](https://bitdeli.com/free \"Bitdeli Badge\")\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeahdongcn%2Frscameraswitchsample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeahdongcn%2Frscameraswitchsample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeahdongcn%2Frscameraswitchsample/lists"}