/// <summary> /// Static helper to show the 'empty overlay' if a business object is null /// </summary> /// <returns> /// True if it was required, false if not (ie. the business object is NOT NULL) /// </returns> public static bool ShowIfRequired(ref EmptyOverlay emptyOverlay , object toShow , UIView view , string caption , EmptyOverlayType type) { if (toShow == null) { if (emptyOverlay == null) { emptyOverlay = new EmptyOverlay(view.Bounds, caption, type); view.AddSubview(emptyOverlay); } return(true); } else { if (emptyOverlay != null) { emptyOverlay.RemoveFromSuperview(); emptyOverlay = null; } } return(false); }
/// <summary> /// Static helper to show the 'empty overlay' if a business object is null /// </summary> /// <returns> /// True if it was required, false if not (ie. the business object is NOT NULL) /// </returns> public static bool ShowIfRequired (ref EmptyOverlay emptyOverlay , object toShow , UIView view , string caption , EmptyOverlayType type) { if (toShow == null) { if (emptyOverlay == null) { emptyOverlay = new EmptyOverlay(view.Bounds, caption, type); view.AddSubview (emptyOverlay); } return true; } else{ if (emptyOverlay != null) { emptyOverlay.RemoveFromSuperview (); emptyOverlay = null; } } return false; }