We consider continuous ${\rm SL}(2,\mathbb{R})$ -cocycles over a strictly ergodic homeomorphism that fibers over an almost periodic dynamical system (generalized skew-shifts). We prove that any cocycle that is not uniformly hyperbolic can be approximated by one that is conjugate to an $\rm{SO}(2,\mathbb{R})$ -cocycle. Using this, we show that if a cocycle's homotopy class does not display a certain obstruction to uniform hyperbolicity, then it can be $C^0$ -perturbed to become uniformly hyperbolic. For cocycles arising from Schrödinger operators, the obstruction vanishes, and we conclude that uniform hyperbolicity is dense, which implies that for a generic continuous potential, the spectrum of the corresponding Schrödinger operator is a Cantor set