ra1028 / Former

Former is a fully customizable Swift library for easy creating UITableView based form.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

attributedText Clearing out color after selected on Inline Picker

khoogheem opened this issue · comments

Here is what I have been seeing. I have an inline picker with color in the title. When I select the row it shows the picker. However when it closes up the color in the Title goes back to solid black.

let zone1HRRow = InlinePickerRowFormer<FormInlinePickerCell, Any>() {
            $0.titleLabel.attributedText = self.attributedZoneString(z1Text:1,
                                                                     z1Color: UIColor.HRZones.hrZone1.colorValue,
                                                                     z2Text:2,
                                                                     z2Color: UIColor..HRZones.hrZone2.colorValue)
            $0.displayLabel.textColor = Color.black
            $0.displayLabel.font = self.detailLabelFont
            $0.backgroundColor = Color.grey.lighten2

            }.configure {
                $0.pickerItems = (40...200).map { InlinePickerItem(title:\($0) \(bpmString), value: Int($0)) }
                $0.displayEditingColor = Color.red.darken2
        }
        zone1HRRow.onUpdate { (picker: InlinePickerRowFormer<FormInlinePickerCell, Any>) in
            picker.selectedRow = UserConfig.sharedConfig.hrZoneOne - 40
        }

Closing due to inactivity - please open another issue following our guidelines if this issue persists.