     }
     
     public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let item = sections[indexPath.section].items[indexPath.item]
+
+        
+        if let customViewItem = item as? AppearanceSettingsCustomViewItem {
+            let cell = tableView.dequeueReusableCell(withIdentifier: AppearanceSettingsViewController.customViewCellReuseIdentifier, for: indexPath)
+            let vc = customViewItem.viewController
+            if let themeable = vc as? Themeable {
+                themeable.apply(theme: self.theme)
+            }
+            if let view = vc.view {
+                view.frame = cell.contentView.bounds
+                view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
+                vc.willMove(toParentViewController: self)
+                cell.contentView.addSubview(view)
+                addChildViewController(vc)
+            }
+            cell.selectionStyle = .none
+            return cell
+        }
+        
+        
         guard let cell = tableView.dequeueReusableCell(withIdentifier: WMFSettingsTableViewCell.identifier(), for: indexPath) as? WMFSettingsTableViewCell else {
             return UITableViewCell()
         }
         
-        let item = sections[indexPath.section].items[indexPath.item]
         cell.title = item.title
         cell.iconName = nil
         
         if let tc = cell as Themeable? {
             tc.apply(theme: theme)
         }
-        //TODO: consolidate
-        if let customViewItem = item as? AppearanceSettingsCustomViewItem, let vc = customViewItem.viewController as? ImageDimmingExampleViewController {
-            vc.apply(theme: theme)
-            if let view = vc.viewIfLoaded {
-                var frame = view.frame
-                frame.size.width = cell.frame.width
-                view.frame = frame
-                cell.contentView.addSubview(view)
-            }
-        }
-        
-        if let customViewItem = item as? AppearanceSettingsCustomViewItem, let vc = customViewItem.viewController as? FontSizeSliderViewController, let view = vc.viewIfLoaded {
-            vc.apply(theme: self.theme)
-            var frame = view.frame
-            frame.size.width = cell.frame.width
-            view.frame = frame
-            cell.contentView.addSubview(view)
-        }
-        
-        if let customViewItem = item as? AppearanceSettingsCustomViewItem, let vc = customViewItem.viewController as? TextSizeChangeExampleViewController, let view = vc.viewIfLoaded {
-            vc.apply(theme: self.theme)
-            var frame = view.frame
-            frame.size.width = cell.frame.width
-            view.frame = frame
-            cell.contentView.addSubview(view)
-        }
+
+
         
         if item is AppearanceSettingsSwitchItem {
             cell.disclosureType = .switch

            cell.iconName = "settings-image-dimming"
            cell.iconBackgroundColor = self.theme.colors.secondaryText
            cell.iconColor = self.theme.colors.paperBackground
        } else {
            cell.disclosureType = .none
        }
        
        return cell
    }
    
    func userDidSelect(theme: Theme) {

        title = WMFLocalizedString("appearance-settings-title", value: "Reading themes", comment: "Title of the Appearance view in Settings.")
        tableView.contentInset = UIEdgeInsets(top: 10, left: 0, bottom: 0, right: 0);
        tableView.register(WMFSettingsTableViewCell.wmf_classNib(), forCellReuseIdentifier: WMFSettingsTableViewCell.identifier())
        tableView.register(UITableViewCell.self, forCellReuseIdentifier: AppearanceSettingsViewController.customViewCellReuseIdentifier)

        tableView.delegate = self
        tableView.dataSource = self
        tableView.separatorStyle = .none
