I have class for a cell
import UIKit
class LinkCellView: UITableViewCell {
@IBOutlet weak var cellTitleLabel: UILabel!
@IBOutlet weak var tagsListView: UIView!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
I fill the tagsListView
in cellForRowAt
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "linkCell", for: indexPath) as! LinkCellView
let object = links[indexPath.row]
cell.cellTitleLabel!.text = object.description
let tag = UILabel(frame: CGRect(x: 0, y: 0, width: 200, height: 21))
tag.text = "Frkul"
cell.tagsListView.addSubview(tag)
return cell
}
Unfortunately when I then run the app in simulator, list of tags is just barely visible there. My expectation is to see the whole tags list.
I am pretty new to iOS development, so it is possible I am missing some fundamental knowledge of designing iOS UI. If it is not possible to answer this question directly, pls point me to a tutorial / webinar taking newbies through this topic.
- Xcode Version 10.0
- iOS 12
- iOS simulator Version 10.0
Static version of the App — https://gitlab.com/lipoqil/stackview-in-table-cell