{"id":13743093,"url":"https://github.com/fphilipe/PHFComposeBarView","last_synced_at":"2025-05-09T00:32:39.101Z","repository":{"id":56611245,"uuid":"9911364","full_name":"fphilipe/PHFComposeBarView","owner":"fphilipe","description":"Compose bar from iOS 7 Messages.app","archived":false,"fork":false,"pushed_at":"2021-02-11T00:26:03.000Z","size":450,"stargazers_count":1178,"open_issues_count":3,"forks_count":204,"subscribers_count":48,"default_branch":"master","last_synced_at":"2025-04-08T12:11:15.269Z","etag":null,"topics":["cocoapod","component","ios","uiview"],"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/fphilipe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-05-07T12:32:18.000Z","updated_at":"2024-11-08T01:52:19.000Z","dependencies_parsed_at":"2022-08-15T21:50:54.533Z","dependency_job_id":null,"html_url":"https://github.com/fphilipe/PHFComposeBarView","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphilipe%2FPHFComposeBarView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphilipe%2FPHFComposeBarView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphilipe%2FPHFComposeBarView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fphilipe%2FPHFComposeBarView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fphilipe","download_url":"https://codeload.github.com/fphilipe/PHFComposeBarView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253171163,"owners_count":21865275,"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":["cocoapod","component","ios","uiview"],"created_at":"2024-08-03T05:00:40.375Z","updated_at":"2025-05-09T00:32:38.747Z","avatar_url":"https://github.com/fphilipe.png","language":"Objective-C","readme":"# PHFComposeBarView\n\n![demo](Screenshots/demo.gif)\n\nMore screenshots: [without text](Screenshots/empty.png) and [with\ntext](Screenshots/text.png).\n\n***\n\nThis is a precise reconstruction of the compose bar from the iOS Messages.app,\nmimicking the behaviors and graphics while also allowing you to customize many\naspects of it.\n\nIt basically consists of a text view, a placeholder label, a utility\nbutton located to the left of the text view, and a main button located to the\nright of the text view.\n\nIf you're looking for something that works with iOS 5 and 6 featuring the old\nlook and feel, have a look at [version\n1.1.1](https://github.com/fphilipe/PHFComposeBarView/tree/v1.1.1).\n\n## Features\n\n- title of main button (the one on the right) can be changed\n- tint color of main button can be changed\n- title of the placeholder can be changed\n- placeholder is exposed as a property for further customization\n- text view is exposed as a property for further customization\n- utility button (the one on the left) can be shown by setting the utility\n  button image (best results for gray images (~56% white) on transparent\n  background with up to 50pt side length)\n- optional character counter when specifying a max character count (similar to\n  typing an SMS in Messages.app; the max char count limit is not imposed)\n- uses delegation to notify of button presses\n- forwards delegation methods from the text view\n- automatically grows when text wraps\n- posts notifications and sends delegate messages about frame changes before and\n  after the change so you can adjust your view setup\n- by default grows upwards, alternatively downwards\n- max height for growth can be specified in terms of points or line numbers\n- has a translucent blurred background\n\n## Installation\n\nThe prefered way is to use [CococaPods](http://cocoapods.org).\n\n```ruby\npod 'PHFComposeBarView', '~\u003e 2.0.1'\n```\n\nIf you can't use CocoaPods for some reason (you really should though, it's the\ncool kid on the block), then grab the files in `Classes/` and put it in your\nproject. The code uses ARC, so make sure to turn that on for the files if you're\nnot already using ARC. There's a dependency on\n[`PHFDelegateChain`](https://github.com/fphilipe/PHFDelegateChain), so make sure\nto add that to your project, too.\n\n## Usage\n\nThe compose bar visible in the demo above was created as follows:\n\n```objectivec\nCGRect viewBounds = [[self view] bounds];\nCGRect frame = CGRectMake(0.0f,\n                          viewBounds.size.height - PHFComposeBarViewInitialHeight,\n                          viewBounds.size.width,\n                          PHFComposeBarViewInitialHeight);\nPHFComposeBarView *composeBarView = [[PHFComposeBarView alloc] initWithFrame:frame];\n[composeBarView setMaxCharCount:160];\n[composeBarView setMaxLinesCount:5];\n[composeBarView setPlaceholder:@\"Type something...\"];\n[composeBarView setUtilityButtonImage:[UIImage imageNamed:@\"Camera\"]];\n[composeBarView setDelegate:self];\n```\n\nTo get notified of button presses, implement the optional methods from the\n`PHFComposeBarViewDelegate` protocol:\n\n```objectivec\n- (void)composeBarViewDidPressButton:(PHFComposeBarView *)composeBarView;\n- (void)composeBarViewDidPressUtilityButton:(PHFComposeBarView *)composeBarView;\n```\n\nTo get notified of frame changes, either listen to the notifications\n(`PHFComposeBarViewDidChangeFrameNotification` and\n`PHFComposeBarViewWillChangeFrameNotification`) or implement the optional\ndelegate methods:\n\n```objectivec\n- (void)composeBarView:(PHFComposeBarView *)composeBarView\n   willChangeFromFrame:(CGRect)startFrame\n               toFrame:(CGRect)endFrame\n              duration:(NSTimeInterval)duration\n        animationCurve:(UIViewAnimationCurve)animationCurve;\n- (void)composeBarView:(PHFComposeBarView *)composeBarView\n    didChangeFromFrame:(CGRect)startFrame\n               toFrame:(CGRect)endFrame;\n```\n\nNote that all methods from the `UITextViewDelegate` protocol are forwarded, so\nyou can add your own behavior to the text view such as limiting the text length\netc.\n\nRefer to [`PHFComposeBarView.h`](Classes/PHFComposeBarView.h) for the available\nproperties and their descriptions.\n\n## Small Print\n\n### License\n\n`PHFComposeBarView` is released under the MIT license.\n\n### Dependencies\n\n- [`PHFDelegateChain`](https://github.com/fphilipe/PHFDelegateChain)\n\n### Author\n\nPhilipe Fatio ([@fphilipe](http://twitter.com/fphilipe))\n\n### Sponsors\n\nThese people and companies have sponsored the development so far:\n\n- [Liveminds](https://liveminds.com) ([\\#64](https://github.com/fphilipe/PHFComposeBarView/pull/64))\n","funding_links":[],"categories":["Objective-C  Stars 1000以内排名整理","Objective-C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffphilipe%2FPHFComposeBarView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffphilipe%2FPHFComposeBarView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffphilipe%2FPHFComposeBarView/lists"}