Swift Example Code
// ˅
// ˄
public struct Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Swift Example Code
// ˅
// ˄
public enum Foo {
case red
case green
case blue
// ˅
// ˄
}
// ˅
// ˄
Using Class element
Swift Example Code
// ˅
// ˄
public protocol Foo {
// ˅
// ˄
}
// ˅
// ˄
Using Interface element
Swift Example Code
// ˅
// ˄
public protocol Foo {
// ˅
// ˄
}
// ˅
// ˄
Swift Example Code
// ˅
// ˄
public class Foo {
// ˅
// ˄
internal var sum: Int
// ˅
// ˄
public func calc() {
// ˅
// ˄
}
// ˅
// ˄
}
// ˅
// ˄
Swift Example Code
// ˅
// ˄
public class Foo {
// ˅
// ˄
public convenience init() {
// ˅
// ˄
}
public init() {
// ˅
// ˄
}
// ˅
// ˄
}
// ˅
// ˄
Using TaggedValue
Swift Example Code
// ˅
// ˄
@objc(Bar)
public class Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Using Stereotype
Swift Example Code
// ˅
// ˄
@objc(Bar)
public class Foo {
// ˅
// ˄
// ˅
// ˄
}
// ˅
// ˄
Swift Example Code
// ˅
// ˄
public class Foo {
// ˅
// ˄
public init() throws {
// ˅
// ˄
}
// ˅
// ˄
}
// ˅
// ˄
Generate properties from attribute elements, and write getters and setters in the User Code Area - which is an area quoted with "˅" and "˄".
Swift Example Code
// ˅
// ˄
public class Foo {
// ˅
// ˄
var max: Int
// ˅
{
get {
return 100
}
}
// ˄
// ˅
// ˄
}
// ˅
// ˄