@DanielFischer How about the following: Assume $f$ is not constant on $[0,1]$.
Let $f(0) = c$ for some $c \in \mathbb{Z}$. Then by assumption there exists $x \in [0,1]$ such that $|f(x)| = c + n$ with $n \in \mathbb{Z}^{+}$. Let $a := \inf\{x \in [0,1]: |f(x)| = c + n \}$ then for every $\alpha > 0$ we have $|f(a-\alpha)| = c$.
Take $\epsilon = \frac{1}{2}$ then for every $\delta > 0$ we have some $y \in [0,1]$ such that $|y-a| < \delta$ $\implies$ $|f(y)-f(a)| > 1 > \epsilon$. This contradicts the assumed continuity of $f$. Therefore $f$ is constant.