How to test for any internet connection? 3g wi-fi edge

Discussion in 'iPhone/iPad Programming' started by springframework, Sep 2, 2008.

  1. macrumors member

    Joined:
    Mar 31, 2008
    #1
    Is there simple quick and easy ... lets say 1-3 lines of code to test for an internet connection on the iphone?

    or even better would be to have a function triggered right when internet connection is made, and right when it is disconnected.


    also feel free to post more complex ways if no easy ways exist.
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    Look at the Reachability sample.
     

Share This Page