At first both look same. The @StateObject and @ObservedObject property wrapper tell a SwiftUI view to update in response to changes from an observed object (mostly viewmodel). Both… Read more “Difference between @ObservedObject and @StateObject”
Author: Sandesh S. Sardar
Multiple gestures recognise at the same time using simultaneousGesture()
.onTapGesture allows to tap only layer of design but .simultaneousGesture identify and allows touch to multiple layer
Localisation
http://www.dummies.com/programming/macintosh/how-to-localize-an-ios-app-in-swiftui/ String Interpolation If we have 1 value give “Key %lld” = “use %lld in any order” if we have 2 value give key “Key %@ %lld”… Read more “Localisation”
How to create multi target in iOS app
Create duplicate target go to new scheme select required target go to manage target and delete unwanted target select target for file, localisation string, assets which will… Read more “How to create multi target in iOS app”
SwiftUI Coding standards
SwiftUI coding standards If code is repetitive make subview to reuse code Repetitive code Common code (can provide default value too) Reuse code
Don’t have permission or IBAgent-iOS issue
If getting error as Encountered an error communicating with IBAgent-iOS or you don’t have permission to save the file Open Terminal and type — sudo chmod 777… Read more “Don’t have permission or IBAgent-iOS issue”
GeometryReader
https://www.hackingwithswift.com/quick-start/swiftui/how-to-provide-relative-sizes-using-geometryreader GeometryReader to the Rescue What the Parent Wants When coding your custom view, you often do not need to worry about surroundings or sizing. For example,… Read more “GeometryReader”