{"id":18271499,"url":"https://github.com/chrismiles/CMTextStylePicker","last_synced_at":"2025-04-05T02:30:30.698Z","repository":{"id":139033748,"uuid":"1096695","full_name":"chrismiles/CMTextStylePicker","owner":"chrismiles","description":"iOS view controller tree for presenting a text font/size/colour picker to user.","archived":false,"fork":false,"pushed_at":"2010-11-20T07:23:27.000Z","size":496,"stargazers_count":99,"open_issues_count":0,"forks_count":22,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-21T09:47:35.570Z","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/chrismiles.png","metadata":{"files":{"readme":"README.rst","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":"2010-11-20T04:37:49.000Z","updated_at":"2025-02-23T19:45:39.000Z","dependencies_parsed_at":"2023-03-13T10:51:36.686Z","dependency_job_id":null,"html_url":"https://github.com/chrismiles/CMTextStylePicker","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/chrismiles%2FCMTextStylePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrismiles%2FCMTextStylePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrismiles%2FCMTextStylePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrismiles%2FCMTextStylePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrismiles","download_url":"https://codeload.github.com/chrismiles/CMTextStylePicker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247279155,"owners_count":20912843,"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:39:20.423Z","updated_at":"2025-04-05T02:30:30.353Z","avatar_url":"https://github.com/chrismiles.png","language":"Objective-C","readme":"CMTextStylePicker\n=================\n\niOS view controller tree for presenting a text font/size/colour picker to user.\n\nIt is also possible to use the font or colour selectors separately.\n\nA universal (iPhone/iPad) demo app is included with the source.\n\n\nScreenshots\n-----------\n\n|ipad_demo| |iphone_demo|\n\n.. |ipad_demo| image:: http://farm5.static.flickr.com/4128/5191609858_76368e3041.jpg\n.. |iphone_demo| image:: http://farm5.static.flickr.com/4089/5191609788_5f38a0393c.jpg\n\n\nUsage\n-----\n\nCMTextStylePickerViewController is the main class.  It is designed to\nbe added to a UINavigationController, either at the root or pushed\non to the navigation tree.  The UINavigationController would typically\nbe presented as a modal view controller on the iPhone or within a\nUIPopoverController on the iPad.\n\nExample::\n\n  CMTextStylePickerViewController *textStylePickerViewController = [CMTextStylePickerViewController textStylePickerViewController];\n  textStylePickerViewController.delegate = self;\n  textStylePickerViewController.selectedTextColour = aTextView.textColor;\n  textStylePickerViewController.selectedFont = aTextView.font;\n  if ([aTextView.textColor isEqual:defaultTextColor] \u0026\u0026 [aTextView.font isEqual:defaultFont]) {\n    textStylePickerViewController.defaultSettingsSwitchValue = YES;\n  }\n  else {\n    textStylePickerViewController.defaultSettingsSwitchValue = NO;\n  }\n  \n  UINavigationController *actionsNavigationController = [[[UINavigationController alloc] initWithRootViewController:textStylePickerViewController] autorelease];\n\n\nThe delegate should implement the CMTextStylePickerViewControllerDelegate protocol.\n\nCMTextStylePickerViewControllerDelegate callback examples::\n\n  - (void)textStylePickerViewController:(CMTextStylePickerViewController *)textStylePickerViewController userSelectedFont:(UIFont *)font {\n    aTextView.font = font;\n  }\n  \n  - (void)textStylePickerViewController:(CMTextStylePickerViewController *)textStylePickerViewController userSelectedTextColor:(UIColor *)textColor {\n    aTextView.textColor = textColor;\n  }\n\n  - (void)textStylePickerViewControllerSelectedCustomStyle:(CMTextStylePickerViewController *)textStylePickerViewController {\n    // Use custom text style\n    aTextView.font = textStylePickerViewController.selectedFont;\n    aTextView.textColor = textStylePickerViewController.selectedTextColour;\n  }\n\n  - (void)textStylePickerViewControllerSelectedDefaultStyle:(CMTextStylePickerViewController *)textStylePickerViewController {\n    // Use default text style\n    aTextView.font = self.defaultFont;\n    aTextView.textColor = self.defaultTextColor;\n  }\n\n  - (void)textStylePickerViewController:(CMTextStylePickerViewController *)textStylePickerViewController replaceDefaultStyleWithFont:(UIFont *)font textColor:(UIColor *)textColor {\n    self.defaultFont = font;\n    self.defaultTextColor = textColor;\n  }\n\n  - (void)textStylePickerViewControllerIsDone:(CMTextStylePickerViewController *)textStylePickerViewController {\n    [self dismissModalViewControllerAnimated:YES];\n  }\n\n\nSee the demo application, CMTextStylePickerDemo, for more examples of use.\nCMTextStylePickerDemo is a universal app and demonstrates the use of\nCMTextStylePicker on both iPhone and iPad user interfaces.\n\n\nLicense\n-------\n\nCMTextStylePicker is released under the MIT license.  See LICENSE for details.\n\nCMTextStylePicker is copyright (c) Chris Miles 2010.\n","funding_links":[],"categories":["etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrismiles%2FCMTextStylePicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrismiles%2FCMTextStylePicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrismiles%2FCMTextStylePicker/lists"}