Does the magnifying glass work on images

Discussion in 'iOS Programming' started by imPoddible, Jan 18, 2009.

  1. imPoddible macrumors member

    Jul 13, 2008
    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?


  2. xsmasher macrumors regular


    Jul 18, 2008
    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. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    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. imPoddible thread starter macrumors member

    Jul 13, 2008
    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!


Share This Page