The method signature is expecting a value of type EInkSizeType for param einkSizeType:, so the full signature would be:
sendImage(_ image: UIImage, einkSizeType: EInkSizeType)
Without knowing the exact framework, I can only guess the enum would be something like EInkSizeType.EInkSizeType420. Auto-complete should help you with this, simply start typing . as the parameter and a list of possible values should be shown. Therefore, assuming .EInkSizeType420 is the correct enum value your code should look like:
let image = UIImage(named: "nummer27")
// [[NFCTagReader sharedSingleton] sendImage:image einkSizeType:EInkSizeType420];];
// Converted to Swift 5.2 by Swiftify v5.2.19376 - https://swiftify.com/
NFCTagReader.sharedSingleton().sendImage(image!, einkSizeType: .EInkSizeType420)
Also, just a tip, in production try not to use ! (forced unwrapping) where possible and opt for ? (optional) unless the intended action for the app is to crash should the value be null. Instead, try to gracefully handle the unexpected case by using guard let ... else { ... }:
func sendImageToNFCTag() {
guard let image = UIImage(named: "nummer27") else {
// Show alert dialog that image couldn't be found here
// ...
return
}
// [[NFCTagReader sharedSingleton] sendImage:image einkSizeType:EInkSizeType420];];
// Converted to Swift 5.2 by Swiftify v5.2.19376 - https://swiftify.com/
NFCTagReader.sharedSingleton().sendImage(image, einkSizeType: .EInkSizeType420)
}
einkSizeTypemust be an instance of typeEInkSizeType(presumably an enum) rather than a string. - vadian.and wait for autocompletion (or press Ctrl+Space). Your option should be there... - Michael