Pancharatnam-Berry (PB) phase is known as the geometric phase associated with the polarization transformation of light. In this work, we reveal the PB phase of light generated during the transformation from a single polarization to a spacevariant one. To realize the space-variant polarization transformation, we utilized our early developed approach based on a Sagnac interferometer. The two spin states of the output field contain different PB phases. By tailoring the PB phase, we demonstrate the spin-dependent propagations of light beams. Besides, the PB phase can also be used for measuring the polarization distribution of vector beams.