Zoom functionality for iPhone Application - iphone

I am developing an iPhone Application, now I want to add Zoom in - Zoom out feature in some of my views (I want to add zoom effect for UITableview and UITextview). Please provide me some good tutorials or some working codes.
Thank you.

The best way to add a Zoom functionality in your app is to use a UIScrollView.
It supports zooming an panning.
Here is some sample code from Apple:
ZoomingPDFViewer

Related

iPad: How can I implement a scrolling timeline using a static image?

I'm diving into iOS development and I'm building a simple timeline app using a static timeline image that I already have. The timeline image won't fit on the screen. The width of the image is about five times the width of the iPad screen, so I have to allow the user to scroll the image horizontally. Here's a mockup...
For each item on the timeline, the user can tap it to receive a description at the bottom of the screen. My questions are...
I was planning to use a UIScrollView with a PageControl at the bottom. Can a UIScrollView hold a single view that holds the entire timeline image or do I have to break the the timeline image up into multiple views?
Are there any performance issues I need to consider when implementing this with a UIScrollView, using a static image?
Are there other approaches to implementing this scrollable timeline that I should consider other than using a UIScrollView?
Thanks so much in advance for your wisdom!
Yes, you'll need a UIScrollView. However, you could use a CATiledLayer to make it perform well. You would just need to pre-tile your static image. Try out the ShutterStock app in the app store (it's free). They have a really nicely done horizontal scrolling implementation that I believe uses a CATiledLayer (though I'm not completely sure).
I did a tutorial on using the CATiledLayer a while back. You can check it out here: http://www.cimgf.com/2011/03/01/subduing-catiledlayer/
If you are going to support iOS 6 and up only, you could look into using a UICollectionView which is very efficient. It works similarly to a UITableView with the cell re-use pattern, but allows you to have horizontal scrolling like you're looking for.

Multiple Views on one screen iPhone/iPad

I saw mulitple apps using this, e.g. Facebook iPad App, Twitter iPad App .
How is it implemented, that multiple views can be draged in and out to the main view?
It seems as they are all in one chain of views.
I can't figured it out.
Thanks for your help.
Twitter and Facebook both do some pretty custom stuff for their iPad apps. They also both have lots of open source iOS code that helped them do it. Check out TWUI from Twitter and Three20 from Facebook.
A slightly easier way to do a similar effect is to use a UISplitViewController. A split view controller is kind of like the big brother of a UINavigationController on the iPhone.
You can add multiple subview uiviews on top of each other and move them when needed with cabasicanimation..
Also another and probably better way is using layers in quartzcore. You can addsunviews to layers and arrange them however you want. You can even make layers drop shadows and have rounded edges..

How did Feedly implemented custom pagecontrol for its app for iPhone?

Feedly for iPhone comes with cool design especially its custom pagecontrol(scrollbar?) placed on the top.
I'm developing an app for iPhone, and to use spaces efficiently as much as it's possible I'm trying to find a way to implement custom pagecontrol like Feedly. I actually think it's possible the app is made with HTML5 and CSS? Although I am not sure. I found some custom opensourced pagecontrol frameworks, but they're to do with something else such as dots' colors either sizes.
Here's example image link to Feedly for iOS http://i.stack.imgur.com/wf595.jpg
Although this is an iPad version, basically iPhone one is the same. You see the green bar just below the status bar, if you slide pages the colored bar scrolls. It's much more like scrollbar.
Thanks.
Okay, so I unarchived the app and it turned out it's mainly made with HTMLs and converted using PhoneGap. I'm not going to use HTML in my app, my journey still goes on...
Putting all contents into an UIWebView (implementing in HTML & CSS) is generally a bad idea performance wise.
What Feedly seems to do is use an UIScrollView.
The ScrollView sends several events including when it's moved and tapped.
They then update the green scroll bar on top whenever the ScrollView is moved.
Likely, they will also load the actual contents within the ScrollView as the user approaches their position to conserve memory.
You can implement something like this yourself in a few days of coding work.
(Disclaimer: This is just how I would implement what you showed. How it is actually done - only Feedly knows.)

JQTouch support for IPhone

I am building a website which provides support on Iphone also. I am using JQTouch jquery library(www.jqtouch.com) which provides multi-touch functionality like swipe, flip, back page.
It would be great to hear from you guys on how to extend zoom-in and zoom-out functionality for photos. Does JQTouch provide any readymade function for the same. Also I would like to hear more on the touch screen functionality that I could use more in my application.
Thanks in advance!
The JQTouch library specifically disables resizing the viewport, so you would not be able to use this for zooming in on photos. See this post which talks about performance, but also mentions that they disable the viewport resizing: http://blog.jqtouch.com/post/205113875/milliseconds-responsiveness-and-the-fast-tap
Normally this effect is achieved by using css techniques or a plugin like this.
You show a small version of an image and on mouse over and move, show a portion of a blown up version.
Here's a good jQTouch extension and demo for pinch, zoom, rotate and very flexible too: http://www.reddit.com/r/iphone/comments/bhkx3/jqtouch_gestures_extension_multitouch_events_and/
Basically you get to combine these events however you want.

iPhone Image Zoom Animation

I am writing my first iPhone app. I'm looking for direction on how to best accomplish an image zoom animation. I have a thumbnail sized image on the screen, and want to show a larger sized image overlaid on the view when the user taps on the thumbnail.
I've seen some suggestions for using the core animation framework. I saw another suggestion to use ImageKit. Is ImageKit available on iPhone, or just OSX?
Again, I'm just getting started, and looking for some guidance.
ImageKit is not available on iPhoneOS, so you have to use CoreAnimation from these choices.
Or you could try to use UIView animation blocks, which is much simpler (but limited compared with CA).