how to create paginated camera overlays - iphone

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.
Firstly there will be the camera
on top will be a scroll view (paginated)
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,

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

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.

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.

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.

Related

iCarousel ZOOM(pinch)

I would like to add zooming capabilities to the currentItemView . I've tried to create a scrollview and add it as a subview of the view from the datasource method. But had no luck doing it.
If anybody has an example and is willing to share it please do so. Or at least some proper steps in order to succeed. Thanks.
Add an GestureRecognizer to the View.
First of All Add an UIImageView to the View which is of same size as the Icarousel images.
Then Add that UIImageView into the ScrollView now you can ZOOM the UIImageView you have created.
AfterWards add the respective code in Icarousel DidBegin Scroll method to hide the UIImageView.
Since I'm not having that much time, but i have an example for you in GitHub for showing an example of Presenting an Animation with Icarousel, you can find it Here :)

iPhone Google Chrome - Tab selection screen (Grouped UIViews)

I am working on an app for iOS and I have to do a tab selection screen like the Google Chrome app for iPhone (I attached a screenshot). I searched a lot but I didn't found any similar control to use. As i can see, it groups some UIViews and use a UIScrollView to scroll, but maybe any of you could explain me better how this control works or have any solution.
Thank you!
http://i.stack.imgur.com/rCG5g.png
Create Different UIViews with your controls.(One tab is equal to is on UIView)
Add this UIView's on UIScroll View.(This is optional. It's ok if you don't use the UIScrollView and add UIView on self.view
Implement the touch method on UIView.
When you get a particular UIView is touched change it's center position to Center of the screen.
Which will give you the UIView which is touched in foreground and rest of the Views in background.
Hope this will help you .........
I solved my problem with this ......
https://github.com/xxhp/BrowserTabViewDemo

UIScrollview zoom refresh content

I am currently using a uiscrollview to zoom views in and out. If I have a textview, the font becomes blurred after it is zoomed in. Can I force the content to refresh? i.e setneedsdislay ?
you need to modify this behavior in scrollView delegate method -
- (void)scrollViewDidZoom:(UIScrollView *)aScrollView
or
- (void)scrollViewDidEndZooming:(UIScrollView*)scrollView withView:(UIView*)view atScale:(float)relScale
Check out the CATiledLayer example provided by the ScrollViewSuite sample code.
The TapToZoom example illustrates a way to get the view to redraw its content when one zooms in. I.e. you need to somehow set your view's frame to be larger than the screen, or maybe you can also use transforms - however, I never used transforms before.

Put another view above self.imagePickerController.cameraOverlayView?

I want to customize new camera overlay view, so need figure out one way to put new view above self.imagePickerController.cameraOverlayView.
I have tried those ways
[self.view bringSubviewToFront:self.imagePickerController.cameraOverlayView];
[self.imagePickerController.cameraOverlayView bringSubviewToFront:self.view];
[self.view insertSubview:self.view aboveSubview:self.imagePickerController.cameraOverlayView];
But none can work.
Seem that the only way is
self.imagePickerController.showsCameraControls = NO;
Therefore build my own components like iPhone.Camera
I think the idea with the cameraOverlayView is that you use this as a base UIView for anything you'd like to overlay on the camera view. This main overlay view can be transparent, and you just need to place whatever views you want to overlay on the camera as subviews of it.
You can order these subviews however you want within the overlay to achieve the desired visual effects.
Additionally, I recommend watching the WWDC 2010 video session 421 - "Incorporating the Camera and Photo Library in your App", where they go into detail on how to manage camera overlay views. I believe that Apple's PhotoPicker sample application also shows this off.

How to zoom image in iPhone?

I need to zoom an image in iphone...while the user double clicks on the image it will be zoomed in and on the next click it will be zoomed out....Can anybody direct me to how to do this???
You would probably have to use the size property of UIImage, triggered by UIImageView's touchesBegan method.
You can also use animations if you want the zoom effect to be smooth.
Another option could be to place your UIImageView inside a UIScrollView, or use a UIWebView.
Also, I suggest you take a look at the Three20 project. I think TTPhotoView supports zooming.
If you want to zoom and scroll your view, you need a UIScrollView. Tricking it to do what you want used to be very hard, however the problem of programmatic zooming of UIScrollView is now solved.
I have a described how to do it, created ZoomScrollView class (a drop-in subclass of UIScrollView) to encapsulate the solution and provided a working example at github.com/andreyvit/ScrollingMadness/ (the README contains a long description of two UIScrollView tricks and the reasoning behind them).