简体   繁体   中英

How to access UITableViewCell from UITableView in different UIViewController?

I have very complex cell in UITableView within UIViewControllerA . Now I need to use the same cell within UITableView of UIViewControllerB .

  1. How to do this without copy and paste views from one scene to another?
  2. Do not wanna use xib approach.
  3. Is it related to registerNib:forCellReuseIdentifier ?

You mentioned you don't want to use xib . Storyboards don't support this and therefore the last option you have is to construct your UITableViewCell in code. With the new Auto Layout anchors, it's not that bad.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM