Post

Replies

Boosts

Views

Activity

Reply to Generating strings file with genstrings
A suggestion. Instead of the func, you could define String extension, with a property or a func extension String { var localized: String { NSLocalizedString(self, comment: "") } mutating func localize(comment: String = "") - String { NSLocalizedString(self, comment: comment) } } then you can call myString.localized or myString.localize() or myString.localize(comment:"Some comment") print("hello".localized) var myString = "hello you" myString = myString.localize(comment: "Some comment") // or myString = myString.localize() without comment print(myString)
May ’21
Reply to iOS 14.5 issues
Are they your own apps (ones you developed) or apps you downloaded. For the latter, what problem do you get ? For the former, did you try to update the app ? If you search on Google 'downgrade from iOS 14.5 to 14', you will find a lot of material. In any case, do a complete backup of your iPhone before, there is always a real risk to loose all your data.
Topic: App & System Services SubTopic: Core OS Tags:
May ’21
Reply to Generating strings file with genstrings
writing "bla-bla-bla".localized looks ugly for my taste.  You're right, that's a question of taste. But there are already a lot like this in StringProtocol: "bla-bla-bla".localizedUppercase or "bla-bla-bla".localizedCapitalized If you need to keep your func, why not change it as: func localized(_ string: String, comment: String = "") - String { NSLocalizedString(string, comment: comment) } Doing so you can still call: cell.label.text = localized("Hello world")
May ’21
Reply to SwiftUI App crash after keyboard show
Video is inaccessible. When running your code, just get a screen with show second view at top Tab 1 Un in the middle a field on the left at the middle, but quasi hidden a tab bar at bottom when I click button Which button, please be more precise I clicked on secondView only change state button which returns to the first view, just changed with Tab 1 Der in the middle Impossible to test anything.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to SwiftUI App crash after keyboard show
OK, I could reproduce the crash (after deselecting I/O Keyboard Connect Hardware Keyboard). The crash seems due to the 2         switch tradingMode { } section If I comment out any of them, no more crash. If I reconnect Hardware Keyboard; no crash either. So problem is effectively caused by showing keyboard. Some conflict with the tabs ? I also get a crash if I tap on tab 2, without any keyboard. So there is a problem with tabs. I'll look further to it. I run Xcode 12.4 on MacOS 10.15.7
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’21
Reply to Swift program
What do you expect to learn if you just ask others to do the work for you ? The right use of this forum is to explain first what you did Then the problem you have. Have you an idea of the algorithm to do this ? That's the first step, before coding.
Topic: Programming Languages SubTopic: Swift Tags:
May ’21
Reply to NSPrintInfo design report
Of course I have code(s) for PrintView. But the content is very specific to the different apps. And too long to post here. If you post an email address, we could continue discussion through this mail channel.
Topic: UI Frameworks SubTopic: AppKit Tags:
May ’21