I have a UITableViewCell that have a Label contained within the cell. The problem is that i wish to change the font to "Century Gothic" however when I set the label to "Century Gothic" using the storyboard this does not work. The font seems to be stuck on the default "Avenir" font. I set label to Attributed in the label settings in order to select the font"Century Gothic" from the drop down menu.
I have tried to set it in code however this does not seem to work either. when I set the font to "Avenir" in code it will allow me to adjust the size of the font. However when I set the font to "Century Gothic" in code it will not produce the "Century Gothic" or let me adjust the size of the font.
I have tried both adjusting the font using storyboard settings and code.
//setting up tableview rows
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return foodTitleArray.count
}
//what cell is & how it looks
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = Tableview.dequeueReusableCell(withIdentifier: "cell123") as! UITableViewCell1
//How text looks in tableview sections
cell.foodTitle.font = UIFont(name: "Century Gothic", size:58)
cell.foodTitle.textColor = UIColor.white
cell.backgroundColor = UIColor(red: 211/255, green: 211/255, blue: 211/255, alpha: 1)
return (cell)
}