Post

Replies

Boosts

Views

Activity

Reply to A question about use 'lowerThan' when I learning 'precedencegroup'
From your code, I do not see that ePrecedence is in a different module than dPrecedence. See the doc example: // module Swift precedencegroup Additive { higherThan: Range } precedencegroup Multiplicative { higherThan: Additive } // module A precedencegroup Equivalence { higherThan: Comparative lowerThan: Additive // possible, because Additive lies in another module } infix operator ~ : Equivalence 1 + 2 ~ 3 // same as (1 + 2) ~ 3, because Additive > Equivalence 1 * 2 ~ 3 // same as (1 * 2) ~ 3, because Multiplicative > Additive > Equivalence 1 < 2 ~ 3 // same as 1 < (2 ~ 3), because Equivalence > Comparative 1 += 2 ~ 3 // same as 1 += (2 ~ 3), because Equivalence > Comparative > Assignment 1 ... 2 ~ 3 // error, because Range and Equivalence are unrelated Note: names of groups should better start as UpperCase, like Dprecedence or DPrecedence.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to Limit available app languages
I have my app localized for many languages, but I'd like to limit the available app languages to only a subset of those, because the content is not ready for all of them. So in fact the app is not yet localised in those languages. A better practice would be to only add a language when it is readily available. And release a new version. Did I miss something ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’21
Reply to Thread 1: signal SIGINT
Some code formatting with formatter (<>) tool will make it easier to read: languageLabels = (MyFunctions.getValue(key: Utils.languageLabelsKey) as! NSDictionary  if i print the a value from the key without using get i.e   languageLabels!.get(key)   print("my labes \(languageLabels[key])")  I get my labes Optional(Done) but when I get using .get  let lngValue = languageLabels!.get(key)  program stop in debug and I have to click continue program execution for the app to continue launching languagesLabels is not nil Could you show get function in MyFunctions There is probably an error there. and how you declared in Utils languageLabelsKey
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to How to find physical size of UI element?
You can get the real screen size (in points or pixels): https://stackoverflow.com/questions/4779221/in-iphone-app-how-to-detect-the-screen-resolution-of-the-device And knowing the screen resolution (in points or pixels), you know the physical pixel / point size. Then knowing the size of elements, you know the fraction of screen it is. Hence you can compute its physical size. Or adjust the size (in points) of UI element as needed.
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Reply to How to fix "appleaccountd quit unexpectedly" error?
@dkardell ß7 of what ? iOS ? That's not IMHO where the problem is, more in XCode.
Replies
Boosts
Views
Activity
Aug ’21
Reply to Test
That seems to be a fairly resistant bug 😉
Replies
Boosts
Views
Activity
Aug ’21
Reply to Thread 1: signal SIGINT
You need to provide some info: what is the output from the print statement above ? how is languagesLabels defined ?: show the complete definition. Are you sure it is not nil ? what is key ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Value of type 'UIView?' has no member 'isEnabled'
When I try the same code, I get a different error: Key path value type 'Bool' cannot be converted to contextual type 'Published.Publisher.Output' (aka 'Int') If I understand your code, you try to assign segmentNumber which is Int to isEnabled which is Bool.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to A question about use 'lowerThan' when I learning 'precedencegroup'
From your code, I do not see that ePrecedence is in a different module than dPrecedence. See the doc example: // module Swift precedencegroup Additive { higherThan: Range } precedencegroup Multiplicative { higherThan: Additive } // module A precedencegroup Equivalence { higherThan: Comparative lowerThan: Additive // possible, because Additive lies in another module } infix operator ~ : Equivalence 1 + 2 ~ 3 // same as (1 + 2) ~ 3, because Additive > Equivalence 1 * 2 ~ 3 // same as (1 * 2) ~ 3, because Multiplicative > Additive > Equivalence 1 < 2 ~ 3 // same as 1 < (2 ~ 3), because Equivalence > Comparative 1 += 2 ~ 3 // same as 1 += (2 ~ 3), because Equivalence > Comparative > Assignment 1 ... 2 ~ 3 // error, because Range and Equivalence are unrelated Note: names of groups should better start as UpperCase, like Dprecedence or DPrecedence.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Is it possible to update SwiftUI 2.0 project to Swift 3.0?
When you open the "old" project in new XCode (with more recent SwiftUI), don't you see, in Issue Navigator, a proposal to update to new Settings ? Start doing so and see if you get compilation errors then.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Cannot find 'ContentView' in scope
You have to define such a view. Add after this code: struct ContentView: View { var body: some View { Text("Hello") } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Limit available app languages
You should find an answer here: https://stackoverflow.com/questions/30749459/setting-applelanguages-doesnt-change-app-language
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Unable to present. Please file a bug.
If I reduce the number of NavigationLinks, it works:        Reduce by 1, by 2 ?    But I have cases with 10 links which work. Could you attach the complete project, so that we can try to reproduce ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Limit available app languages
I have my app localized for many languages, but I'd like to limit the available app languages to only a subset of those, because the content is not ready for all of them. So in fact the app is not yet localised in those languages. A better practice would be to only add a language when it is readily available. And release a new version. Did I miss something ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to How to create US Central timezone in Swift?
Did you try: let chicagoTimezoneName = NSTimeZone.knownTimeZoneNames().filter { $0.containsString("Chicago") }.first dateFormatter.timeZone = NSTimeZone(name: chicagoTimezoneName!) Seen from https://stackoverflow.com/questions/9761847/where-can-i-find-a-list-of-timezones
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Thread 1: signal SIGINT
Some code formatting with formatter (<>) tool will make it easier to read: languageLabels = (MyFunctions.getValue(key: Utils.languageLabelsKey) as! NSDictionary  if i print the a value from the key without using get i.e   languageLabels!.get(key)   print("my labes \(languageLabels[key])")  I get my labes Optional(Done) but when I get using .get  let lngValue = languageLabels!.get(key)  program stop in debug and I have to click continue program execution for the app to continue launching languagesLabels is not nil Could you show get function in MyFunctions There is probably an error there. and how you declared in Utils languageLabelsKey
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to How to find physical size of UI element?
You can get the real screen size (in points or pixels): https://stackoverflow.com/questions/4779221/in-iphone-app-how-to-detect-the-screen-resolution-of-the-device And knowing the screen resolution (in points or pixels), you know the physical pixel / point size. Then knowing the size of elements, you know the fraction of screen it is. Hence you can compute its physical size. Or adjust the size (in points) of UI element as needed.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to A14 BIONIC CHIP THERMAL THROTTLING ISSUES
That's not a question for the developers forum. And you'll never get clear answer to such a question: this who speak don't know and those who know can't speak. So you just feed the rumor mill… Have you a problem with the game you develop ? Then explain the context where problem occurs.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to Best way to put object back into constraint lines after being moved?
If I understand your question correctly: keep the object (here label) selected use the menu command : Editor > Resolve Layout Issues > Update Frame (in the Selected Views section.
Replies
Boosts
Views
Activity
Aug ’21