There is no easy way to do this. The hard part is to simulate the behavior and exact position of the elements. I did this with high precision for the application I developed, and extracted the essay panel into a stand-alone project so that anyone could easily get it. It is called PHFComposeBarView . Here's what it looks like:

To summarize, these are the functions:
- the name of the main button (right) can be changed
- You can change the color of the main button.
- placeholder name can be changed
- placeholder is displayed as a property for further customization
- the text view is displayed as a property for further customization
- the utility button (one on the left) can be shown by installing the utility image of the button (best results for white images on a transparent background up to 32 times the side length)
- optional character counter when specifying the maximum number of characters (similar to entering SMS in Message.app; maximum char limit is not imposed)
- uses delegation to notify button clicks
- forward delegation methods from text view
- automatically grows when text wraps messages and sends notifications and sends delegates messages about frame changes before and after the change so you can have other views for changing the frame and sends delegate methods so you can customize your views
- default grows up, alternatively down
- maximum height for growth can be specified in terms of dots or line numbers
fphilipe
source share