Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLWeatherData Class Reference

Section Contents

Overview

Undocumented

-initWithCurrentTemperature:temperatureHigh:temperatureLow:apparentTemperature:apparentTemperatureHigh:apparentTemperatureLow:weatherSummary:time:humidity:cloudCover:moonPhase:windBearing:windGust:windSpeed:nearestStormBearing:nearestStormDistance:precipAccumulation:precipIntensity:precipProbability:precipType:visibility:weatherIcon:

Convenience init for all parameters

Objective-C

- (nonnull instancetype)
    initWithCurrentTemperature:(nullable SDLTemperature *)currentTemperature
               temperatureHigh:(nullable SDLTemperature *)temperatureHigh
                temperatureLow:(nullable SDLTemperature *)temperatureLow
           apparentTemperature:(nullable SDLTemperature *)apparentTemperature
       apparentTemperatureHigh:
           (nullable SDLTemperature *)apparentTemperatureHigh
        apparentTemperatureLow:(nullable SDLTemperature *)apparentTemperatureLow
                weatherSummary:(nullable NSString *)weatherSummary
                          time:(nullable SDLDateTime *)time
                      humidity:(nullable NSNumber<SDLFloat> *)humidity
                    cloudCover:(nullable NSNumber<SDLFloat> *)cloudCover
                     moonPhase:(nullable NSNumber<SDLFloat> *)moonPhase
                   windBearing:(nullable NSNumber<SDLInt> *)windBearing
                      windGust:(nullable NSNumber<SDLFloat> *)windGust
                     windSpeed:(nullable NSNumber<SDLFloat> *)windSpeed
           nearestStormBearing:(nullable NSNumber<SDLInt> *)nearestStormBearing
          nearestStormDistance:(nullable NSNumber<SDLInt> *)nearestStormDistance
            precipAccumulation:(nullable NSNumber<SDLFloat> *)precipAccumulation
               precipIntensity:(nullable NSNumber<SDLFloat> *)precipIntensity
             precipProbability:(nullable NSNumber<SDLFloat> *)precipProbability
                    precipType:(nullable NSString *)precipType
                    visibility:(nullable NSNumber<SDLFloat> *)visibility
                   weatherIcon:(nullable SDLImage *)weatherIcon;

Swift

init(currentTemperature: SDLTemperature?, temperatureHigh: SDLTemperature?, temperatureLow: SDLTemperature?, apparentTemperature: SDLTemperature?, apparentTemperatureHigh: SDLTemperature?, apparentTemperatureLow: SDLTemperature?, weatherSummary: String?, time: SDLDateTime?, humidity: (NSNumber & SDLFloat)?, cloudCover: (NSNumber & SDLFloat)?, moonPhase: (NSNumber & SDLFloat)?, windBearing: (NSNumber & SDLInt)?, windGust: (NSNumber & SDLFloat)?, windSpeed: (NSNumber & SDLFloat)?, nearestStormBearing: (NSNumber & SDLInt)?, nearestStormDistance: (NSNumber & SDLInt)?, precipAccumulation: (NSNumber & SDLFloat)?, precipIntensity: (NSNumber & SDLFloat)?, precipProbability: (NSNumber & SDLFloat)?, precipType: String?, visibility: (NSNumber & SDLFloat)?, weatherIcon: SDLImage?)

Parameters

currentTemperature

The current temperature

temperatureHigh

The predicted high temperature for the day

temperatureLow

The predicted low temperature for the day

apparentTemperature

The apparent temperature

apparentTemperatureHigh

The predicted high apparent temperature for the day

apparentTemperatureLow

The predicted low apparent temperature for the day

weatherSummary

A summary of the weather

time

The time this data refers to

humidity

From 0 to 1, percentage humidity

cloudCover

From 0 to 1, percentage cloud cover

moonPhase

From 0 to 1, percentage of the moon seen, e.g. 0 = no moon, 0.25 = quarter moon

windBearing

In degrees, true north at 0 degrees

windGust

In km/hr

windSpeed

In km/hr

nearestStormBearing

In degrees, true north at 0 degrees

nearestStormDistance

In km

precipAccumulation

In cm

precipIntensity

In cm of water per hour

precipProbability

From 0 to 1, percentage chance

