tableviewcell

How to update each custom tableview cell data at the same time?

心已入冬 提交于 2019-12-18 00:41:11
问题 I am using Xcode 8.2.1 with Swift 3. I have one custom UITableViewCell containing a UITextView. When I type into the textView , the custom cell automatically grows. This part is working fine. I also want to update my other cells with the same data when I type in a specific cell. For example: When I type text into the 5th cell, automatically enter the same data in the 11th, 15th and 18th cells. Those cells must be grown automatically as well. I've added data to the specific indexes of the

Grouped UITableview remove outer separator line

陌路散爱 提交于 2019-12-17 15:24:01
问题 I have a grouped UITableview which is created programatically. Also I have a cell with xib file populated in tableview programmatically as well. So far so good. But I want to only remove outer separator line. I used below code but this time removed all separator line. self.tableView.separatorColor = [UIColor clearColor]; this is not good option for my situation. Here is the screenshot what i want to do; 回答1: I just worked out a solution, as the cell has contentView which is a UIView , so I

Dynamic Cell Height autolayout IOS

夙愿已清 提交于 2019-12-13 03:48:25
问题 I have been following this tutorial to implement dynamic cell height. dynamic-table-view-cell-height But it only works in ios 7 for me and not in ios 8. However it does work in ios 8 on the iPAD so I'm a little stumped why it doesn't work on the iphone. Whilst I have followed the code pretty exactly there are a couple of differences between the tutorial and the way I have implemented it and as I don't know enough about autolayout and tables I'm not sure if this is what is causing my problem.

New table view cell shows as a blank cell

大城市里の小女人 提交于 2019-12-13 02:23:24
问题 I've been working on an app, and ran into some problems, so I rebuilt it as simple as possible to find where the error happens at. My code uses CoreData, and my first example has the code for adding new items inside the plus button in the navigation bar. In other words, there is no change of view or segue. This version works as I would expect it to. See the following GIF. But when I make a new view controller that adds the new item, I end up getting a blank cell instead. I have the exact same

An extra view appears in cell when pressing reorder dragger, why?

独自空忆成欢 提交于 2019-12-13 00:26:13
问题 I have an UITableView with varying height, and when pressing reorder control, in the cell view structure a new view appears. Normally it is not a problem, but sometimes its height is quite big, and it overlaps, with cell below. Why this view appears? How can I get rid of it? Or prevent to overlap other cells? 回答1: This view is part of the reorder mechanism and can't be removed. It is used to hide the cell content while you drag a screenshot view above the tableview. If you set the cell

Update table cell image asynchronously

匆匆过客 提交于 2019-12-12 17:15:08
问题 Im downloading the image link from a json and then creating the image once the table view start creating its cells: func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! TableViewCellController DispatchQueue.main.async(execute: { () -> Void in if let url = NSURL(string: self.movies[indexPath.row].image) { if let data = NSData(contentsOf: url as URL) { let imageAux =

How to set the height of a cell depending on a UILabel with a typewriter effect

被刻印的时光 ゝ 提交于 2019-12-12 11:03:00
问题 I have a UILabel in a cell of UITableView. To adjust the height of the cell depending the height of the label, it's ok, it works perfectly. But I need to add another constraints. I need to display the UILabel with a typewriter effect (letter by letter). My extension for the effect works well: extension UILabel{ func setTextWithTypeAnimation(id:String, typedText: String, pauseCharacterArray: [Int:Double], characterInterval: TimeInterval = 0.06 ) { text = "" let group = DispatchGroup() group

Swift UITextField text clears with button action in TableViewCell

只谈情不闲聊 提交于 2019-12-12 09:50:07
问题 I have recorded my screen and here is the link to it. Going into details I have a tableView section, in which there is a tableviewcell ( PhoneCell ) with two textfields (one is a pickerview input and other a textfield), and an Add Button. When Add button is tapped, I am appending an empty phone to the array of phones (reusing the same PhoneCell) and calling tableView.reloadData() method. The Problem :( Whenever I tap on Add button, the textFields text that I enter is cleared. I would like to

iOS Expanded/Selected Custom UITableViewCells state changes when scrolling UITableView

半城伤御伤魂 提交于 2019-12-12 04:39:54
问题 I have a list of custom cells in my tableview and as I scroll everything appears to fine and the cells appear to be in the same order. I have some functionality with my cells - as i select a cell (and it dynamically expands)the background color changes and a few other custom cell properties. Once I do this and then I start scrolling, different cells that i haven't even touched before show up, selected(expanded) and the cell only updates when I select it manually to the correct data. I seem to

CollectionView in TableViewCell scroll isn't smooth in swift3

╄→гoц情女王★ 提交于 2019-12-12 04:31:22
问题 In my project CollectionView in TableViewCell isn't display and I added cell.collectionView.reloadData() in my code. After I added, CollectionView displayed in TableViewCell , but ScrollView isn't smooth. How to solve this problem. If someone have any experience or ideas help me. Thanks. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "homecell") as! HomeCategoryRowCell let mainThemeList