Pinyinput is an input method that makes it easy to type Pinyin with tone marks.
You type Han4yu3 Pin1yin1 and Pinyinput outputs Hànyǔ Pīnyīn.
Pinyinput installs a custom keyboard extension on your device so you can use it to type pinyin in a simple and consistent manner in any application.