Fix bug in UI generator for iOS.