Chemistry Keyboard for iOS
With iOS 8 Apple now support third party custom keyboards
A custom keyboard replaces the system keyboard for users who want capabilities such as a novel text input method or the ability to enter text in a language not otherwise supported in iOS.
The Chemistry Keyboard allows users to enter chemical formulae, equations etc without having to struggle entering subscripts etc. Whilst the chemistry keyboard is an app in itself it also allows you to use the custom keyboard with other applications
You can read more details here.