iOS Question UIImage from B4IBitmap

Discussion in 'iOS Questions' started by Haris Hafeez, Jun 26, 2015.

  1. Haris Hafeez

    Haris Hafeez Active Member Licensed User

    I'm trying to get the UIImage object that is wrapped by the B4IBitmap object to use in a library. I have tried using

    UIImage* img = (UIImage *) b4iImageObject.object;

    But this doesn't work. Can someone give a hint as to how to use the wrapped object directly?

    I'm doing this because I'm trying to load the bitmap into an object that requires a UIImage* as the parameter. This is in relation to loading local files reliably for the photo browser library both in DEBUG and RELEASE modes. I have found that one way to handle this is to let the user pass Bitmap objects from their b4i code to the library, which can then get the UIImage* object that is wrapped by the bitmap. Or perhaps it doesn't work this way?

    Thanks.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    The compiler will do it automatically for you.

    Just set the method parameter type to: UIImage*.
     
  3. Haris Hafeez

    Haris Hafeez Active Member Licensed User

    Thanks. So if I'm iterating over a list of bitmaps, I can simply treat each item in the B4IList as a UIImage* ?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Yes.
     
Loading...