Post

Replies

Boosts

Views

Activity

Reply to Rearrange collection view cells within it's section
Yes, that's a clean way to do it with func collectionView(_ collectionView: UICollectionView, targetIndexPathForMoveFromItemAt originalIndexPath: IndexPath, toProposedIndexPath proposedIndexPath: IndexPath) - IndexPath And gives equivalent result to what I proposed. Note: for user experience, alerting (as I explained) why he cannot move would be useful.
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’21
Reply to Uppgradera Swiftkod
So, you have a code that was developed with Xcode 6.4 ? Which Xcode do you want to use now ? You may have to upgrade several times, correct the code each time, with intermediate versions of Xcode (something like): 6.4 - 8 8 - 10 10 - 12 You can download older versions of Xcode here : https://developer.apple.com/download/more/ Another way is to create a new project, rebuild the Storyboard and paste as much code as you can. Så har du en kod som har utvecklats med Xcode 6.4? Vilken Xcode vill du använda nu? Du kan behöva uppgradera flera gånger, korrigera koden varje gång, med mellanversioner av Xcode (ungefär som): 6.4 - 8 8 - 10 10 - 12 Du kan ladda ner äldre versioner av Xcode här: https://developer.apple.com/download/more/ Ett annat sätt är att skapa ett nytt projekt, bygga om Storyboard och klistra in så mycket kod som möjligt.
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’21
Reply to Errors in ForEach SwiftUI
I don't understand what you want to show in Section and what you do in ForEach. In addition, your naming of var is awfully confusing main used in different places for different things users as plural but not an array… weather singular but several values in array If I understand what you want to do, you should probably: Section { ForEach(networkController.users.weather ?? [], id: \.self){ userWeather in // rename user Text(userWeather.main ?? "") } // ForEach is meaningless here ForEach(networkController.users.main ?? Main(temp: 0), id: \.self){ user in // Text("\(user.temp)") Text( "\(networkController.users.main ?? Main(temp: 0)).temp)") }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to Errors in ForEach SwiftUI
That's the problem with such complex definitions in your code… There is probably a missing parenthesis before .temp (to be balanced by another leading one. Text( "\(( networkController.users.main ?? Main(temp: 0)).temp)")
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’21
Reply to Stuck on checking for app store connect access
I found old SO threads, but you should adapt to better understand where the problem is: https://stackoverflow.com/questions/22443425/application-loader-stuck-at-authenticating-with-the-itunes-store-when-uploadin and https://stackoverflow.com/questions/50507628/unable-to-upload-the-ipa-file-to-itunes-store You should check your account (here is the sequence): I checked my Appstore Connect account (contracts). I noticed a yellow warning that some contact information were missing. I updated.
Apr ’21
Reply to Extra UITabBarButton added to UITabBar
Which version of Xcode ? That was supposed to be solved in 11.2: "Fixed an issue with UITabBarController where decoding an instance from a storyboard would create extra views at the left end of the screen. If you worked around this issue on Xcode 11.0 or 11.1 by creating a subclass of UITabBarController and hiding extra views in the initializer you can remove the workaround. (55310448)"
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’21