Relationship between the structure and hydrophobic performance of Ni–TiO2 nanocomposite coatings by electrodeposition