0

Two questions:

  1. I am trying to build a app that has a table view. I would like the user to click on a topic and then the next table view has a image on the left and text on the right. Does anyone know any sample code that would help me accomplish this?

    Example:

    iPad --> WiFi, and WiFi + 3G
    iPhone --> AT&T, Verizon

  2. Also is their a way to tag images in xCode? So in my table view I can only pull images with tag "x"?

Artem Shmatkov
  • 1,434
  • 5
  • 22
  • 41
Brandon
  • 11
  • 1
  • 2

3 Answers3

0

Check out http://developer.apple.com/library/ios/#samplecode/TableViewSuite/Introduction/Intro.html for sample code on how to implement table views.

I don't understand your question about tagging. You can use [UIImage imageNamed:] to pull in images that are bundled in your app. Name them as you will.

See Dispelling the UIImage imageNamed: FUD for a discussion of this method.

Community
  • 1
  • 1
Bill Garrison
  • 2,039
  • 15
  • 18
0

First of all make a navigation based app. This gives you an app with a view controller in place with a table view on the screen.

Take a look at these for more info:

UITableViewController Class Reference

UITableViewCell Class Reference

In this last one take a look at initWithStyle:reuseIdentifier:, this will allow you to use the style you need, if you have default and add a picture to this cell it will show in the left side, pushing the text a little to the right.

Manuel
  • 10,153
  • 5
  • 41
  • 60
0

For tagging an image you can simply do
image.tag = tagNumber;
For the cell image you can have like this:
image.tag = tagNumber;
cell.imageView.image = image;

Artem Shmatkov
  • 1,434
  • 5
  • 22
  • 41
Krishnachandra Sharma
  • 1,332
  • 2
  • 20
  • 42