Allow custom button titles with GCVirtualControllerElementConfiguration

Number:rdar://FB9204563 Date Originated:6/23/21
Status:Open Resolved:
Product:Game Controller Framework Product Version:iOS 15
Classification:Suggestion Reproducible:n/a
The only way to customize the contents of a GCVirtualController button is to provide a custom UIBezierPath. This is cumbersome to use properly for the common case where you want to relabel a button to better explain its purpose (such as remapping X to “Start” in my game, or remapping Y to “Reset”). 

Instead, there should be another property on GCVirtualControllerElementConfiguration, such as GCVirtualControllerElementConfiguration.title, that allows developers to easily set the title of the button. This would display the text in the same font as the default GCVirtualController buttons, but shrinking it as necessary to fit in the space.

Currently, I’m using this gist to create a UIBezierPath from a String that approximately matches the default GCVirtualController button font:  

However, this is not perfect (especially when letters require different kerning), and will look especially out of place if Apple ever changes the default button font. An official API that ensures my text will always match the default button text would help dramatically.


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!