Post

Replies

Boosts

Views

Activity

Reply to Closure definition mismatch
I did not know that. Could you please provide an official document confirm that ? Submit your iOS and iPadOS apps to the App Store - https://developer.apple.com/news/?id=itpt8dkc Starting April 2021, all iOS and iPadOS apps submitted to the App Store must be built with Xcode 12 and the iOS 14 SDK. Before April 2021, you can use Xcode 11+ and the iOS 13+ SDK, but not Xcode 10.1.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to How to handle URL Image if has non English characters SwiftUI
its not display anything . Then your item.image is not what I expect. Are you sure it does not contain schemes like https:// as you have shown as an example? UPDATE i solved the problem. instead of .urlPathAllowed - urlQueryAllowed and it worked. Thank you so much for help. Happy to hear you solved your issue. If urlQueryAllowed worked, I guess your image contained scheme.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Text cutting subscript character
Thanks for showing the issue-reproducible code. I do not have a font named Lato-bold nor a Color primaryColor, but could have confirmed that what you have described did happen with some specific fonts. Can't you use baselineOffset modifier? Text("\(quiz.question)") .font(.custom("Lato-Bold", size: 17)) .baselineOffset(5) //- .foregroundColor(Color.red/*("primaryColor")*/) .multilineTextAlignment(.center) .fixedSize(horizontal: false, vertical: true) .lineLimit(nil) .padding(.horizontal)
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Error initialising UnsafeMutablePointer<ObjCBool>
The following produces the same error, which I reckon is a compiler bug I do not understand why you think your new code would be a compiler bug. You declare a let constant stop without initial value, so you need to assign an initial value to it before it is used. But you are using it and that is causing the compiler error you described. Why do you think your new code is valid?
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Swift code didUpdateValueFor characteristic
Your code is sort of a mess (an example of bad usage of bytes) and can be simplified as: func peripheral(_ peripheral: CBPeripheral, didUpdateValueFor characteristic: CBCharacteristic, error: Error?) { let u16 = characteristic.value![0] let chart = Character(UnicodeScalar(u16))// make into a character // } (And you should better avoid naming u16 for a variable of type UInt8.) So, where is your 20 bytes placed? Next to the first byte (u16)? Or some where else? One more, what the 20 bytes are representing? 10 sixteen-bit integers? Or a text containing maximum-20 ascii characters? Or something else?
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’21
Reply to Navigation View Problems
Thanks for showing your code, but please use the Code block feature (see icon `) of this site. NavigationView{...} is only needed in the root view. Remove it from the second and third view. the back button is coming further and further down the screen vertically. That happens because your are stacking many navigation bars using nested NavigationView`.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21
Reply to Navigation View Problems
SwiftUI encountered an issue when pushing aNavigationLink. Please file a bug. Seems to be a different issue than the problem in your opening post of this thread. Better start a new thread for the new issue, please keep one thread one topic. But as the error message is suggesting, it may be caused by some bugs of the current implementation of SwiftUI. If you find some weird behavior which might be related to the message, you may need to find some workarounds until Apple fix it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Mar ’21