Posts

Showing posts with the label selectedvalue

Get the uiSegmentControl value for edit

Get the uiSegmentControl value for edit i have a segment control to define the difficulty level for the preparation a recipe. I need to load the value assign at one recipe that I won't to edit it. The follow the code: @IBOutlet var segNewDifficultyLevel: UISegmentedControl! @IBOutlet var ingredientTableView: UITableView! @IBOutlet var directionTableView: UITableView! weak var delegate: AddNewRecipeViewControllerDelegate? // MARK: - Variabili Globali var editRecipe: RecipeModel! var difficultyLevel: String! var ingredients: [IngredientModel] = var directions: [DirectionModel] = This code is in the viewDidLoad: if let editToRecipe = editRecipe { title = "Edit Recipe" // Load data from Recipe Detail into editRecipe viewImageNewRecipe.image = editToRecipe.imageRecipe fieldNewRecipeName.text = editToRecipe.nameRecipe fieldNewQuantityFor.text = editToRecipe.quantityRecipe fieldNewPrepareTime.text = editToRe...