How to recreate a Pulse-like UI? - iphone

I was wondering how to make image display through a table like the application Pulse on iPhone. I used UIScrollView but it did not help much. It only displayed images in a nice array-like manner but you could not produce an event or click on the image.
What's the best way to produce a Pulse like application for displaying images and heading information in an array-like style?

use Ray Wenderlich tutorial about THIS topic
tutorial

The Ray Wenderlich pulse tutorial does have an issue where if the horizontal table view has not been scrolled (or its first element is aligned with the left of the screen) you can't drag right and have the content pull that way and then bounce back. This makes the scrolling experience feel pretty bad.
The simple solution though is to put the horizontal table view inside a scroll view and then everything just works.

It looks like a UITableView with rows that are composed of UIImageViews. Its got a nice touch where you can scroll horizontally within a row, like with Twitter's app. That's most likely done with a UIScrollView (scroll bars removed, with end bounce). Peter Boctor wrote a web blog post on how to do something similar, if I recall.

It's a UITableView with each row containing a UITableView that is rotated by 90°. The cells for the UITableView in each row are custom views that are likely either subclasses of UIImageView or just plain UIView.

Related

UITableViewCell with a horizontal UITableView

I want to implement a vertical UITableView whose cells contain horizontally scrolling table views. It should behave pretty much like the table view in the Pulse app. That, as mentioned by the developers in their Stanford presentation, contains horizontal table views in each cell.
I've read Ray Wenderlich's blog post, but he mentioned that in iOS 5 it can be done a lot easier than his tutorial and that the procedure would be described when iOS 5 is released (which it has been for almost a year and no blog post about the matter has been posted).
Could someone please give me a hint how to go about it? I am adding a tableview to my cells and I'm rotating it by -M_PI_2. The width of the cells is set to be the height of the cells in the main table. The height of the horizontal table is set to be 320. However, it doesn't scroll when I start moving my finger on it and I don't really know why.
Sorin
I have found the answer (the Ray Wenderlich tutorial on the matter)
http://www.raywenderlich.com/4723/how-to-make-an-interface-with-horizontal-tables-like-the-pulse-news-app-part-2

Vertical and horizontal scoll at a time in gridview with infinite scrolling IOS

How can one enable horizontal and vertical scrolling at same time in a grid view?
If I have a 4x4 grid of thumbnail images, I want to implement swiping in both directions, left/right and top/bottom. Currently I am done with left and right swipe, but if I select the second cell and swipe towards the top, the 2nd row should be scrolled like a Rubik's cube.
Please share if any one have any idea.
It's been quite a while since your question but as I've been struggling with the same thing I'm gonna answer it for future reference...
Sadly I could not find a good solution anywhere so after a lot of hours of experimenting I came up with this: https://github.com/AlvinNutbeij/DWGridController
It's still a work in progress but very usable for your purpose I'd say!
How have you currently implemented what you have? Your mention of 'cell' makes it sound like you are using a UITableView. You won't manage to make one of those scroll in both directions, you'll need to work with a UIScrollView.
I suggest you watch "Designing apps with Scroll Views" from WWDC 2010, then "Advanced Scrollview Techniques" from WWDC 2011. That'll teach you about how you implement tiling and infinite scrolling.
Essentially what you want to do is implement some kind of view recycling yourself, that works like the way UITableView recycles its cells. When things are scrolled off one side of the scroll view, you remove the views for the things that just scrolled off screen and put them in a queue. When things scroll onto the screen, you pull views out of the queue (or create new ones if the queue is empty) and lay those views out in the correct place.
To do the infinite scrolling, you fake it: when your scroll view gets near its edge, you reposition everything inside it, you move the scroll view's content offset to where you've repositioned the views, and then you continue from there: it's all done at once so the user never notices.
The videos will explain these techniques better than I can sum up here: watch those as your first point of call.

Special UIScrollView with multiple objects (3) on each page

What I want to accomplish is something like this:
Two different scrollViews, and each one scrolls horizontically. Each showing 3 images, and a half one (or 1/3th) piece of the next image in the datasource of the scrollview.
Does anyone know how to accomplish such a scrollview?
I also want to be able to tap an image to flip it and show some information and a button to the detail. (See lower scrollview).
Tapping it again would just show back the image, much like the coverflow ui inside itunes, but without the coverflow being 3D...
Any help is welcome :)
Thanks in advance,
Lewion
Scroll view doesn't have a datasource. What you are looking for is standard scrolling and nothing special.. So it is definitely doable... Check the scrolling and photo scroller sample codes from apple developer samples. For more implementations of scroll view check the scroll view suite sample code and read the scroll view programming guide.
The flip animation is also a standard animation for a view and is easily doable. For example, create a utility application for iphone. It has a flip side view. See how that animation is done.

How to implement UITableView with multiple columns and sideways scrolling

I'm thinking about how I could achieve this kind of UITableView: http://snapplr.com/c1x5
So it has multiple (separately selectable) columns in it which also differ in width. Apart from that it can also scroll sideways to see programs which broadcast later on the day.
Now, I'd like to know how you would implement this kind of feature. A scrollview wouldn't be enough, it has to somehow load newer data. And of course you need to be able to know what column in the cell has been selected.
Hope to hear some thoughts.
That is a custom view.
It's possible it could be a table view, with heavily customised cells, but that would have been a hell of a lot of work to get it scroll horizontally too.
It's more likely that it's a scroll view with a custom grid view type class that have support for arbitrary grid cell widths...
I'm sure if you write something like this you'll have a lot of interested people.
I just updated MDSpreadView, which is basically a UITableView that works both horizontally and vertically, floating headers and all, with an API very similar to UITableView.

Nested UIScrollView-iPhone photos application

I have been facing the same nested UIScrollView problem for long time.I tried some open source codes like Scrolling madness ,three-20 and others but all fails finaly.I am trying to make a photo Viewer application same as iPhone.For that I have created the structure like this:-
1)one View controller.
2)on view of view controller one UIScrollView (i.e inner/parent scroll view) as a child.
3)on inner/parent scroll view number of child scroll views(i.e. outer/child scroll views) ,each represents one page of photos application.
4)On each scroll view one image View on which i am displaying my image.
So what I want is when user scrolls the outer scroll view it should scroll horizontally with all the child views so I will get the look and feel of paging in photos application.Also when user is on one specific image(i.e. child/outer scroll view) he should be able to zoom in/out,swipes and perform single/double tapping.I was able to make it work in sdk 2.1,but it dosnt work since sdk 3.0.Please tell me the idea behind your project.Means which scroll view you are subclassing ,in which view to detect touches.How this completely child - parent relation should be.
If possible provide any sample code also.
There is a WWDC session from 2010 that deals with this very issue.
Here's the short of it:
You need a single scroll view that is paginated and scrolls horizontally. Each "page" of that scroll view is another scroll view containing a photo.
First, it looks like you want to subclass UIScrollView? Every interaction method you need is provided for you in either the delegate callbacks or the touch methods. (Many of Apple's more advanced classes, such as UIScrollView, react poorly to subclassing.)
Second, it sounds like you have a first responder problem. IOW, your innermost scrollview isn't getting the first crack at the touch events.
Andrew
I also struggled with this for a long time trying samples you mentioned. I could finally figure it out with the samples provided by apple (iphone dev center).
http://developer.apple.com/iphone/library/samplecode/Scrolling/Introduction/Intro.html
http://developer.apple.com/iphone/library/samplecode/ScrollViewSuite/Introduction/Intro.html
The first one is pretty basic and probably what u already have. The second one is all about zooming, etc. Just study these and the samples you already have, I think you will be able to figure it out. On specific topics just come back here search for answers or post another question.
EDIT: I forgot this one check out these examples by Andrey Tarantsov hosted on github. This is what you want... http://github.com/andreyvit/ScrollingMadness