Post

Replies

Boosts

Views

Activity

Reply to iOS 16 UITableView: You are setting a new content configuration to a cell that has an existing content configuration, but the existing content view does not support the new configuration. Existing content configuration is nil.
Aha. The problem was I forgot to assign the configuration property on the content view! 🤦‍♂️ -(nonnull __kindof UIView<UIContentView>*)makeContentView { CustomContentView *customContentView = [[CustomContentView alloc]init]; customContentView.configuration = self; return customContentView; }
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’22
Reply to UITableViewHeaderFooterView Not Being Cleaned Up, Abandoned Duplicate Header (not sticky) sometimes appears in the table view
After three years this issue has resurfaced. Huh.. it's very hard to reproduce. My best guess is there is some code path in UITableView that removes a header view after a delay, perhaps batched updates/animation etc. and if the data source is mutated this code path that cleans up the header view isn't being reached, and thus I'm left with an abandoned header view inside my table view. I verified that the header view is in the view hierarchy but its not in UITableView's reuse queue...it's scrolling in there but isn't associated with any of the table view's existing sections. Only workaround I can think of is to gather all UITableViewHeaderFooterView added to the the table view's hierarchy... -(void)didAddSubview:(UIView*)subview {     [super didAddSubview:subview];     if ([subview isKindOfClass:[UITableViewHeaderFooterView class]])     {         [self.theHeaderViewStash addObject:(UITableViewHeaderFooterView*)subview];     } } -(void)willRemoveSubview:(UIView*)subview {     [super willRemoveSubview:subview];     if ([subview isKindOfClass:[UITableViewHeaderFooterView class]])     {         [self.theHeaderViewStash removeObject:(UITableViewHeaderFooterView*)subview];     } } Then at some point clean up: -(void)cleanHeaderViewsLeftStranded { if (self.theHeaderViewStash.count == 0) { return; } NSSet *visibleHeaderViews = //gather any existing header view returned from UITableView' -headerViewForSection: //Remove NSMutableSet *localStash = [self.theHeaderViewStash mutableCopy]; [localStash minusSet:visibleHeaderViews];  for (UITableViewHeaderFooterView *aHeader in localStash)   { [aHeader removeFromSuperview]; } } I'd rather pound sand than have to do this...that's a lot of ugly code but I that's all I got...this bug has been lingering in UITableView for years... not sure when I should call the cleanHeaderViewsLeftStranded perhaps in a -layoutSubview override.
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’22
Reply to UIKitCore -[UIResponder doesNotRecognizeSelector:] crashes since IOS 15.7
I also have the same issue on iOS15.7. I don't know the cause, but the number of crash reports is increasing. Did adding it to UISceneDidDisconnectNotification not reduce the number of crashes? Ya, the crashes have been piling up since iOS 15.7, even on older builds that were fine before and I released well before iOS 15.7. I don't know what you mean by "Adding it to UISceneDidDisconnectNotification"? Taking a look into this a bit deeper I discovered the four following objects listen to UISceneDidDisconnectNotification (three are private API). UIScreen UIEventEnvironment _UIRemoteKeyboards _UIObjectPerCanvas
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’22
Reply to UIKitCore -[UIResponder doesNotRecognizeSelector:] crashes since IOS 15.7
I just manually posted the notification to try to tease out the issue per @andyl_'s suggestion that I had registered an observer for UISceneDidDisconnectNotification with an invalid selector...so I manually tried posting the notification to trigger the crash (but as a mentioned, I do not have any code that listens for this notification). All observers of UISceneDidDisconnectNotification are owned by the system.  I just submitted the crash-fixed version for review and am waiting for the review to be completed. In my multiple apps, there are apps that crash on iOS15.7 and apps that do not crash. I found the difference and took countermeasures. Can you share your solution? I can't reproduce the crash in my test environment at all. It probably doesn't help that Apple didn't ship iOS 15.7 SDK simulator runtime to developers.
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’22
Reply to -[NSWorkspace URLForApplicationWithBundleIdentifier:] returns apps from xcode archives
This behavior has been around for years. Pretty sure I filed a bug on this years ago and they closed it as “works as intended” and basically told me to pound sand. I recall a related issue where if your app was set to “Launch at login” launch services would sometimes launch an app build in Xcode archives at login. I think it’s possible to workaround the issue by unregistering the app with lsregister…I never tried. I manually zip my Xcode archives to avoid this issue..been doing it forever. Even if there is a workaround it’s absurd default behavior. Pretty sure Apple has known about it for a very long time.
Topic: UI Frameworks SubTopic: AppKit Tags:
Oct ’22
Reply to UIWindow safeAreaInset.bottom value is 20.0 on iPad even when window is presented like a "modal view controller" via UIWindowSceneActivationAction
I decided to just live with the safeAreaInset bottom value of 20.0 even when the external window scene is presented like this. Adjusted a few things to make it look better in my UI but not worth comparing the frame of the window vs the frame of the screen to detect this state, as that code is too fragile. I still think the safeAreaInset bottom should be 0 when the window scene is presented in this style.
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’22
Reply to Search ads - $0 Spent in 3 Weeks
How is Basic going for you? Did it get any better? I started a Basic campaign recently. After the first day it seems Apple just stopped serving the ads for my Basic campaign. I also tried increasing the CPI but that hasn't been successful yet (I'm going to give it a little more time). What's weird is I can only find the Ad in the App Store on a direct search of my app name. My concern of course with that is Apple charging me for installs on a direct search of my app by name (since they place the Ad over the organic result). If the ad is being served as a result of other search queries, I haven't been able to find it. Of course if Search Ads starts getting my app valuable installs all is forgiven but I haven't really seen Basic do anything so far.
Topic: App & System Services SubTopic: General Tags:
Oct ’22