Many times I'll read Obj-C code and need the value to one of their constants present in one of the Obj-C header files.
For notifications, I've been able to find them in MonoTouch such as UIApplication.DidEnterBackgroundNotification
.
Is there a standard way to get such values? I am needing to lookup UINavigationControllerHideShowBarDuration
for an odd reason.
UINavigationControllerHideShowBarDuration
is aCGFloat
, which MonoTouch maps to a .NETSystem.Single
(float
in C#).You should be able to use
MonoTouch.ObjCRuntime.Dlfcn.GetFloat
method to retrieve the constant (it could change between versions and should not be embedded like a C#const
) value at runtime. E.g.