PH-responsive polymeric materials for encapsulation and triggered release