Post

Replies

Boosts

Views

Activity

Comment on Blurring Text in a sentence
To compute the x position of the substring, you can simply multiply the number of chars before by char width in the font (will give approximate value, but should be enough here) or use sizeWithAttributes. This could help: https://stackoverflow.com/questions/37475593/swift-how-do-i-find-the-positionx-y-of-a-letter-in-a-uilabel
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’23
Comment on swiftUI
You marked the answer as correct, which means you have solved your problem… So little chance you get a quick answer now. In any case, you should have shown your present code, shown what you get and explain why it is not correct.
Topic: Programming Languages SubTopic: Swift Tags:
May ’23
Comment on I try to run function on another class, But have a suspicious nil in code.
You closed your own question by marking it as correct answer (which visibly was not). Don't expect many more answers. But check the identifier you passed to instantiateViewController and what class you have defined in storyboard for this Setting VC (it should be SettingUI). And remember: you should not unwrap an optional (controllerTwo) if you are not absolutely sure it cannot be nil. But you should test with if let controllerTwo { …
Topic: Programming Languages SubTopic: Swift Tags:
May ’23
Comment on SwiftUI view printout on paper
You have to use UIPrint. There are many tutorials. This one may help: https://www.testdevlab.com/blog/how-to-print-from-ios-applications
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on JSONEncoder issue?
Thanks for feedback. Don't forget to close the thread and good continuation.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Use of 64pt and 68pt iOS App Icon Sizes
Could it be for Vision pro ?
Replies
Boosts
Views
Activity
Jun ’23
Comment on Blurring Text in a sentence
To compute the x position of the substring, you can simply multiply the number of chars before by char width in the font (will give approximate value, but should be enough here) or use sizeWithAttributes. This could help: https://stackoverflow.com/questions/37475593/swift-how-do-i-find-the-positionx-y-of-a-letter-in-a-uilabel
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Can a function with parameter packs return a non-generic value for each parameter?
Interesting. I did not know this use of each. Where is it described in Swift documetation ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on Consecutive statements on a line must be separated by ';'
@Scott, I din't notice this evolution. Thanks.There are older Swift versions in Apple books.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on SwiftUI view printout on paper
That is possible with the last solution I proposed. You hit the button, then image creation is made behind the scene and then you call for printing as described in the link.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’23
Comment on lamda versus lambda
Pleased you appreciate. Don't forget to close the thread and good continuation.
Replies
Boosts
Views
Activity
May ’23
Comment on Triple-Click to override Double-Click..?
That's why I warned it was objC for UIKit… But using NSClickGestureRecognizer instead of UITapGestureRecognizer should not be too hard a change.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
May ’23
Comment on swiftUI
You marked the answer as correct, which means you have solved your problem… So little chance you get a quick answer now. In any case, you should have shown your present code, shown what you get and explain why it is not correct.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’23
Comment on I try to run function on another class, But have a suspicious nil in code.
You closed your own question by marking it as correct answer (which visibly was not). Don't expect many more answers. But check the identifier you passed to instantiateViewController and what class you have defined in storyboard for this Setting VC (it should be SettingUI). And remember: you should not unwrap an optional (controllerTwo) if you are not absolutely sure it cannot be nil. But you should test with if let controllerTwo { …
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’23
Comment on Design pattern for scheduling simulation steps
I changed from main to a Dispatch in case it overpasses duration limit. Works quite OK. Thanks for all the help.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Comment on Is swiftui the only way to develop watchOS apps?
@darkpaw For stand alone watch app that may be great. But for companion apps where main app is UIKit, not so cool.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’23
Comment on Crash when I modify a bind value with a text field
OK, I attached a complete file.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’23
Comment on Drawing UIImage with perspective on Apple Watch
You're right, that's what I meant by : "scaleFactor is computed as linear progression from topScale to bottomScale depending on the line"
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’23