Relative Content

Tag Archive for swift

How to updated the needed item inside a nested item in an array?

I am looking to update an item in a nested array of items, for showing the issue I made this example code below, the point of this question is updating nested item and not SwiftUI tricks. i want find an item with knowing its id and after finding it trying to updated. In codes bellow I showed you the example for updating items in first layer, but as long as layers go deeper we cannot guess it can be 2 layer or 10 layer, we do not know.
How can I be able to update the item1, item2 and item4?

How to updated the needed item inside a nested item in an array?

I am looking to update an item in a nested array of items, for showing the issue I made this example code below, the point of this question is updating nested item and not SwiftUI tricks. i want find an item with knowing its id and after finding it trying to updated. In codes bellow I showed you the example for updating items in first layer, but as long as layers go deeper we cannot guess it can be 2 layer or 10 layer, we do not know.
How can I be able to update the item1, item2 and item4?

How to hide a custom tabBar?

I use a custom tabBar in my app. I hides default bar view and create a new view with rounded corners. In some view controllers I want to hide my tabBar. I use this code to do it: