Abdeltwab / Flicker-App-MVVM

Flicker app clone Using MVVM + RXSwift
0 stars 0 forks source link

pickerView in PhotoDetailsViewController #18

Open knight6700 opened 2 years ago

knight6700 commented 2 years ago
    let pickerView = UIPickerView()
    pickerView.delegate = self
    picker = UIPickerView.init()
    picker.delegate = self
    picker.dataSource = self
    picker.backgroundColor = UIColor.white
    picker.setValue(UIColor.black, forKey: "textColor")
    picker.autoresizingMask = .flexibleWidth
    picker.contentMode = .center
    picker.frame = CGRect.init(x: 0.0, y: UIScreen.main.bounds.size.height - 300, width: UIScreen.main.bounds.size.width, height: 300)

i think we can make it better like : lazy var pickerView: UIPickerView = { let pickerView = UIPickerView() pickerView.delegate = self picker = UIPickerView.init() picker.delegate = self picker.dataSource = self picker.backgroundColor = UIColor.white picker.setValue(UIColor.black, forKey: "textColor") picker.autoresizingMask = .flexibleWidth picker.contentMode = .center picker.frame = CGRect.init(x: 0.0, y: UIScreen.main.bounds.size.height - 300, width: UIScreen.main.bounds.size.width, height: 300) return pickerView }() what's your opinion

Abdeltwab commented 2 years ago

This is added as a place holder for UI Picker and will work continue on it already