tableviewcell

Swift tableview cell auto height with auto height label

限于喜欢 提交于 2021-01-29 02:58:08
问题 I have some problems with swift. Need to make tableview and in every cell to have image with text inside. This is what i made so far: First problem: Label should be auto height, now it breaks string.. Second problem: Image needs to be auto height too, and to depends on label height. Third problem: Row needs to be autoheight depending on its inside. TableViewController code: @IBOutlet weak var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() tableView.rowHeight =

How to properly implement a static cell with Swift 3

纵饮孤独 提交于 2020-01-31 15:11:29
问题 I literally could not find a single tutorial that showed me how to build an app that uses static cells; with clickable cells. Based on few out dated posted and object-c answers, I've put something together. My issue is, when I click on a cell, I get staticDemoTableCell is has no member present . I have embedded a Table Controller in my UIViewController. For that cell (only one so far), I've created a class: class staticDemoTableCell: UITableViewCell, UITableViewDelegate { @IBOutlet weak var

Reloading UITableView shows error?

人走茶凉 提交于 2020-01-20 07:52:19
问题 I am in a strange situation . when i try to reload the tableview using reloadData() it shows the following error . . . fatal error: unexpectedly found nil while unwrapping an Optional value Here is the web service method that retrieves output func didRecieveOutput(results:NSArray) { if results.count != 0 { userOrders = results as! NSMutableArray dispatch_async(dispatch_get_main_queue(), { () -> Void in self.orderList.reloadData() }) } } Edit : I had checked my connection as well as delegate &

How to display and hide table view cells in swift

╄→гoц情女王★ 提交于 2020-01-14 07:11:29
问题 I have a tableView with two different custom cell. One cell have few textfields data and other also have different textfield data,here i need to collapse and hide the each cell. i don't know how to do this.Please let me know. https://maniacdev.com/2013/03/an-open-source-ios-control-allowing-you-to-create-great-looking-collapsible-lists-without-uitableview Please refer the above link, i want the same in swift. Thanks in advance 回答1: So you want to hide one of your UITableViewCells? Ill think

Disable Cell Swipe Action

不想你离开。 提交于 2020-01-14 03:44:07
问题 So I have an app(written in Swift) that allows a user to search for golf courses in a searchController. They can then select that course and then that selected course goes into a tableView. I'm using the same view controller for both the search controller and the list of the selected courses. The issue I'm having is I want the user to have the ability to swipe to delete their selected courses but NOT the courses that populate search controller when it is active. The swipe to delete action is

UICollectionView inside of UITableViewCell - AutoLayout

守給你的承諾、 提交于 2020-01-13 19:27:09
问题 I'm using a UICollectionView inside of a UITableViewCell . It's all working fine, but i have some issues with Auto Layout. The UICollectionView should just show the cells without horizontal or vertical scrolling.Because now I have a the scrollable UICollectionView inside my UITableViewCell the following code doesn't work for me to get the dynamic table cells' height for this cell, but for other cells. self.tableView.rowHeight = UITableViewAutomaticDimension self.tableView.estimatedRowHeight =

Read data from firebase and populate TableViewCell

雨燕双飞 提交于 2020-01-13 06:08:10
问题 Hello I have a tableviewcell where i can populate it with custom data from my pc, but i can't use my firebase data on the cell that i have made. I want to fill my cell with String and Int, not only Strings. My code is: PlacesTableViewController Class import UIKit import FirebaseDatabase class PlacesTableViewController: UITableViewController { //MARK: Properties @IBOutlet weak var placesTableView: UITableView! //database reference var dbRef:FIRDatabaseReference? var places = [Places]() var

Checkmark on static cells uitableview

非 Y 不嫁゛ 提交于 2020-01-12 05:12:08
问题 I'm using a UITableView, with 3 sections ( Static Cells ) Currency Language Social They have different number of rows: Currency has 3 rows ( USD, EUR, JPY ) Language has 2 rows ( EN, JP ) Social has 3 rows ( Twitter, FB, Line ) Right now, I have by default set a checkmark at the first row of every section. However, I would like to allow the user to set their default settings and change the checkmark accordingly based on what they have set. My question is then how do I set the checkmark for 3

Swift - Fading cells in UITableView

拥有回忆 提交于 2020-01-12 02:02:13
问题 I'm having troubles with my UITableView in swift on Xcode 6 : I would like my UITableView cells to fade in / out when appearing / disappearing. I looked a lot on the web for fade animations but I didn't find what I wanted because it's based on duration animations. I Think what I need is sort of mask based on alpha ? I'm not sur and I don't even know have to create one... I have a UIViewController containing a tableView and some blank space (for now) upside and downside of the UITableView.

How to add cell dynamically in uitableviewcontroller?

我是研究僧i 提交于 2020-01-06 15:26:49
问题 cell which having two textFields... And on click ADD button I want to add that cell dynamically in tableview. And also delete row. And text on both textField should not get change during scroll and on adding new cell... And at the end I want all text field value in array of Dictionary.. following the code I have tried - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return