示例#1
0
        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);
        }
示例#2
0
 public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
 {
     SegueCollection.Add(segue.Identifier ?? segue.ToString(), segue);
 }