Search results for

swiftui

16,580 results found

Post

Replies

Boosts

Views

Activity

Reply to NSMutableAttributedString initialisation to prevent crash
I really need the info that such a report contains Someone else sent me an Apple crash report and that let me refresh my understanding of this issue. Sadly, this is a known bug in iOS (r. 23592459) that can potentially affect anyone who constructs an NSAttributedString from HTML. There isn’t a good workaround for this other than to avoid this API altogether. My advice: If you’re displaying large chunks of complex HTML, use a WKWebView. If this HTML is highly constrained — perhaps you’re just using HTML as an easy way to transfer a constrained set of attributes, like bold and italics — create your own markup system that doesn’t relying on HTML. Or parse the HTML for just these attributes and use the result to create your attributed string. Alternatively, consider using the Markdown support we added in macOS 12 and iOS 15. For the details, watch WWDC 2021 Session 10109 What’s new in Foundation. IMPORTANT Foundation’s Markdown support is strongly integrated with SwiftUI but it’s not limited to SwiftUI
Topic: App & System Services SubTopic: General Tags:
Apr ’19
Release Notes for SwiftUI Tutorials
When browsing the new SwiftUI Tutorials in Xcode, please take note of the following items mentioned in the Xcode 11 Beta Release notes:1. After following Section 7, Step 7 in the Building Lists and Navigation tutorial, you might encounter an error in your project’s SceneDelegate.swift file.Workaround: Update line 14 of SceneDelegate.swift to use LandmarkList instead of LandmarkDetail:window.rootViewController = UIHostingController(rootView: LandmarkList())2. After following Section 5, Step 3 in the Handling User Input tutorial, you might encounter an error in the preview provider.Workaround: Undo the change to the LandmarkDetail initializer, so that you only add the environmentObject(_:) modifier:struct LandmarkDetail_Preview: PreviewProvider { static var previews: some View { LandmarkDetail(landmark: landmarkData[0]) .environmentObject(UserData()) } }The web version of the SwiftUI Tutorials has the correct steps.
5
0
2.3k
Jun ’19
Xcode 11 Beta SwiftUI Canvas.. not showing?
I downloaded the new XCode 11 Beta this afternoon, found this Apple Tutorial, figured I'd start to take a peek at it. Made the sample app, as instructed. The Canvas isn't showing. I've clicked Editor - Editor & Canvas (that is checked). The left side of the screen looks just like the tutorial, but there is no preview iphone sort of sumultor. Clicked on all the little buttons, but have found nothing. Anyone get it to work?https://developer.apple.com/tutorials/swiftui/creating-and-combining-views
11
0
25k
Jun ’19
SwiftUI Programatically?
HI,My project bypasses storyboards, I like to keep everything in code that I write myself. Can SwiftUI be used this way? Also, how powerful is SwiftUI? Is it just for writing simple user interfaces or can it be used to write highly customized ones that rival a programatic approach?ThanksBrian Duffy
2
0
1.6k
Jun ’19
Reply to SwiftUI Programatically?
I'm no expert, but I will try to answer.SwiftUI uses only source code to describe the UI. No storyboard files.SwiftUI is similar to other reactive UI frameworks, which are quite powerful.I think the intent here is to be able to use SwiftUI for all apps. It's pretty cool how you can adopt it piecemeal within your app. cheers
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’19
SwiftUI Demo Issue
HI All:I tried to follow the Landmarks tutorial for Swift UI and I'm stuck looking for the RESUME button as described in the tutorial. It is absolutely nowhere to be found I only have this little picture of a code spippet instead of the actual device preview:Has anyone else experienced this or even better, know how to fix it?Best,Mark
3
0
1.7k
Jun ’19
Swiftui mac error
I get this error when I try to start my app as mac app:underlying: Error Domain=NSOSStatusErrorDomain Code=-10661 (null) UserInfo={_LSLine=3554, _LSFunction=_LSOpenStuffCallLocal}, failureCategory: UVFoundation.FailureCategory.infrastructureFailure)
1
0
1.9k
Jun ’19
SwiftUi basic questions
Hi, just some general questions on SwiftUI:1 . What is exactly swiftUi?2. How is swiftUI different from storyboards and from AppKit, UiKit etc…?3. Does SwiftUI allow you to drag and drop Objects like story boards?3. How does it relate/corrolate with storyboards?Also, how easy does it seems to migrate a current existing app to swiftui?Thanks.
4
0
3.8k
Jun ’19