CRCommon.h

This file defines constants and the CRCommon class.


CRRingEvent

Swift
public enum CRRingEvent : Int32 {
    case Tap
    case LongPress
}
Objective-C
typedef NS_ENUM(int, CRRingEvent) {
  CRRingEventTap,
  CRRingEventLongPress
};


CRRingMode

Swift
public enum CRRingMode : Int32 {
    case Gesture
    case Quaternion
    case Point
    case Event
}
Objective-C
typedef NS_ENUM(int, CRRingMode) {
  CRRingModeGesture,
  CRRingModeQuaternion,
  CRRingModePoint,
  CRRingModeEvent
};


CRQuaternion

Swift
public struct CRQuaternion {
    public var w: Float
    public var x: Float
    public var y: Float
    public var z: Float
    public init()
    public init(w: Float, x: Float, y: Float, z: Float)
}
Objective-C
typedef struct {
  float w;
  float x;
  float y;
  float z;
} CRQuaternion;


CR_ERROR_DOMAIN

Swift
public var CR_ERROR_DOMAIN: String { get }
Objective-C
#define CR_ERROR_DOMAIN @"jp.logbar.corering"

The error domain which is used by NSError in Ring iOS SDK .


CRErrorCode

Swift
public enum CRErrorCode : Int32 {
    case Unknown
    case Success
    case InvalidPoints
    case SQLiteError
}
Objective-C
typedef NS_ENUM(int, CRErrorCode) {
  CRErrorCodeUnknown = -1,
  CRErrorCodeSuccess,
  CRErrorCodeInvalidPoints,
  CRErrorCodeSQLiteError
};


Preset Gestures and Points String


CRCommon class

Swift
public class func imageWithPoints(points: String!,
                                  width: CGFloat,
                                  lineColor: UIColor!,
                                  pointColor: UIColor!) -> UIImage!
Objective-C
+ (UIImage *)imageWithPoints:(NSString *)points
                       width:(CGFloat)width
                   lineColor:(UIColor *)lineColor
                  pointColor:(UIColor *)pointColor;
Returns a UIImage object which represents the path of a gesture which is passed to its argument.

Arguments

See also
Gestures and The Gesture Mode