I totally missed this. Code from Stephane Pinel!
Put this in View.open
' ObjC Declare to get a ref to a class by its name
Declare Function objc_getClass lib "/usr/lib/libobjc.dylib" (aClassName As CString) as Ptr
' Here is the corresponding Xojo call
dim theUIColorClassRef As Ptr = objc_getClass("UIColor")
' UIKit Declare to create a color object
Declare Function decl_GetColorWithRGBA lib "UIKit" selector "colorWithRed:green:blue:alpha:" (UIColorClassRef As Ptr, red As Single, green As Single, blue As Single, alpha As Single) As Ptr
' Here is the corresponding Xojo call, where we create a flashy green color
dim myUIColorObject As ptr = decl_GetColorWithRGBA(theUIColorClassRef, (33.0/255.0), (209.0/255.0), (57.0/255.0), 1.0)
' UIKit Declare to get a reference to a View from its ViewController
Declare Function decl_GetView lib "UIKit" selector "view" (aUIViewController As Ptr) As Ptr
' Here is the corresponding Xojo call (View.Self returns a ViewController)
dim myViewPtr As Ptr = decl_GetView(self.Handle)
' UIKit Declare to set the backgound color of a View
Declare Sub decl_SetBackgroundColor lib "UIKit" selector "setBackgroundColor:" (aUIView As Ptr, aUIColor As Ptr)
' Here is the corresponding Xojo call
decl_SetBackgroundColor(myViewPtr, myUIColorObject)