UITableViewCell in normal UIView? (Interface Builder)

Discussion in 'iOS Development' started by spykr, Mar 3, 2009.

  1. spykr

    spykr Banned

    Joined:
    Jan 4, 2009
    Messages:
    109
    Likes Received:
    0
    Copied and pasted from iPhone Dev SDK, where noo ne ever replies...

    I've seen a lot of applications that use UITableViewCell's as buttons like this:
    http://www.freshbooks.com/images/addons/iphone.jpg

    I know how to put a Cell in a View in IB, but I don't know how to use it.
    I've tried setting up an IBOutlet UITableViewCell *testCell, linking it up and running a testCell.text command, but that doesn't work.

    Any help?
  2. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    Although i'm not sure that you can have UITableViewCell's in a UIView and working, i do know that you could just make a custom UIButton.
  3. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    You can do that any number of ways. What I would do is simply add a UITableView to a regular view, set its background to clear, and disable scrolling.

    But, just remember that a UITableViewCell is just another UIView, so do what you want with them.
  4. Steaps

    Steaps New Member

    Joined:
    Oct 24, 2007
    Messages:
    5,074
    Likes Received:
    41
    Device:
    iPod touch
    Didn't even think of doing that, thanks.
  5. bddckr

    bddckr Active Member

    Joined:
    Dec 2, 2007
    Messages:
    1,434
    Likes Received:
    18
    Device:
    iPhone 4 (Black)

Share This Page