Post

Replies

Boosts

Views

Activity

Reply to All of my programmatically created buttons work except for one
The code as shown cannot possibly be triggering the action for button #11. You must be running some different code. Anyway, I would check the view debugger to see if there’s some other view getting the touches in front of the button, and make sure your button’s frame is what you expect. The default for clipsToBounds is false, so if the frame is messed up a view can have all of its contents visible outside its bounds but it will not receive touches.
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’20
Reply to Constraints Issue with alert popover
Not sure, probably a relatively harmless iOS bug. But you should be aware that a UIAlertController’s view hierarchy is considered private API. If you need a customized alert you need to roll your own view controller. Modifying UIAlertView directly has burned many developers in the past as the underlying implementation is subject to change at any time. I’m sure the same will happen with UIAlertController eventually. From the documentation: “Important - The UIAlertController class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private and must not be modified.”
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’20