반응형


* Send

class SendClass {


    struct sendStruct {
        var name: String
        var age: String
    }

    var sendArray = [sendStruct]()

    func SendFunction() -> Array<sendStruct> {

        return sendArray

    }
}

* Receive

class RecevieClass {

    struct ReceiveStruct {
        var name: String
        var age: String
    }

    var ReceiveArray: Array<ReceiveStruct> = [ReceiveStruct]()

    let Send = SendClass()

    ReceiveArray =  Send.SendFunction().map {

        ReceiveStruct(name: $0.name, age: $0.age)

    }

}


반응형

+ Recent posts