Post

Replies

Boosts

Views

Activity

Ignoring internal / private API classes
Hello - I am wondering if doing something like the following would keep an app out of the app store. I need to ignore Apple internal classes that are in the view hierarchy: (subview is the current view as a traverse the view tree) let className = String(describing: type(of:subview.self)) if !className.starts(with: "_") { /// do something here } Thanks!
1
0
335
Jul ’24
drawHierarchy speed
In iOS, I'm trying to do multiple (upwards of 10) screen snapshots (UIImages) per second to be combined into a video and am running into some challenges. UIView's drawHierarchy seems to be to slow when run on the main thread, causing jitter with the UI experience. I've noticed that I can run it on a background thread, but only when passing a value of FALSE for the afterScreenUpdates parameter. This does cause the main thread warning to be written to the console (when the main thread checker is turned off), but does work. And I don't have to worry about blocking the main thread as it is on a background thread. The question is, will running drawHierarchy on the background thread potentially cause memory corruption when traversing the entire tree of a UIWindow. And if so, what is the advised most performant method of capturing iOS screenshots? drawHierarchy Doc: https://developer.apple.com/documentation/uikit/uiview/1622589-drawhierarchy TIA
Topic: UI Frameworks SubTopic: UIKit
4
0
596
Jun ’24