This file contains hidden or 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
package xyz.vivekc.shared | |
import java.util.* | |
actual fun getCurrentDate() = Date().toString() |
This file contains hidden or 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
package xyz.vivekc.shared | |
import platform.Foundation.NSDate | |
actual fun getCurrentDate() = NSDate().toString() |
This file contains hidden or 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
package xyz.vivekc.kotlinmultiplatformdemo | |
import android.os.Bundle | |
import android.support.v7.app.AppCompatActivity | |
import android.widget.TextView | |
import xyz.vivekc.shared.getDate | |
class MainActivity : AppCompatActivity() { | |
override fun onCreate(savedInstanceState: Bundle?) { |
This file contains hidden or 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
import UIKit | |
import shared | |
class ViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 230, height: 21)) | |
label.center = CGPoint(x: 160, y: 285) |
OlderNewer