The font size for textViews in viewControllers which use dynamic tables changes when the row scrolls out of view. This does not happen with static tables. The font size is set correctly in the storyboard.
Do I have to explicitly change the font size in the custom classes?
Here is some code (as requested by @neo):
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> CREWBasicSuppliesCell {
let cell = tableView.dequeueReusableCellWithIdentifier(cellName) as! CREWBasicSuppliesCell
// NSLog("section %d", indexPath.section)
if indexPath.section == 1 {
var row = 0
row = indexPath.row
var fetchRequest = NSFetchRequest(entityName: "Switch")
var predicate = NSPredicate(format: "(viewName = %@)",viewName)
fetchRequest.predicate = predicate
// Execute the fetch request
var error: NSError? = nil
if var fetchResults = managedObjectContext?.executeFetchRequest(fetchRequest, error: &error) as? [Switch] {
var recordCount = 0
recordCount = fetchResults.count
if recordCount > 0 {
var appConfig = fetchResults [row]
cell.mySwitch.on = appConfig.switchValue.boolValue
cell.myTextView.text = appConfig.switchDescription
}
}
} else { // section 0
cell.mySwitch.hidden = true
var fetchRequest = NSFetchRequest(entityName: "View")
var predicate = NSPredicate(format: "(viewName = %@)",viewName)
fetchRequest.predicate = predicate
// Execute the fetch request
var error: NSError? = nil
if var fetchResults = managedObjectContext?.executeFetchRequest(fetchRequest, error: &error) as? [View] {
var row = 0
row = indexPath.row
var recordCount = 0
recordCount = fetchResults.count
if recordCount > 0 {
var appConfigView = fetchResults [row]
cell.myTextView.text = appConfigView.viewDescription
}
}
}
// NSLog("section %d", indexPath.section)
return cell
}