tableviewcell

Embed Collection View in Custom Table View Cell

一笑奈何 提交于 2019-12-05 04:37:54
I have a table view with a custom Cell which gets it contents from an array, this all builds fine. I want to add to this content a Collection View of thumb nail images of varying number to each of the custom Table View Cells. I have added the Collection to the Custom Cell in the Story Board. I have linked the Collection to the Custom Cell.m (not sure it should go there). I have created a Collection Custom Cell and linked the image in. It is from here I am not sure, should the methods for building the collection view be placed in the the Custom Table Cell.m OR in the View Controller.m? I have

Update value in table cell on iPhone

妖精的绣舞 提交于 2019-12-05 01:54:47
问题 If I have a tableView setup in an iPhone application with many rows, how can I update just one of those rows? I'm aware that they manually refresh as they come into view, but I'm looking to push out an update, for the sake of argument a timer counting down. Thanks 回答1: Thanks for the answers, I found another method though! By calling this: NSIndexPath *a = [NSIndexPath indexPathForRow:0 inSection:0]; // I wanted to update this cell specifically CustomTableViewCell *c = (CustomTableViewCell *)

Swift TableView Crash: “Missing cell for newly visible row”

↘锁芯ラ 提交于 2019-12-04 17:22:58
Im experiencing a crash when adding new rows to a tableview. In short, the crash log says "Missing cell for newly visible row 3". Reproduction 1. Add N amount of objects to datasource 2. Manually add the same amount of cells to tableview 3. Reload and animate using beginUpdates - endUpdates Known Problem This crash has already been discussed at question and reported at Apple . Their solution to this problem (not using estimated cell heights) does not work for me as i need 2 different heights for the cells. My tableview is composed out of 2 different cell classes. Both have their own standard

Read data from firebase and populate TableViewCell

主宰稳场 提交于 2019-12-04 15:21:05
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 myList:[String] = [] //handler var handle:FIRDatabaseHandle? override func viewDidLoad() { super

Show ViewController from XIB-file-Button - Swift

柔情痞子 提交于 2019-12-04 13:42:13
问题 is there a way how to segue from a xib-file (custom TableViewCell) to another ViewController in the Main.storyboard. There's no possibility to drag a segue, like within the main storyboard. In the cell I've got a button, from where I want to change the view. How can I solve it? Thanks! 回答1: You can always instantiate a view controller from your Storyboard and present it on button tapped: let storyboard = UIStoryboard(name: "Main", bundle: nil) let vc = storyboard

Stepper on tableview cell (swift)

时间秒杀一切 提交于 2019-12-04 11:47:13
I put stepper both outlets and action into tableview cell and using protocol delegate to connect it to tableview. When i tapped stepper in first row, stepper value appear normaly in first row but its also appear in some random row. how to fix this? TableViewCell protocol ReviewCellDelegate{ func stepperButton(sender: ReviewTableViewCell) } class ReviewTableViewCell: UITableViewCell { @IBOutlet weak var countStepper: UIStepper! @IBOutlet weak var stepperLabel: UILabel! override func awakeFromNib() { super.awakeFromNib() // Initialization code } override func setSelected(selected: Bool, animated

Not able to add static UITableViewCell into tableview

倾然丶 夕夏残阳落幕 提交于 2019-12-04 10:21:46
As I am new in IOS development I am trying to add CustomeCell into tableView but I can not add it from library. What I am doing is just drag TableView in my ViewController and than drag tableview cell in it but its added as extra view under ViewController 's view not able to add it into tableview. I am stuck here any idea how can I add cell by drag and drop. Screen shot : I know how to add cell by coding but its very lengthy process to add every thing by code. Any guidence will be appreciated. Thanks in advance. As per my exprience you can not add Custom Cell into TableView while you are using

How can I make the footerview always stay at the bottom in UITableViewController?

醉酒当歌 提交于 2019-12-04 02:14:18
I am using a UITableviewcontroller and I want the footer view to always stay at the bottom of the screen. However, the y position of the footer view is changing as per the height of the tableviewcell . How can I always make it stick to the bottom of the screen? MeghaJain The tableview footer view would always stay at the bottom of the tableview and would always scroll with it. If you need to make the footer view fixed at the bottom then you can not use a TableViewController .You will have to use UIViewController , put your tableView as a subview. Put the footer also as another subview and its

Update value in table cell on iPhone

空扰寡人 提交于 2019-12-03 17:03:15
If I have a tableView setup in an iPhone application with many rows, how can I update just one of those rows? I'm aware that they manually refresh as they come into view, but I'm looking to push out an update, for the sake of argument a timer counting down. Thanks Thanks for the answers, I found another method though! By calling this: NSIndexPath *a = [NSIndexPath indexPathForRow:0 inSection:0]; // I wanted to update this cell specifically CustomTableViewCell *c = (CustomTableViewCell *)[theTableView cellForRowAtIndexPath:a]; I could then directly modify the label stored in my

How to properly implement a static cell with Swift 3

北城余情 提交于 2019-12-03 15:19:12
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 tableView: UITableView! override func awakeFromNib() { [...] tableView.delegate = self } func tableView(