Post

Replies

Boosts

Views

Activity

Reply to Finding the right Protocol for Generic that is interpolated into a String
Given that both Strings and Ints can be used in string interpolation First of all, you need to distinguish string interpolation of which type. In case of Text, the type is LocalizedStringKey, not String. So, you may need to find how string interpolation of LocalizedStringKey is working. LocalizedStringKey.StringInterpolation As far as I read the parts Appending to an Interpolation and Instance Methods, I cannot find a common protocol which would work both for String and Int. So, one possible work around, which does not need any protocols, would be converting theVariable to String before applying string interpolation of LocalizedStringKey. struct MySubView<T>: View { @Binding var theVariable: T var body: some View { HStack { Text("This part isn't important") Text("But this is \(String(describing: theVariable))") } } } With this, you can use any arbitrary type for T, and with making the type conform to CustomStringConvertible, you can control the result of string interpolation for your custom type.
Topic: App & System Services SubTopic: General Tags:
Oct ’21
Reply to Application Error ?
If I have a Main file, I want to remove the Main file You cannot remove the Main file, so your question does not make sense. see the NSWindow the Window on the display from the code that I'm programming. Can you explain what you mean by this? Where should I search in the documentation to solve these issue ? I do not understand what your question is. What are these issue?
Oct ’21
Reply to Application Error ?
The issue is the main file that shows the window What in the main file is the problem?????????? Please clarify. If you want to learn app programming, keep the main file as in the app template. Never modify it. If you are planning to learn something else, please clarify what you want to achieve.
Oct ’21
Reply to Standard Value is disabled in Xcode 13
I do not remember how older Xcode was working, but Xcode 13 does not permit us to set Standard unless the actual views are placed in the Standard position in the graphical editor. Is this a known bug or a new 'feature'? Not sure. But if you feel this new behavior is making your works difficult, you should better send a feedback to Apple.
Oct ’21
Reply to SwiftUI slider step broken since iOS 15
Thanks for showing your code. (And sorry for this site malfunctioning again.) But if you could show enough code (the view type containing the VStack, what settings is, what Setting is...), more readers would be involved to investigate what is happening. Anyway, I could have confirmed the difference. This seems to be a bug of Slider in iOS 15. Have you sent a bug report to Apple? And unfortunately, I cannot find a simple workaround for this issue as for now.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21
Reply to color literal
Please be more specific. Is your issue something similar to this?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Finding the right Protocol for Generic that is interpolated into a String
Given that both Strings and Ints can be used in string interpolation First of all, you need to distinguish string interpolation of which type. In case of Text, the type is LocalizedStringKey, not String. So, you may need to find how string interpolation of LocalizedStringKey is working. LocalizedStringKey.StringInterpolation As far as I read the parts Appending to an Interpolation and Instance Methods, I cannot find a common protocol which would work both for String and Int. So, one possible work around, which does not need any protocols, would be converting theVariable to String before applying string interpolation of LocalizedStringKey. struct MySubView<T>: View { @Binding var theVariable: T var body: some View { HStack { Text("This part isn't important") Text("But this is \(String(describing: theVariable))") } } } With this, you can use any arbitrary type for T, and with making the type conform to CustomStringConvertible, you can control the result of string interpolation for your custom type.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Application Error ?
If I have a Main file, I want to remove the Main file You cannot remove the Main file, so your question does not make sense. see the NSWindow the Window on the display from the code that I'm programming. Can you explain what you mean by this? Where should I search in the documentation to solve these issue ? I do not understand what your question is. What are these issue?
Replies
Boosts
Views
Activity
Oct ’21
Reply to Objective C to Swift with CoreData and Cloud Documents
How was PersistentStack defined in your Objective-Code?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Application Error ?
The issue is the main file that shows the window What in the main file is the problem?????????? Please clarify. If you want to learn app programming, keep the main file as in the app template. Never modify it. If you are planning to learn something else, please clarify what you want to achieve.
Replies
Boosts
Views
Activity
Oct ’21
Reply to Standard Value is disabled in Xcode 13
I do not remember how older Xcode was working, but Xcode 13 does not permit us to set Standard unless the actual views are placed in the Standard position in the graphical editor. Is this a known bug or a new 'feature'? Not sure. But if you feel this new behavior is making your works difficult, you should better send a feedback to Apple.
Replies
Boosts
Views
Activity
Oct ’21
Reply to iOS 15 crash: Fatal Exception: NSInternalInconsistencyException Invalid parameter not satisfying: pos
The crash is caused by an iOS defect and not a defect in my app. > Does your code contain any code to do with copy & paste programmatically?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Axie invitation code
NO, you cannot.
Replies
Boosts
Views
Activity
Oct ’21
Reply to iOS 15 crash: Fatal Exception: NSInternalInconsistencyException Invalid parameter not satisfying: pos
Does your project has any third party libraries? If so, have you checked all of them are free from copy & paste code?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to SwiftUI slider step broken since iOS 15
Can you show your code?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to iOS 15 crash: Fatal Exception: NSInternalInconsistencyException Invalid parameter not satisfying: pos
Seems you have checked all the source code of the libraries used. Then I have no clue. Hope your issue will solved soon.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to SwiftUI slider step broken since iOS 15
Thanks for showing your code. (And sorry for this site malfunctioning again.) But if you could show enough code (the view type containing the VStack, what settings is, what Setting is...), more readers would be involved to investigate what is happening. Anyway, I could have confirmed the difference. This seems to be a bug of Slider in iOS 15. Have you sent a bug report to Apple? And unfortunately, I cannot find a simple workaround for this issue as for now.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Animation only works with deprecated modifier
Can you show enough code to run and test? Hard to say something with just fragments of code.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to How to change my own app to compatible with iPadOS 15 ?
Can you show more context? What is the problem running your app on iPadOS 15?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21
Reply to Unable to process app at this time due to a general error
Is this the App Store's fault? Very probably. What should I do? You may need to just wait until the unspecified general error is fixed. Usually this sort of errors will be fixed in hours, when unlucky a few days. By the way, you should better use the right tag. XcodeKit is not appropriate for this issue. You can use the tag App Store Connect.
Replies
Boosts
Views
Activity
Oct ’21