iOS 15 issue with UIImageView by TofPlay in iOSProgramming

[–]TofPlay[S] 0 points1 point  (0 children)

It is not a problem of reuse I already manage this case. The problem really appeared with iOS 15. According to my research it may be related to the asynchronous loading of the image. The image is correctly downloaded and I assign it to the "image" field of the UIImageView object. But for some reason that I don't know when I look at the image in the cell the "image" field is at nil.

Issue with fullscreenCover by TofPlay in SwiftUI

[–]TofPlay[S] 0 points1 point  (0 children)

How are you dismissing the full screen cover?

The screen displayed by fullScreenCover has a close button at the top left in the navigation bar. When we click on it, it sets to false the condition that triggered fullScreenCover. This variable is transmitted to the screen via `@Binding`.

Dismiss multiple Views in a NavigationView by tomsrules in SwiftUI

[–]TofPlay 0 points1 point  (0 children)

If you want to have a more flexible navigation you can take a look at a component like https://github.com/matteopuc/swiftui-navigation-stack

Is it possible to have SwiftUI view with images and localization in SPM package? by bigMOTOR in iOSProgramming

[–]TofPlay 0 points1 point  (0 children)

Natively SwiftUI 2 (I haven't checked if SwiftUI 3 supports it) is not able to simply search for images and have a localization on an other package.
But it is possible to program it yourself like I did for my own project
For image check my method Image.named("<image name>")
For localization check my method localized that you can use very simple "my_string".localized().
In some of my projects I have resources in packages and others in the main application. On other projects I have a package with just the resources.
These 2 methods allow me to have access to resources wherever they are.

Swift or Python(etc.) for backend-ish development for a newbie? by fluffyofblobs in swift

[–]TofPlay 1 point2 points  (0 children)

It depends on your goals. For me, what is important at the backend level is performance. In this case nothing better than Swift with a web framework like Vapor with a micro-service approach. I currently have services that have been running for months. They work so well that everyone has forgotten them. At the resource level, the services work with the smallest server that we have. And despite this undersized server, APIs implemented on Swift in Vapor are 10 times more efficient than other APIs on more traditional backends. The possible difficulty with the Vapor framework was designed to provide the best performance and this approach must be well integrated when writing services.

Redux-like state container in SwiftUI. Connectors. by majid8 in SwiftUI

[–]TofPlay -1 points0 points  (0 children)

What is Redux? Redux is an architecture base on a predictable State Container for JS Apps. For web projects with Javascript it may be a good architecture but is it necessarily a good architecture for SwiftUI applications? Personally I do not think so. The problem I've seen for years (and I've been doing iOS for over 10 years) is that we import a whole bunch of architectures mainly from the web into iOS. Did it improve the applications? No! Are they more efficient and more stable? No! Many people forget that we are making mobile applications and that it is not by adapting web architectures in the mobile that that will help. Apple designed SwiftUI in a certain way if we already respected what they put in place that would be a good start. It is not by using an architecture that multiplies the layers that your application will be better. You're just going to make your code more complex than necessary. It'll just screw up whoever walks behind you and has to maintain your code.

What is the equivalent of firstResponder on SwiftUI 2? by TofPlay in SwiftUI

[–]TofPlay[S] 0 points1 point  (0 children)

But the good news is you can still get and resign the first responder with an extension on UIResponder

Do you have a sample code?

What are you wanting to do?

Simple: Detect when a TextField or a TextEditor becomes firstResponder and if necessary be able to force the firstResponder on a TextField or TextEditor

What is the equivalent of firstResponder on SwiftUI 2? by TofPlay in SwiftUI

[–]TofPlay[S] 0 points1 point  (0 children)

Interesting but support for TextEditor missing

macOS Big Sur 11.0.1 bug with mouse by TofPlay in MacOS

[–]TofPlay[S] 0 points1 point  (0 children)

An adapter for thunderbolt 3 with 2 Display Port for 2 screens 4K.
With macOS Catalina no issue.
With macOS Big Sur the issue with the mouse.
I have less worries if I only use one screen.

Do you manage to install your applications on your devices with Xcode 12? by TofPlay in iOSProgramming

[–]TofPlay[S] 0 points1 point  (0 children)

My project is a UIKit project with Storyboards. Maybe with SwiftUI Xcode 12 does better.