PNIPAM hydrogels are widely studied materials which swell in a great extent in water and water like solvents (e.g. alcohols). The hydrophilic nature of PNIPAM networks is very attractive however it is an important disadvantage at the moment of encapsulating hydrophobic drugs, which minimize their use in other fields. In this work we studied the swelling in different solvent mixtures with water and also in pure nonaqueous solvents, some of them immiscible with water. Accordingly, PNIPAM gels swell strongly in highly polar solvents (e.g. chloroform) but it does not swell in slightly polar solvents (e.g. toluene). The main interaction between the solvent and the polymer chain seems to involve the hydrogen bonding with the amide group, according to the calculated Hansen parameters (δh). It is possible to swell the gel in binary or ternary mixtures containing toluene. In that way, non-polar substances can be loaded inside the gel to change its properties. As a proof of concept, polyaniline (PANI) solubilized in chloroform using camphorsulfonate as solubilizing counterion. The obtained nanocomposites become sensitive to pH changing color and conductivity when exposed to basic or acidic aqueous solutions.