2

I am new to iphone development, and i am wondering how would i go about placing a page control as an overlay for the camera, so that a user could swipe and different overlays would be shown for each page? This would have similar features as the The Sampler by Converse.

  1. Firstly there will be the camera

  2. on top will be a scroll view (paginated)

  3. each page will hold an image that is overlayed over the camera

4.(extra) i would like that image to zoomable

How would i go about writing this, or could someone point me in the write direction cause i am new to iPhone dev,

molleman
  • 2,934
  • 16
  • 61
  • 92
  • Can you elaborate on the definition of overlays? What do you expect to see when you swipe page? – Oscar Del Ben Sep 18 '11 at 20:29
  • I see what you mean now. If you're using iOS5 there are AV Foundation improvements that you can't take advantage of. If you have a developer account, take a look at the WWDC 2011 videos. Also, take a look at this answer http://stackoverflow.com/questions/2081872/camera-overlay-view-just-for-preview – Oscar Del Ben Sep 18 '11 at 20:44
  • ok i would like to develop for iOS4 ... i will look at the link other answer now – molleman Sep 18 '11 at 20:49

4 Answers4

3

You could use a UIScrollView with paging enabled, as someone else noted. There are some examples out there already of how to do this. Check this one out: https://github.com/mwaterfall/MWPhotoBrowser.

My best suggestion would definitely be to checkout the source for the PhotoScroller app by Apple: http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html

Michael Frederick
  • 16,664
  • 3
  • 43
  • 58
  • This doesn't work for some reason. After the first page scroll, the UIScrollView (which is the cameraOverlayView) stops receiving touch events. Any idea why? – bartzy Aug 25 '14 at 12:00
2

Just add a UIScrollView to your view and add the images as subviews to your picker. Make sure you enabled Paging on the scrollview as well.

WrightsCS
  • 50,551
  • 22
  • 134
  • 186
2

You would need to use the cameraOverlayView property of UIImagePickerController

The cameraOverlayView will essentially be a paginated scrollview, you can follow this sample code to see how to create and use cameraOverlayView:

PhotoPicker

Play with OverlayViewController in the above code and you'll achieve it.

Vibhor Goyal
  • 2,405
  • 2
  • 22
  • 35
0

For the zoomable image, you just would add a scrollview and display the image in it. The UIScrollView delegate has this method:

- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(float)scale.
Faser
  • 1,256
  • 1
  • 18
  • 36