Designed nanostructures created via physicochemical switching of the growth mode between single crystals and mesocrystals