Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. stupid iPhone

stupid iPhone

Scheduled Pinned Locked Moved The Lounge
iosquestion
15 Posts 9 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Christian Graus

    So, the iPhone has a control called a UIScrollView. It is nice, I give it a view ( such as an image ) and I get scrolling/panning for free. But, it seems I cannot set the zoom or scroll position in code. So, if I zoom and then go to another image, the image starts zoomed. If I try to get around this in code, the best I can do, if my initial zoom range is 1 to 4, and I am zoomed to 3, I make my range from 3-12 and I draw the image scaled to that factor. If I try to do this with a text control, the text goes all blurry. It's a real mess. Why would you write a control and not let the programmer set it's state ?

    Christian Graus Driven to the arms of OSX by Vista.

    C Offline
    C Offline
    code frog 0
    wrote on last edited by
    #5

    It's called a scrollview not a zoomview. :rolleyes: ;P

    1 Reply Last reply
    0
    • C Christian Graus

      So, the iPhone has a control called a UIScrollView. It is nice, I give it a view ( such as an image ) and I get scrolling/panning for free. But, it seems I cannot set the zoom or scroll position in code. So, if I zoom and then go to another image, the image starts zoomed. If I try to get around this in code, the best I can do, if my initial zoom range is 1 to 4, and I am zoomed to 3, I make my range from 3-12 and I draw the image scaled to that factor. If I try to do this with a text control, the text goes all blurry. It's a real mess. Why would you write a control and not let the programmer set it's state ?

      Christian Graus Driven to the arms of OSX by Vista.

      J Offline
      J Offline
      Jim Crafton
      wrote on last edited by
      #6

      I looked up UIScrollView on google and noticed that people mention a delegate class. In Cocoa a lot of the classes have delegates that allow you to customize the way the control works. Have you checked this out? It might have methods that you can implement to do what you want. //edit UIScrollViewDelegate protocol - that's *possibly* what you want to look at. Maybe, just guessing... Found this too: http://halmueller.wordpress.com/2008/10/08/a-very-simple-uiscrollview-demo/[^] Is this at all similar to what you're referring to?

      C 1 Reply Last reply
      0
      • C Christian Graus

        So, the iPhone has a control called a UIScrollView. It is nice, I give it a view ( such as an image ) and I get scrolling/panning for free. But, it seems I cannot set the zoom or scroll position in code. So, if I zoom and then go to another image, the image starts zoomed. If I try to get around this in code, the best I can do, if my initial zoom range is 1 to 4, and I am zoomed to 3, I make my range from 3-12 and I draw the image scaled to that factor. If I try to do this with a text control, the text goes all blurry. It's a real mess. Why would you write a control and not let the programmer set it's state ?

        Christian Graus Driven to the arms of OSX by Vista.

        T Offline
        T Offline
        Todd Smith
        wrote on last edited by
        #7

        Delete it and create another instance each time you want to change the image? The state might be built up from a series of transformations like you would do in a 3D application. That might make setting the state a bit more challenging.

        Todd Smith

        C 1 Reply Last reply
        0
        • C Christian Graus

          So, the iPhone has a control called a UIScrollView. It is nice, I give it a view ( such as an image ) and I get scrolling/panning for free. But, it seems I cannot set the zoom or scroll position in code. So, if I zoom and then go to another image, the image starts zoomed. If I try to get around this in code, the best I can do, if my initial zoom range is 1 to 4, and I am zoomed to 3, I make my range from 3-12 and I draw the image scaled to that factor. If I try to do this with a text control, the text goes all blurry. It's a real mess. Why would you write a control and not let the programmer set it's state ?

          Christian Graus Driven to the arms of OSX by Vista.

          P Offline
          P Offline
          PTJA
          wrote on last edited by
          #8

          Not so stupid: comparison[^] or another link[^]

          -- Jarek Andrzejewski

          1 Reply Last reply
          0
          • J Jim Crafton

            I looked up UIScrollView on google and noticed that people mention a delegate class. In Cocoa a lot of the classes have delegates that allow you to customize the way the control works. Have you checked this out? It might have methods that you can implement to do what you want. //edit UIScrollViewDelegate protocol - that's *possibly* what you want to look at. Maybe, just guessing... Found this too: http://halmueller.wordpress.com/2008/10/08/a-very-simple-uiscrollview-demo/[^] Is this at all similar to what you're referring to?

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #9

            Yeah, the delegate tells me what I am zoomed to. It doesn't let me set anything tho. I will look at this sample, the way that it makes the images crisp again may be what I need for my label, excepting that I'm not sure if I can use CATiledLayer in my code....

            Christian Graus Driven to the arms of OSX by Vista.

            1 Reply Last reply
            0
            • T Todd Smith

              Delete it and create another instance each time you want to change the image? The state might be built up from a series of transformations like you would do in a 3D application. That might make setting the state a bit more challenging.

              Todd Smith

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #10

              Todd Smith wrote:

              Delete it and create another instance each time you want to change the image?

              Yeah, that is a possible solution, but I'm nervous about doing it that way.

              Christian Graus Driven to the arms of OSX by Vista.

              1 Reply Last reply
              0
              • C Christian Graus

                *grin* well, I wrote my own, and it worked OK, but it wasn't as sexy, and I prefer to use the standard controls, so the behaviour is exactly as people expect. But yeah, I got less than I paid for with this phone, I tell you.

                Christian Graus Driven to the arms of OSX by Vista.

                L Offline
                L Offline
                l a u r e n
                wrote on last edited by
                #11

                i'm in san fran ... do you need me to pop down to cupertino and get you a fresh batch of kool aid? sounds like yours is wearing off :rolleyes:

                "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

                C 1 Reply Last reply
                0
                • L l a u r e n

                  i'm in san fran ... do you need me to pop down to cupertino and get you a fresh batch of kool aid? sounds like yours is wearing off :rolleyes:

                  "mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them"

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #12

                  My new Mac Pro is evening the score in Apple's favour. I still hate the damn phone tho.

                  Christian Graus Driven to the arms of OSX by Vista.

                  1 Reply Last reply
                  0
                  • C Christian Graus

                    So, the iPhone has a control called a UIScrollView. It is nice, I give it a view ( such as an image ) and I get scrolling/panning for free. But, it seems I cannot set the zoom or scroll position in code. So, if I zoom and then go to another image, the image starts zoomed. If I try to get around this in code, the best I can do, if my initial zoom range is 1 to 4, and I am zoomed to 3, I make my range from 3-12 and I draw the image scaled to that factor. If I try to do this with a text control, the text goes all blurry. It's a real mess. Why would you write a control and not let the programmer set it's state ?

                    Christian Graus Driven to the arms of OSX by Vista.

                    P Offline
                    P Offline
                    Paul Watson
                    wrote on last edited by
                    #13

                    OT: What are you guys doing about automated testing for your iPhone apps? Unit testing and coverage is easy enough but we are struggling to find an acceptance testing solution. My current, and awful, idea is to use Automator to simulate "clicks" in the iPhone simulator, take screenshots and compare against baseline screenshots... (I'll ask some co-workers about UIScrollView when I get in to work, they know more than I do.)

                    cheers, Paul M. Watson.

                    C 1 Reply Last reply
                    0
                    • P Paul Watson

                      OT: What are you guys doing about automated testing for your iPhone apps? Unit testing and coverage is easy enough but we are struggling to find an acceptance testing solution. My current, and awful, idea is to use Automator to simulate "clicks" in the iPhone simulator, take screenshots and compare against baseline screenshots... (I'll ask some co-workers about UIScrollView when I get in to work, they know more than I do.)

                      cheers, Paul M. Watson.

                      C Offline
                      C Offline
                      Christian Graus
                      wrote on last edited by
                      #14

                      Our app is simple enough that we won't do much more than do some testing ourselves and run with that. We don't have any other resources...

                      Christian Graus Driven to the arms of OSX by Vista.

                      P 1 Reply Last reply
                      0
                      • C Christian Graus

                        Our app is simple enough that we won't do much more than do some testing ourselves and run with that. We don't have any other resources...

                        Christian Graus Driven to the arms of OSX by Vista.

                        P Offline
                        P Offline
                        Paul Watson
                        wrote on last edited by
                        #15

                        Fair enough. If you do come across some kind of acceptance test framework please drop me a line. Our testing department is grumbling :)

                        cheers, Paul M. Watson.

                        1 Reply Last reply
                        0
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        • Login

                        • Don't have an account? Register

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • World
                        • Users
                        • Groups