Esempio n. 1
0
            public override bool CollapseSecondViewController(UISplitViewController splitViewController,
                                                              UIViewController secondaryViewController, UIViewController primaryViewController)
            {
                AAPLPhoto photo = ((CustomViewController)secondaryViewController).Aapl_containedPhoto(null);

                if (photo == null)
                {
                    return(true);
                }

                if (primaryViewController.GetType() == typeof(CustomNavigationController))
                {
                    var viewControllers = new List <UIViewController> ();
                    foreach (var controller in ((UINavigationController)primaryViewController).ViewControllers)
                    {
                        var        type   = controller.GetType();
                        MethodInfo method = type.GetMethod("Aapl_containsPhoto");

                        if ((bool)method.Invoke(controller, new object[] { null }))
                        {
                            viewControllers.Add(controller);
                        }
                    }

                    ((UINavigationController)primaryViewController).ViewControllers = viewControllers.ToArray <UIViewController> ();
                }

                return(false);
            }
		public override bool Aapl_containsPhoto (AAPLPhoto photo)
		{
			for (int i = 0; i < Conversation.Photos.Count; i++) {
				if (Conversation.Photos.GetItem<AAPLPhoto> (i) == photo)
					return true;
			}

			return false;
		}
        public override bool Aapl_containsPhoto(AAPLPhoto photo)
        {
            for (int i = 0; i < Conversation.Photos.Count; i++)
            {
                if (Conversation.Photos.GetItem <AAPLPhoto>(i) == photo)
                {
                    return(true);
                }
            }

            return(false);
        }
Esempio n. 4
0
        public static AAPLConversation ConversationWithDictionary(NSDictionary dictionary)
        {
            var photoValues = (NSArray)dictionary.ObjectForKey(new NSString("photos"));
            var photos      = new NSMutableArray(photoValues.Count);

            for (int i = 0; i < photoValues.Count; i++)
            {
                var photo = AAPLPhoto.PhotoWithDictionary(photoValues.GetItem <NSDictionary>(i));
                photos.Add(photo);
            }

            return(new AAPLConversation
            {
                Name = (NSString)dictionary.ObjectForKey(new NSString("name")),
                Photos = photos
            });
        }
Esempio n. 5
0
        public static AAPLUser UserWithDictionary(NSDictionary dictionary)
        {
            string name = (NSString)dictionary.ObjectForKey(new NSString("name"));
            var    conversationDictionaries = (NSArray)dictionary.ObjectForKey(new NSString("conversations"));
            var    conversations            = new NSMutableArray(conversationDictionaries.Count);

            for (int i = 0; i < conversationDictionaries.Count; i++)
            {
                var conversation = AAPLConversation.ConversationWithDictionary(conversationDictionaries.GetItem <NSDictionary> (i));
                conversations.Add(conversation);
            }

            var lastPhotoDictionary = NSDictionary.FromDictionary((NSDictionary)dictionary.ObjectForKey(new NSString("lastPhoto")));

            return(new AAPLUser {
                Name = name,
                Conversations = conversations,
                LastPhoto = AAPLPhoto.PhotoWithDictionary(lastPhotoDictionary)
            });
        }
		public override AAPLPhoto Aapl_containedPhoto (AAPLPhoto photo)
		{
			return Photo;
		}
 public override bool Aapl_containsPhoto(AAPLPhoto photo)
 {
     return true;
 }
Esempio n. 8
0
 public virtual bool Aapl_containsPhoto(AAPLPhoto photo)
 {
     return(false);
 }
Esempio n. 9
0
 public virtual AAPLPhoto Aapl_containedPhoto(AAPLPhoto photo)
 {
     return(null);
 }
 public override AAPLPhoto Aapl_containedPhoto(AAPLPhoto photo)
 {
     return(Photo);
 }
 public virtual bool Aapl_containsPhoto(AAPLPhoto photo)
 {
     return false;
 }
 public virtual AAPLPhoto Aapl_containedPhoto(AAPLPhoto photo)
 {
     return null;
 }
Esempio n. 13
0
 public override bool Aapl_containsPhoto(AAPLPhoto photo)
 {
     return(true);
 }