1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Does the magnifying glass work on images

Discussion in 'iPhone/iPad Programming' started by imPoddible, Jan 18, 2009.

  1. macrumors member

    #1
    You see that funky magnifying glass that pops up when you're editing text?

    Well, can that be used to move around an image? For example, suppose I had a full screen image, could I then scroll around that image with the magnifying glass following my finger movements?

    How difficult would this be to implement in an application?

    Thanks!

    imPoddible.
     
  2. macrumors regular

    xsmasher

    #2
    Not the magnifying glass, but UIScrollView lets you scroll around a larger area, and zoom/pinch. It's what's used in the photo app, where you can zoom/pinch a photo.
     
  3. macrumors 68030

    PhoneyDeveloper

    #3
    The functionality of that magnifying glass isn't exposed in the SDK so you'd have to implement it yourself.

    Many years ago I wrote something similar for MacOS. If you have an offscreen version of the onscreen image then it becomes a matter of compositing a region of the offscreen onto the onscreen view. Actually it might be simpler to have a view with transparency to make it appear circular and then to blit from the offscreen higher res image to this viewport. How hard that is to do depends on your background but I think the hardware and OS would be up to it, depending on how big your magnifying glass needs to be.
     
  4. macrumors member

    #4
    Thanks for the response - yup I toyed with the idea of implementing things this way but for the look I want to achieve, it's not quite right.

    Hmmm.... OK - that's sounds like what I'll have to do. I have no idea *how* I'm going to do it, but I'll give it a try! Shame it's not implemented in the SDK.

    Thanks both for the feedback - much appreciated!

    imPoddible.
     

Share This Page