NSString(SKSensorType) Category Reference

Declared in NSString+SensorType.h

Overview

NSString+SKSensorType is a category responsible for converting an SKSensorType enum into string.

+ stringWithSensorType:

Converts an SKSensorType enum into a string. This method is useful when you want to use the sensor name in the application’s User Interface. The returned string might contain spaces or special characters (such as ‘™’). For example, iBeacon™ Proximity sensor (enum iBeaconProximity) will be returned as “iBeacon™ Proximity”.

+ (NSString *)stringWithSensorType:(SKSensorType)sensorType

Parameters

sensorType

The type of the sensor.

Return Value

A string with the sensor name. (e.g. “iBeacon™ Proximity”).

Declared In

NSString+SensorType.h

+ nonspacedStringWithSensorType:

Converts an SKSensorType enum into a non-spaced string that does not include special characters. This method is useful when you want to use the sensor name in file or directory names. The returned string does not contain spaces or any special character (such as ‘™’). For example, iBeacon™ Proximity sensor (enum iBeaconProximity) will be returned as “iBeaconProximity”.

+ (NSString *)nonspacedStringWithSensorType:(SKSensorType)sensorType

Parameters

sensorType

The type of the sensor.

Return Value

A non-spaced string with the sensor name. (e.g. “iBeaconProximity”).

Declared In

NSString+SensorType.h