Post

Replies

Boosts

Views

Activity

Reply to Viewing Interface in XCode 12.3
What sort of CocoaSlideshow have you downloaded? I cannot find one in Apple's pages. I cannot display the interface in XCode. Old apps may be using .xib (or .nib, if it's too old) instead of .storyboard. Or the app may be constructing UI by code. How can I display the interface in this project? If you cannot find any in a buildable project, no way. The project may not have a visual interface definitions like storyboard or xib.
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
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 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 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 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