Weather from openweathermap.org

A table view displays the maximum temperature predicted for each day of the coming week. To prevent the UITableView from overlapping the status bar, see TextView.

Source code in Weather.zip

  1. Class AppDelegate: unchanged.
  2. Class TableViewController is the view controller and data source.
  3. Info.plist: added properties as in IBM example in hello.

Create the project

Create the table view controller as in States.

The JSON downloaded from the server

Thursday, October 26, 2017. See the JSON parameters.

["list": <__NSArrayI 0x60c000091c10>(
{
    clouds = 76;
    deg = 335;
    dt = 1509033600;
    humidity = 85;
    pressure = "1016.85";
    rain = "1.15";
    speed = "9.369999999999999";
    temp =     {
        day = "54.36";
        eve = "53.87";
        max = "54.82";
        min = "51.64";
        morn = "52.09";
        night = "51.64";
    };
    weather =     (
                {
            description = "light rain";
            icon = 10d;
            id = 500;
            main = Rain;
        }
    );
},
{
    clouds = 0;
    deg = 274;
    dt = 1509120000;
    humidity = 83;
    pressure = "1029.88";
    speed = "5.35";
    temp =     {
        day = "53.67";
        eve = "59.11";
        max = "59.11";
        min = "44.28";
        morn = "46.02";
        night = "48.87";
    };
    weather =     (
                {
            description = "sky is clear";
            icon = 01d;
            id = 800;
            main = Clear;
        }
    );
},
{
    clouds = 12;
    deg = 188;
    dt = 1509206400;
    humidity = 68;
    pressure = "1028.47";
    rain = "0.26";
    speed = "5.84";
    temp =     {
        day = "65.26000000000001";
        eve = "66.33";
        max = "67.28";
        min = "48.65";
        morn = "48.65";
        night = "63.84";
    };
    weather =     (
                {
            description = "light rain";
            icon = 10d;
            id = 500;
            main = Rain;
        }
    );
},
{
    clouds = 100;
    deg = 135;
    dt = 1509292800;
    humidity = 0;
    pressure = "1003.28";
    rain = "29.81";
    speed = "19.35";
    temp =     {
        day = "65.56999999999999";
        eve = "67.23999999999999";
        max = "68.58";
        min = "60.91";
        morn = "60.91";
        night = "68.58";
    };
    weather =     (
                {
            description = "heavy intensity rain";
            icon = 10d;
            id = 502;
            main = Rain;
        }
    );
},
{
    clouds = 24;
    deg = 221;
    dt = 1509379200;
    humidity = 0;
    pressure = "1004.49";
    speed = "11.65";
    temp =     {
        day = "49.53";
        eve = "47.08";
        max = "49.53";
        min = "47.08";
        morn = "48.58";
        night = "47.21";
    };
    weather =     (
                {
            description = "light rain";
            icon = 10d;
            id = 500;
            main = Rain;
        }
    );
},
{
    clouds = 0;
    deg = 261;
    dt = 1509465600;
    humidity = 0;
    pressure = "1016.87";
    speed = "9.08";
    temp =     {
        day = "52.39";
        eve = "48.96";
        max = "52.39";
        min = "42.55";
        morn = "42.55";
        night = "43.02";
    };
    weather =     (
                {
            description = "sky is clear";
            icon = 01d;
            id = 800;
            main = Clear;
        }
    );
},
{
    clouds = 3;
    deg = 241;
    dt = 1509552000;
    humidity = 0;
    pressure = "1026.44";
    speed = "3.6";
    temp =     {
        day = "55.26";
        eve = "45.12";
        max = "55.26";
        min = "39.9";
        morn = "39.9";
        night = "43.48";
    };
    weather =     (
                {
            description = "sky is clear";
            icon = 01d;
            id = 800;
            main = Clear;
        }
    );
}
)
, "cod": 200, "city": {
    coord =     {
        lat = "40.7143";
        lon = "-74.006";
    };
    country = US;
    id = 5128581;
    name = "New York";
    population = 0;
}, "message": 0.9154978, "cnt": 7]