Skip to content

iOS native module: TiUIImageViewProxy is not exported from TitaniumKit and thus cannot be extendedΒ #14373

@grebulon

Description

@grebulon

I have searched and made sure there are no existing issues for the issue I am filing

  • I have searched the existing issues

Description

I'm developing a native module that implements ImageView with gif support. My initial intention was to either inherit from TiUIImageViewProxy and TiUIImageView and just add a gif property, or swizzle setImage_: to identify and support gifs.
Turns out that these classes are not exported from TitaniumKit and therefore cannot be used.
Instead of just inheriting (like I do for Android), I need to copy the entire source code to my native module.
Note that I also need to add functionality to Label/TextField and to ListView (which is more complicated) so I will have to copy that code too.

Note

  1. I know that the Titanium classes are linked by the xcode project directly to the app and are outside the kit. What I don't know is how to link and inherit in a native module. In Android, all the classes are in the aar unlike iOS.
  2. As an example, see: the TiGIF module which does this by adding a setGif_: method to TiUIImageView by swizzling it.

Solution

I'd appreciate it if you export all those classes directly from TitaniumKit. It will make everything much easier.
Or perhaps there's a simpler solution?

Alternatives

I considered modifying and building the TitaniumKit myself, but this will make it difficult to keep up with new versions because I will have to manually merge the code with every release.

Platforms

iOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    triagedThis issue has been reviewed by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions