Posts

Post not yet marked as solved
7 Replies
14k Views
In Swift UI it should be posssible to load a custom symbol from the asset catalog into an image, similar to Image(systemName:) with SF Symbol.However, with beta3 this does not seem to work for me, or I'm overlooking something…Image("foo") works fine with bitmaps from the asset catalog, but trying to use Image("bar") with an SVG – which was generated with the SF Symbols app, it delivers just an error log "no image bar was found in main bundle: file"Any ideas how to make that work?ThanksKlaus
Posted
by Kabe.
Last updated
.
Post not yet marked as solved
6 Replies
3.7k Views
I have a relatively simple SwiftUI component that is a member of both my iOS App target as well as the corresponding WatchKit Extension. As long as I select either the App scheme and select only the App target, or the Watch scheme and select only the WatchKitExtension target the preview works just fine. As soon as I include the View in both targets, the preview fails with The run destination iPhone 12 Pro Max is not valid for Running the scheme 'Trallala WatchKit App'. or The run destination Apple Watch Series 6 - 44mm is not valid for Running the scheme 'MultiTimer'. respectively. I get that the creation of the preview depends on the current target, but why does including it in additional targets create this error, and of course more important: How to address that? Additional question: Is there a way to create previews for both target platforms side by side? Thanks a million Klaus
Posted
by Kabe.
Last updated
.
Post not yet marked as solved
0 Replies
582 Views
Right now I have to use the credit card associated with my Apple-ID to pay for the developer program – at least if renewing automatically. As my developer program is for my business, I would much prefer to use my business credit card to pay for it, instead of mingling private and business expenses. Short of creating a second Apple-ID for this, which would be a pain in the ****, do I have any other options?
Posted
by Kabe.
Last updated
.
Post not yet marked as solved
0 Replies
1.6k Views
I'm trying to understand the following very simple view hierarchy: struct BugScreenSpacing: View { 		var body: some View { 				VStack { 						Button("This", action:{}) 						Button("takes", action:{}) 						Button("a lot", action:{}) 						Button("of space", action:{}) 				} 		} } This is cut off at the top. If I add a spacer and choose to ignore the bottom safe area, the content is still cut off at the top, and even executes the Spacer! struct BugScreenSpacing: View { 		var body: some View { 				VStack { 						Button("This", action:{}) 						Spacer() 						Button("takes", action:{}) 						Button("a lot", action:{}) 						Button("of space", action:{}) 				}.edgesIgnoringSafeArea(.bottom) 		} } As soon as I put that into a scrollview, it behaves as expected – full code including previews below: import SwiftUI struct BugScreenSpacing: View { 		var body: some View { 				VStack { 						Button("This", action:{}) 						Spacer() 						Button("takes", action:{}) 						Button("a lot", action:{}) 						Button("of space", action:{}) 				}.edgesIgnoringSafeArea(.bottom) 		} } struct BugScreenSpacing_Previews: PreviewProvider { 		 		static var previews: some View { 				Group { 						BugScreenSpacing() 								.previewDevice("Apple Watch Series 6 - 40mm") 						ScrollView{ 								BugScreenSpacing() 						} 						.previewDevice("Apple Watch Series 6 - 40mm") 						//Does not depend on device size: 						BugScreenSpacing() 								.previewDevice("Apple Watch Series 6 - 44mm") 						ScrollView{ 								BugScreenSpacing() 						} 						.previewDevice("Apple Watch Series 6 - 44mm") 				} 		} } What is happening here? How to correctly use the full available space, and rather are cut at the bottom than at the top?
Posted
by Kabe.
Last updated
.
Post not yet marked as solved
0 Replies
1.4k Views
PDFViewDelegate.pdfViewWillChangeScaleFactor only exists for MacOS, but how to listen for scale changes (at best before they happen) on iOS?I receive the PDFViewScaleChanged notification after the user changes scale by pinching, yet not if she or he does it by double tap. The same is true when trying to override PDFView.scaleFactor setter, double tap scale changes go unnoticed, although scaleFactor is actually adjusted.I'm trying to tackle the issue that there seem to be no reliable way to listen for scale changes (in the best case before they happen).Any ideas?Thanks a millionKlaus
Posted
by Kabe.
Last updated
.