Created
July 7, 2017 17:21
-
-
Save pilky/727d3138c5f4de59fee45824b104a236 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Obj-C | |
typedef NSString * ABCMessageField NS_STRING_ENUM; | |
extern ABCMessageField const ABCMessageFieldSubject; | |
extern ABCMessageField const ABCMessageFieldFrom; | |
//Expected Swift (according to https://developer.apple.com/library/content/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithCAPIs.html#//apple_ref/doc/uid/TP40014216-CH8-ID17) | |
struct ABCMessageField: RawRepresentable { | |
typealias RawValue = String | |
init(rawValue: RawValue) | |
var rawValue: RawValue { get } | |
static var subject: ABCMessageField { get } | |
static var from: ABCMessageField { get } | |
} | |
//Actual Swift | |
public struct ABCMessageField : RawRepresentable, Equatable, Hashable, Comparable { | |
public init(rawValue: String) | |
} | |
public static let subject: ABCMessageField | |
public static let from: ABCMessageField |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment