1

I'm trying to take a snapshot of the iPhone simulator when a row in a table view is selected, before the new view appears. I have been unable to find a point where I can stop the simulator, with the row selected, so that I can take a snapshot of it. How do I do that?

Thanks for your time.

3 Answers 3

1

I assume you have the source code; Just comment out the code that does something when you select the row temporarily (- (void) tableview:didSelectRowAtIndexPath:), click the row, take the screenshot, uncomment the code.

Unless you call [tableview deselectRowAtIndexPath:animated:] the row will remain selected as long as the view is shown.

1
  • Thank you. Exactly what I wanted.
    – NP R
    May 6, 2009 at 23:53
1

This is a long shot but I noticed that on iPhone when you touch but not release the row gets selected but you don't get transitioned to new view until you lift your finger. Now on simulator on Mac (I assume) if it works the same way you may be able to set time out on your capture tool for a couple of seconds and then select the row and hold the mouse button down until the time out takes the snapshot. I was able to do similar stuff on other (not so popular) system but don't remember now if it works same way on Mac.

0

Try using the OS's screen capture facilities. For example, open Preview and choose File > Grab > Timed Screen, then switch back to the iPhone Simulator and hold the mouse button down on the row in the table view until the screen flashes. If you're more of a command-line person, try something like:

screencapture -T 2 foo.png & ; open -a 'iPhone Simulator'
1
  • Thanks stefanB and Nicholas Riley. Those were great solutions I didn't think of.
    – NP R
    May 6, 2009 at 23:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.