How to call non-UIKit functions for iOS


#1

I’m trying out the konan iOS sample app, and hoping I can create a view directly from kotlin, without going through Storyboards. One thing I’m not sure how to do is how to directly the same frame of a view.

I’m trying call CGRectMake(0, 0, 100, 100) to set the frame of the view I created, calling it directly results in an error message “Unresolved referece CGRectMake”. Is there something I need to do to import it?

Not sure who the correct people are; maybe @yole or @elizarov?


How to call a selector from kotlin for iOS
#2

I’ve tried including CoreGraphics in objc.def and it works.

headers = Foundation/Foundation.h UIKit/UIKit.h
headerFilter = Foundation/** UIKit/** CoreGraphics/**
language = Objective-C
linkerOpts = -framework Foundation -framework UIKit -framework CoreGraphics

But still not figured out how to set a field in a struct by its name.