Post

Replies

Boosts

Views

Activity

Reply to Swift UI Preview Crash
Hi friend, I managed to fix the problem for my self. Have you tried to change the preview device? If that doesn't work try restarting xcode and then changing the preview device. It worked for me. Hope it worked for you too.
Feb ’21
Reply to How to make first picker view row unselectable
I managed to help my self! This was the code of the picker view did select row: func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { optionsField.text = options[row] optionsField.resignFirstResponder() let vcName = identities[row] let viewController = storyboard?.instantiateViewController(identifier: vcName!) viewController?.navigationItem.largeTitleDisplayMode = .never self.navigationController?.pushViewController(viewController!, animated: true)} And this is the code now: if row == 0 { color = UIColor.red let alert = UIAlertController(title: "Error", message: "Please Choose Something", preferredStyle: UIAlertController.Style.alert) } And I removed the identities var from the above code. Hope this helps someone!
Feb ’21