Selective control of cubic and hexagonal mesophases for titania and silica thin films with spin-coating