Posts

Post not yet marked as solved
1 Replies
1k Views
I just want to see if anyone has worked around the following issue. I did file feedback at FB11405641. Using Apple's demo app from WWDC, if I open the LookAround when on an iPad in either split screen or using Stage Manager the full screen representation is not respecting the actual size of the window. See Here are some videos showing the issue: https://www.hotngui.com/tmp/SplitScreen.mov https://www.hotngui.com/tmp/StageManager.mov
Posted
by hotngui.
Last updated
.
Post marked as solved
3 Replies
1.2k Views
try await WeatherService.shared.weather(for: sf, including: .daily(startDate: start, endDate: end)) If the start date is in the past I get an empty forecast. If start date is in the future I just get the current day's forecast. I tried with .hourly as well; got the same problem as I always get hourly data for the current day.
Posted
by hotngui.
Last updated
.
Post marked as solved
4 Replies
1.3k Views
I am trying to use the new ShareLink component in an app I am moving to SwiftUI. If I use the init(items: Data, subject: Text?, message: Text?) variant of the initializer all works well. However if I try to include a preview using the initializer that takes an additional parameter that is a SharePreview instance I get a crash. The crash complains about Fatal error: SWIFT TASK CONTINUATION MISUSE: data(contentType:) tried to resume its continuation more than once, throwing exportFailed! thread #2, queue = 'com.apple.root.user-initiated-qos.cooperative', stop reason = Fatal error: SWIFT TASK CONTINUATION MISUSE: data(contentType:) tried to resume its continuation more than once, throwing exportFailed! The creation of the SharePreview object itself succeeds with nothing. Its the initialization of the ShareLink object that goes boom. Any ideas? Known issue? Wait for next beta? Environment: Xcode 14 beta 2, iOS 16 beta 2, iPhone 8
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
0 Replies
952 Views
I am attempting to utilize the new SWAttributionView in SwiftUI since I am adding SharedWithYou support to one of my apps. Below is the UIViewRepresentable I created to wrap the UIKit component. I have tried many combinations of view modifiers, but have not figured out how to get the height to be just what's needed. My goal is to pin the view near the bottom trailing edge of the view containing it. If I do the same UIViewRepresentable wrapping a UILabel, for testing purposes, I can simple use .fixedSize on it and a Spacer() to get the vertical effect I am looking for. struct AttributionView: UIViewRepresentable {     var highlight: SWHighlight     func makeUIView(context: Context) -> SWAttributionView {         SWAttributionView()     }     func updateUIView(_ uiView: SWAttributionView, context: Context) {         uiView.highlight = highlight         uiView.backgroundStyle = .material       uiView.horizontalAlignment = .trailing         uiView.displayContext = .summary     } }
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
2 Replies
852 Views
I am starting to use CLLocationButton in my apps, but can see an issue with its behavior. When the user taps on a UIButton it is visually noticeable that it's being tapped. Color/Alpha change, image adjusts, etc... When the user taps on a CLLocationButton there is no queues as to it being pressed. I've had several test users complain already that they think the button is not working given that the action might not result in an immediately change to the UI. Apple FB: FB10019792 Open Radar: https://openradar.appspot.com/FB10019792
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
0 Replies
1.1k Views
When a user receives a provisional notification they are given an option to keep receiving notifications or stopping then. If they tap "Keep" they use to get asked if they want them to be delivered prominent or quietly. Well, in iOS 15 (Xcode 13) my users are not getting that choice and the notifications are stuck in "delivered quietly" unless the user happens to change that in their Settings. This defeats the purpose of provisional notifications and I have to go back to the old way which causes the user to be interrupted in the app when I have to ask permission. I am guessing its related to the new Summary feature that recently got added by Apple. What's going on here, Apple?
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
2 Replies
856 Views
Am trying to get away from using UIPageViewController for a number of reasons, not the least of which is several perennial crashes that happen occasionally that I've never been able to reproduce myself but happen enough in the wild to be noticeable. I have high hopes for the new UICollectionViewCompositionalLayout in iOS 13 SDK; have worked around the safeArea issue. However, I cannot find a way to workaround or fix the problem that occurs when I rotate the device. Before rotation things are great, paging works, etc. Then when I do rotate the device the collectionView is scrolled such that I see half of two separate cells. Basically the current cell is not handled correctly. Any ideas or suggestions? Below is my layout for reference. Its as basic as one can get.     private func createLayout() -> UICollectionViewLayout {         let itemSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .fractionalHeight(1.0))         let item = NSCollectionLayoutItem(layoutSize: itemSize)         let groupSize = NSCollectionLayoutSize(widthDimension: .fractionalWidth(1.0), heightDimension: .fractionalHeight(1.0))         let group = NSCollectionLayoutGroup.vertical(layoutSize: groupSize, subitems: [item])         let section = NSCollectionLayoutSection(group: group)         section.orthogonalScrollingBehavior = .groupPaging         let layout = UICollectionViewCompositionalLayout(section: section)         return layout     } }
Posted
by hotngui.
Last updated
.
Post marked as solved
1 Replies
912 Views
I have a UICollectionViewDiffableDataSource that has its supplementaryViewProvider property set to a closure that returns a header view for the cell. The closure is only getting called for the first section of the collectionView regardless of the number of sections there are, each of which do contain cells. I am using Xcode 13 beta 5.
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
2 Replies
659 Views
I see that many accessibility features have been added to the SwiftUI API, but I am unable to find support for LargeContentViewer on custom views. Is it perhaps going by a different name? Is it really not supported yet in the latest SwiftUI implementation?
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
1 Replies
618 Views
I have user's wondering why my apps do not have a microphone icon in search fields that let them go directly to dictation, like the iOS Mail app. I know of no feature that would allow me to accomplish the same look/behavior. Understanding that the user first has to bring up the regular keyboard then tap the microphone on the bottom of the keyboard. Apple's apps should not be using features in what appear to be standard components that us app developers don't have access to. Before I file the enhancement/bug report I just want to confirm that I am correct in my thinking.
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
5 Replies
1k Views
I understand the value in moving from the UIImagePickerController to the PHPhotoViewController, but it seems to missing the feature that allows the user to edit/crop the photo. Am I missing something, or should I be submitting an enhancement request?
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
1 Replies
614 Views
I want to clean up a bunch of questions that I have asked that have reasonable responses, but I cannot figure out for the life of me how to indicate that a question is Solved. I do still see a "Solved" count in my profile.
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
4 Replies
3.1k Views
I am looking into using the new NSPersistentCloudKitContainer to sync some internal data for my app. Generally it works great, but I have one scenario that I cannot figure out.Here the basic scenario, there is a single record in CloudKit that created and used to keep track of some internal state. Keeping it the cloud allows for two cases: when the user open the app on another device (say an iPad) and when the user re-installs the app on the same device.If its indeed the very first time the user is using the app on any device, I need to create the record with a bunch of default initial values. I am okay with spending a little time at app startup determining if its a brand new user or an existing user installing on another device.I thought maybe observing NSPersistentStoreRemoteChangeNotification would provide a useful point in time that I can say "ah ha, now I know its a new user, or an existing user". However its gets called a lot and I cannot find anything in its userInfo that gives me a definitive answer to my question.Any suggestions?joey
Posted
by hotngui.
Last updated
.
Post not yet marked as solved
2 Replies
972 Views
I am unable to get a UIButton's image to size as I change the font size. I can get the text in the label to work correctly using the adjustsFontForContentSizeCategory property on the button's label, but there appears to be now equivalent for the image. If I restart the app after making the font size change, the button does indeed scale the image correctly so I know I have the preferred configuration setup correctly. I figured I could work around the issue using traitCollectionDidChange and comparing the preferredContentSizeCategory, but I am still unable to get the button to resize itself no matter what I attempt to tweak. Anybody else running into this issue? Any workarounds?
Posted
by hotngui.
Last updated
.