precipType

A description of the precipitation type (e.g. rain, snow, sleet, hail)

visibility

In km

weatherIcon

The weather icon image

Return Value

A SDLWeatherData object

currentTemperature

The current temperature.

SDLTemperature, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    SDLTemperature *currentTemperature;

Swift

var currentTemperature: SDLTemperature? { get set }

temperatureHigh

The predicted high temperature for the day.

SDLTemperature, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    SDLTemperature *temperatureHigh;

Swift

var temperatureHigh: SDLTemperature? { get set }

temperatureLow

The predicted low temperature for the day.

SDLTemperature, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    SDLTemperature *temperatureLow;

Swift

var temperatureLow: SDLTemperature? { get set }

apparentTemperature

The apparent temperature.

SDLTemperature, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    SDLTemperature *apparentTemperature;

Swift

var apparentTemperature: SDLTemperature? { get set }

apparentTemperatureHigh

The predicted high apparent temperature for the day.

SDLTemperature, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    SDLTemperature *apparentTemperatureHigh;

Swift

var apparentTemperatureHigh: SDLTemperature? { get set }

apparentTemperatureLow

The predicted low apparent temperature for the day.

SDLTemperature, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    SDLTemperature *apparentTemperatureLow;

Swift

var apparentTemperatureLow: SDLTemperature? { get set }

weatherSummary

A summary of the weather.

String, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSString *weatherSummary;

Swift

var weatherSummary: String? { get set }

time

The time this data refers to.

SDLDateTime, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) SDLDateTime *time;

Swift

var time: SDLDateTime? { get set }

humidity

From 0 to 1, percentage humidity.

Float, Optional, minvalue=0 maxvalue=1

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLFloat> *humidity;

Swift

var humidity: (NSNumber & SDLFloat)? { get set }

cloudCover

From 0 to 1, percentage cloud cover.

Float, Optional, minvalue=0 maxvalue=1

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLFloat> *cloudCover;

Swift

var cloudCover: (NSNumber & SDLFloat)? { get set }

moonPhase

From 0 to 1, percentage of the moon seen, e.g. 0 = no moon, 0.25 = quarter moon

Float, Optional, minvalue=0 maxvalue=1

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLFloat> *moonPhase;

Swift

var moonPhase: (NSNumber & SDLFloat)? { get set }

windBearing

In degrees, true north at 0 degrees.

Integer, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLInt> *windBearing;

Swift

var windBearing: (NSNumber & SDLInt)? { get set }

windGust

In km/hr

Float, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLFloat> *windGust;

Swift

var windGust: (NSNumber & SDLFloat)? { get set }

windSpeed

In km/hr

Float, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLFloat> *windSpeed;

Swift

var windSpeed: (NSNumber & SDLFloat)? { get set }

nearestStormBearing

In degrees, true north at 0 degrees.

Integer, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLInt> *nearestStormBearing;

Swift

var nearestStormBearing: (NSNumber & SDLInt)? { get set }

nearestStormDistance

In km

Integer, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLInt> *nearestStormDistance;

Swift

var nearestStormDistance: (NSNumber & SDLInt)? { get set }

precipAccumulation

In cm

Float, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLFloat> *precipAccumulation;

Swift

var precipAccumulation: (NSNumber & SDLFloat)? { get set }

precipIntensity

In cm of water per hour.

Float, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLFloat> *precipIntensity;

Swift

var precipIntensity: (NSNumber & SDLFloat)? { get set }

precipProbability

From 0 to 1, percentage chance.

Float, Optional, minvalue=0 maxvalue=1

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLFloat> *precipProbability;

Swift

var precipProbability: (NSNumber & SDLFloat)? { get set }

precipType

A description of the precipitation type (e.g. rain, snow, sleet, hail)

String, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSString *precipType;

Swift

var precipType: String? { get set }

visibility

In km

Float, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLFloat> *visibility;

Swift

var visibility: (NSNumber & SDLFloat)? { get set }

weatherIcon

The weather icon image.

SDLImage, Optional

Objective-C

@property (readwrite, strong, nonatomic, nullable) SDLImage *weatherIcon;

Swift

var weatherIcon: SDLImage? { get set }
View on GitHub.com
Previous Section Next Section