Artificial Control Limitations

Just curious, and most likely only someone from the Xojo iOS team would be able to answer this.
But why do some of the controls have limits on how tall or wide they can be? Switch makes sense, as Apple limits that to 31x51
but SegmentControl can be any height (not limited to 28), TextField doesn’t need to be limited to 31.

Progresswheel is 24? when Apples own documents indicate a fixed size of either 20x20 or 37x37

I’m curious to know about this too.

I struggled into increasing the iosTextfield height but managed it by

  1. placing the Textfield in a iOSContainerControl
  2. in the Container’s Constructor:
  3. removing all constraints using a declare
  4. and resetting all constraints manually.

Step #3:

[code] Declare sub removeConstraints lib UIKitLib selector “removeConstraints:” (obj_id as ptr, constraints as ptr)
Declare function constraints lib UIKitLib selector “constraints” (obj_id as ptr) as ptr

	dim ctrs As ptr = constraints(containerHandle)
	removeConstraints(containerHandle, ctrs)[/code]

PM if you want an example project.

Open Xcode
Create a new iOS SingleView app (doesn’t really matter which)
Drag a segmented control onto the main story board
Do the same with a text field and an “Activity Indicator View”
By default in Xcode Apple also restricts the sizes

Yes you CAN wok around it but thats not “default” behaviour

Yes that seems arbitrary. A few of the sizing decisions - if they were decisions - in Xojo iOS seem a bit arbitrary. I created <> two years ago pointing out that the iOSFont.SystemFontSize returns a font of 14px instead of the default system font size of 17px listed in Apple’s HIG. It still hasn’t had any attention, so my app has to set the fonts everywhere in code, for almost every UI control, so that it looks like other apps. This has the undesirable side-effect of over-riding any font/size choices that a user might make, e.g. for accessibility reasons.

That call just returns UIFont systemFontSize
I suspect it returns 14 based on the SDK we tell the OS we’re linking against (or maybe that our minimum supported iOS version is 8.0)
That particular call we do nothing but bridge the call from Xojo to the OS
You’d get the same value with a declare

Thank you for clarifying Norman but, given that it returns 14 when Apple’s HIG says it should be 17, I wonder whether this call/approach is no longer relevant/appropriate?

Not sure
There have been several other “default” sizes Apple has added over the years

IF it is related to the SDK we link against then dropping support for iOS 8 may be one alternative
Or using a newer SDK that still supports iOS 8
There are several possibilities