Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

Forums

OverviewFelgo 3 Support (Qt 5) › Get iOS enumerations with NativeObjectUtils

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #24995

    Makoren

    NativeObjectUtils handles most iOS native objects fine, but I can’t find an option for enumerations, for example UIImpactFeedbackStyle when dealing with haptics. I’ve tried using getClass and getStaticProperty, but both of them return nothing when used on an enum.

    The obvious workaround is to write a quick Objective-C class to use haptics, but is there a way to do this with QML?

    #24998

    Alex
    Felgo Team

    Hi,

    enums in “readable” format are currently not yet supported with Native Components. I would recommend using the associated integers directly for now, or create a QML enum or object reflecting those enums for use in the code. The integers can be vewied in the iOS docs when selecting “Swift” as language: https://developer.apple.com/documentation/uikit/uiimpactfeedbackgenerator/feedbackstyle/heavy

    We usually add a code comment alongside such a call then, with the proper enum to better keep track of that, and to potentially replace this with a proper enum support in the future.

    I hope this helps.

    Best,
    Alex

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded