uitableview

Create UITableView programmatically in iOS Swift (Table height not auto resizing)

眉间皱痕 提交于 2020-01-24 20:47:40
问题 I know there are lot of similar questions. But, there isn't a proper answer for my problem. I need to create Custom UITableView programmatically - Not using drag and drop at all. Just swift code. I have already done almost everything except one thing is not working. Custom TableView Cell looks like this --------------------------------- ------- | Pic | Name | | Profession ------- Multi-line text here (title) Multi-line text here again that will have more description of what is written above

2 UITableView in a UIViewController affecting each other

放肆的年华 提交于 2020-01-24 20:42:10
问题 I've been going at this for about 3 hours now, and I'm finally throwing in the towel to y'all. I have 2 UITableView in my view, one of which is a forum board to leave comments and what not, and the second UITableView is used to mention people. the issue I am having is that both tableview counts are being affected even if i only want to update just 1 of the tableviews. I set the delegate/datasource in the viewdidload self.mentionTableView.delegate = self; self.mentionTableView.dataSource =

Creating tableView inside tableView

五迷三道 提交于 2020-01-24 20:18:06
问题 I've created a tableView with prototype cells. Inside each of these prototype cells is another tableView with different prototype cells. I've linked this all together fine, but I'm having trouble modifying the innermost prototype cells. Here is why. Here is the relevant code: class ViewController: UIViewController, AVAudioRecorderDelegate, UITableViewDelegate, UITableViewDataSource { @IBOutlet weak var tableView: UITableView! override func viewDidLoad() { super.viewDidLoad() tableView

Core Data / NSFetchedResultsController - Registering changed objects related to the fetched object

ⅰ亾dé卋堺 提交于 2020-01-24 19:43:05
问题 I use a NSFetchedResultsController to get a list of objects which is displayed in a UITableView . If I change values in the objects the whole thing triggers and automatically reloads the changed rows. But one of the displayed values comes from related objects (one-to many relationship). Those objects have a transient title (so it's value comes again from another object). When this title changes the rows are not reloaded. Question: Can anybody suggest a clean solution to this? Possible Dirty

CATextLayer textcolor is always black

不想你离开。 提交于 2020-01-24 18:14:41
问题 I am trying to add a CATextLayer to UITableViewCell . Problem is that text is rendering as black while I have already set its foregroundColor. Can someone tell me what I am missing? Thanks. CATextLayer *buyPrice_port = [CATextLayer layer]; buyPrice_port.frame = CGRectMake(144, 42, 76, 21); buyPrice_port.font = (__bridge CFTypeRef)([UIFont boldSystemFontOfSize:18]); buyPrice_port.foregroundColor = [UIColor colorWithRed:0 green:190/255.0 blue:191/255.0 alpha:1.0].CGColor; buyPrice_port

Read/write data from a plist of dictionaries and arrays, and load different levels into a TableView

我的未来我决定 提交于 2020-01-24 17:27:06
问题 I'm a little confused about working with property lists. I've read most of the other questions about this topic, but I'm still very confused since they only go in one layer, so any help would be appreciated. I would like to load a plist that stores data somewhat like this: I have three ViewControllers (two TableViewControllers and one blank) in my Storyboard that I want to display different levels of information: Categories of people (Friends, etc.) Names of the people in those categories

iOS part of viewcontroller goes black when orientation changes

偶尔善良 提交于 2020-01-24 16:40:54
问题 When I change viewcontroller orientation while it's loading on particular orientation, part of the screen goes blank at the bottom. Steps to reproduce: Have tableview(Not necessary I think. could be any view) in a view controller Push a new viewcontroller which also has a tableview(Not necessary I think. could be any view) during an action Rotate the screen from one orientation to Another(Portrait to landscape or landscape to portrait).now you will be able to see the dark part. Press back

How to reload UITableView without stopping cell selection animation

时光总嘲笑我的痴心妄想 提交于 2020-01-24 14:45:12
问题 When the users taps on a cell, I want to update my UITableView ; including the contents of this tapped cell. Easiest way is to update internal parameters and then invoke [self.tableView reloadData]; . However, reloadData immediately stops the nice blue->none selection animation of my tapped cell. Is there a (standard) way to update my table cells without stopping the tapped cell's animation? Note in this case I don't add or delete cells; I just want to contents to change (e.g. start an

How to reload UITableView without stopping cell selection animation

 ̄綄美尐妖づ 提交于 2020-01-24 14:41:05
问题 When the users taps on a cell, I want to update my UITableView ; including the contents of this tapped cell. Easiest way is to update internal parameters and then invoke [self.tableView reloadData]; . However, reloadData immediately stops the nice blue->none selection animation of my tapped cell. Is there a (standard) way to update my table cells without stopping the tapped cell's animation? Note in this case I don't add or delete cells; I just want to contents to change (e.g. start an

Swift 2 Unable to remove optional binding

纵饮孤独 提交于 2020-01-24 13:14:06
问题 I am new in Swift and don't have much more idea on optional (! , ?). I tried to fetch data from plist, create Model and show to UITableView . Table data shows perfectly, but it shows with Optional() binding. I tried change ! to ? but unable to unwrap. Could you please, guide me to solve this problem. Here is my code & output - var fileName : String? var dataArray : Array<SHQuesAns>? For fetch data from pList - func loadTableView(){ dataArray = SHDataAccess.init(fname: fileName).arrayFromPlist