Your code was always wrong:
cell.addSubview(textField)
You must never add a subview to a cell. Add the subview to the cell’s contentView
.
More Related Contents:
- How to Implement Custom Table View Section Headers and Footers with Storyboard
- iOS 7 – How to display a date picker in place in a table view?
- UITableView didSelectRowAtIndexPath: not being called on first tap
- How to access the content of a custom cell in swift using button tag?
- UITableView is starting with an offset in iOS 7
- Auto-Layout: Get UIImageView height to calculate cell height correctly
- UITableView separator line disappears when selecting cells in iOS7
- TableView Cell reuse and unwanted checkmarks – this is killing me
- Is there a way to make UITableView cells in iOS 7 not have a line break in the separator?
- Swift: Pass UITableViewCell label to new ViewController
- Setting style of UITableViewCell when using iOS 6 UITableView dequeueReusableCellWithIdentifier:forIndexPath:
- UIRefreshControl at the bottom of the UITableView iOS6?
- UITableViewCell delete button gets covered up
- Pass data through segue
- UIRefreshControl without UITableViewController
- How to insert new cell into UITableView in Swift
- Initialize @StateObject with a parameter in SwiftUI
- Is it possible to configure a UITableView to allow multiple-selection?
- How to make Supplementary View float in UICollectionView as Section Headers do in UITableView plain style
- ios 8 Swift – TableView with embedded CollectionView
- Class is not key value coding-compliant [duplicate]
- How to give space between two cells in tableview?
- Grid view in iOS [closed]
- UITableView Footer, Stop from floating over content
- Open UITableView edit action buttons programmatically
- How to create a UITableViewCell with a transparent background
- Class has no initializers Swift
- Problems after upgrading to Xcode 12:ld: building for iOS Simulator, but linking in dylib built for iOS, architecture arm64
- Load image to a tableView from URL iphone sdk
- UITableView auto resizing row constraint breaking mysteriously on iPhone 6Plus