0

UPDATE: The accepted answer led to CATransformations and this question Using CATransform3D which is the right direction however I am still having issues with it.


I'm very new to iOS and Objective-C and am very stuck on how I can apply an effect on a whole table view.

I'm trying to create a table view the appearance of the something similar to the Star Wars opening crawl.

I'm having great difficulty in finding out how to add effects of this kind to tableviews.

Ideally I will need to be able to make the text go in any direction but would settle for just going up for now.

The text will be added dynamically and also the list will need to work in reverse i.e go up and down.

My initial thoughts were to change the shape of the tableview from a rectangle to a trapezium and shrink the text as got higher up the screen, however I could not find any information on how to create the shape of the whole tableview and not just the individual cells (like shrinking/growing the cell size dynamically depending on where it is on screen).

My second thought was to apply a generic effect on the table view by squashing the top of it to create the trapezium shape and then the text inside the cells would automatically be the correct size (due to them all being squashed by the effect). However again I could find no information on applying an effect of this nature.

Any help, ideas or direction would be greatly appreciated?

Community
  • 1
  • 1
SomeGuy
  • 64
  • 1
  • 9

1 Answers1

0

Since every UIView (and thus every UIView subclass), is backed by a CALayer, you should be able to set the transform property on the UITableView's layer to achieve this visual effect.

#import <QuartzCore/QuartzCore.h>

tableView.layer.transform = ...;

More here: How do I apply a perspective transform to a UIView?

Community
  • 1
  • 1
JuliusO
  • 121
  • 4
  • Thanks, I hadn't found/seen this post, it looks like this is what I need but shall investigate and update here. Visual stuff really isn't my forte, any more advice on how I could create the trapizium shape on the CALayer? – SomeGuy Feb 02 '13 at 15:18