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.
Related
The Facebook iPhone app loads the low res images first and then it loads up the high res in the background and it gets better when the image loads. What is the process in doing something like this?
You'll want to use a CATiledLayer inside of a UIScrollView. Check out Advanced Scroll View Techniques from WWDC 2011. Slides can be found here.
Has anyone used the Instagram app lately?
It has a very neat feature, where, while you are using camera, you can touch the 'eye' button, which pops up a small scrollable UI area that contains different filters that can be applied to the camera video.
Can anyone help me on what kind of UI element I should use to get such popup?
Thanks.
The one on the Instagram app looks like a simple UIScrollView with custom subviews added in. What these subviews contain and how they look is completely up to you and your design.
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.)
I have a big webview in my iPad app and scrolling performance seems to be a big issue, especially the first time you browse the webview. In mobile Safari, the scrolling is extremely smooth and the page simply appears as a transparent checkerboard pattern and loads in as it comes into view. From what I've read, the way to handle this is using CATiledLayer, but I have no idea how to implement this. Can anyone point me in the right direction? Thanks!
A UIWebView should already do its own tiling behind the scenes. There's no way to manually back a UIWebView with a CATiledLayer that I'm aware of, due to its complex rendering architecture.
If you create a UIWebView that is only the size of the display, the only reason I could think of for slower scrolling than Mobile Safari would be other overlaid views that need to be composited on the web view when scrolling.
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).