Post

Replies

Boosts

Views

Activity

Comment on Usable screen space in a Mac
this line      usableHeight = NSMenu.menuBarVisible() ? totalHeight - 23 : totalHeight      uses ternary operator ; is a condensed form of it then else.  It is equivalent to:     if NSMenu.menuBarVisible() { usableHeight = totalHeight - 23 } else { usableHeight = totalHeight }. Swift programming language explains « The ternary conditional operator is a special operator with three parts, which takes the form question ? answer1 : answer2. It is a shortcut for evaluating one of two expressions based on whether question is true or false. If question is true, it evaluates answer1 and returns its value; otherwise, it evaluates answer2 and returns its value. ». It is very convenient when you have to set a value depending on condition. For instance let color = (score < 10) ? UIColor.red : UIColor.green
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Comment on Fetch Core Data Issue
Please tell exactly where you stand now: are the favorites saved corectly ? What are all print output you get when you restart the app ? ANd provide more precise output with          print("There are favourites", prefArr.count)
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’21
Comment on List Sections
I do not see the link between the screen capture and the code you post for contentView. In addition, there is no section defined in this code.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Sep ’21
Comment on What is the empty field in the new Date Picker?
That just confirms the 2 solutions I proposed.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Usable screen space in a Mac
this line      usableHeight = NSMenu.menuBarVisible() ? totalHeight - 23 : totalHeight      uses ternary operator ; is a condensed form of it then else.  It is equivalent to:     if NSMenu.menuBarVisible() { usableHeight = totalHeight - 23 } else { usableHeight = totalHeight }. Swift programming language explains « The ternary conditional operator is a special operator with three parts, which takes the form question ? answer1 : answer2. It is a shortcut for evaluating one of two expressions based on whether question is true or false. If question is true, it evaluates answer1 and returns its value; otherwise, it evaluates answer2 and returns its value. ». It is very convenient when you have to set a value depending on condition. For instance let color = (score < 10) ? UIColor.red : UIColor.green
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on No more mail notification from forum
It's working, but with some glitches: no message sent occasionally.
Replies
Boosts
Views
Activity
Aug ’21
Comment on A question about use 'lowerThan' when I learning 'precedencegroup'
That's exactly what the doc states: group must come from another module.    need to be in different modules to allow lowerThan
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Excluding activity types for UIActivityViewController: some are still present
Thanks for the answer. It would be useful to have this mentioned in documentation.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Swift + OS X + Xcode : Change NavigationLink destination and text programtically
Sure, you have to change the value of firstPass to false once you have fired the first link.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on iOS 15 'Drag to Dismiss' Regression
Sure, I did not propose this as a solution, just a test. And what happens if you scroll beyond the bottom of the scrollView ? In any case, thanks to feedback if you get answer to the FB report.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on iOS 15 'Drag to Dismiss' Regression
What happens if the scrollView does not go up to the top but leaves some space to catch and drag ?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on No more mail notification from forum
Good news. It is working again now. Thanks.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Best way to put object back into constraint lines after being moved?
And if you want to keep the new position, use Update Constraint Constants.
Replies
Boosts
Views
Activity
Aug ’21
Comment on Stuck in DFU mode and can't restore
Was it after installing a beta version of iOS ? In anycase, you should contact Apple support. See here: https://support.apple.com/en-au/HT201263
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Value of type 'UIView?' has no member 'isEnabled'
Or create a Bool true or false depending on $segmentNumber
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Fetch Core Data Issue
Please tell exactly where you stand now: are the favorites saved corectly ? What are all print output you get when you restart the app ? ANd provide more precise output with          print("There are favourites", prefArr.count)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Aug ’21
Comment on Is SwiftUI usable?
I would not devlop this (and probably many more features) on SwiftUI today.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21