Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 443 Bytes

Classes and functions.md

File metadata and controls

24 lines (17 loc) · 443 Bytes

Classes and functions

You can instantiate Kotlin classes and call Kotlin functions from Swift: SimpleClass().simpleFunction().

Explanations

In Kotlin:

class SimpleKotlinClass {
    fun simpleKotlinFunction(): String {
        return "Kotlin member function in Kotlin class returning String value"
    }
}

In Swift:

print(SimpleKotlinClass().simpleKotlinFunction())

Table of contents