A sensitive pH-triggered electrical switch is demonstrated by using a layer-structured silver nanowire/polyaniline nanocomposite film fabricated via an easy vertical spinning method. The as-prepared nanocomposite film shows the high electrical conductivity of 1.03 x 10(4) S cm(-1) at the Ag-NW areal density of 0.84 mg cm(-2) and a good cycling stability. Particularly, because of the layered structure, the switch achieves a very high contrast ratio of ca.9 x 108, which is 2-6 orders higher than that reported previously. The high electrical conductivity and the high switching ratio make the layer-structured nanocomposite film a sensitive switch candidate for pH-responsive systems. Finally, a smart pH self-adjusting switching system is successfully designed using the as-prepared layer-structured nanocomposite film.