Hydrophilic titania (TiO2) nanoparticles were dispersed in solutions of polystyrene (PS), and the suspensions were cast on glass surfaces. The effect of drying temperature on the hydrophobic character of PS/TiO2 was investigated: the static water contact angle increased with the drying temperature, and the as-prepared coating could be adjusted from superhydrophilicity to superhydrophobicity just by controlling the drying temperature. Moreover, the superhydrophobic coating turning into a superhydrophilic one (CA < 5°) after UV illumination, which can be recovered through being heated.