Skip to content

Instantly share code, notes, and snippets.

@dvdsgl
Last active December 19, 2015 13:29
Show Gist options
  • Save dvdsgl/5962799 to your computer and use it in GitHub Desktop.
Save dvdsgl/5962799 to your computer and use it in GitHub Desktop.
Beautifully maximizing a UIView in F# and Xamarin.iOS
// Beautifully maximizing a view
let status = 20.0F
this.Frame <- UIScreen.MainScreen.Bounds.With (Y = just status, Height = subtract status)
// FYI...
let just s _ = s
let subtract y x = x - y
// I previously had the more cryptic:
this.Frame <- UIScreen.MainScreen.Bounds.With (Y = (+) status, Height = (+) -status)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment