protected T GetContainerView <T>(string identifier = null) where T : UIViewController { UIStoryboardSegue segue = null; if (!string.IsNullOrWhiteSpace(identifier)) { SegueCollection?.TryGetValue(identifier, out segue); } else { segue = SegueCollection?.Values?.FirstOrDefault(x => x.DestinationViewController.GetType().Name == typeof(T).Name); } return(segue?.DestinationViewController as T); }
public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender) { SegueCollection.Add(segue.Identifier ?? segue.ToString(), segue); }