public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            var conversation = ConversationForIndexPath(indexPath);
            if (ShouldShowConversationViewForIndexPath(indexPath))
            {
                var controller = new AAPLConversationViewController
                {
                    Conversation = conversation
                };

                controller.Title = conversation.Name;
                ShowViewController(controller, this);
            }
            else
            {
                var photo = conversation.Photos.GetItem <AAPLPhoto>((int)conversation.Photos.Count - 1);
                var controller = new AAPLPhotoViewController
                {
                    Photo = photo,
                    Title = conversation.Name
                };

                ShowDetailViewController(controller, this);
            }
        }
Пример #2
0
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            var conversation = ConversationForIndexPath(indexPath);

            if (ShouldShowConversationViewForIndexPath(indexPath))
            {
                var controller = new AAPLConversationViewController
                {
                    Conversation = conversation
                };

                controller.Title = conversation.Name;
                ShowViewController(controller, this);
            }
            else
            {
                var photo      = conversation.Photos.GetItem <AAPLPhoto>((int)conversation.Photos.Count - 1);
                var controller = new AAPLPhotoViewController
                {
                    Photo = photo,
                    Title = conversation.Name
                };

                ShowDetailViewController(controller, this);
            }
        }
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            var photo = PhotoForIndexPath(indexPath);
            var controller = new AAPLPhotoViewController();
            controller.Photo = photo;

            int photoNumber = indexPath.Row + 1;
            int photoCount = (int)Conversation.Photos.Count;
            controller.Title = string.Format("{0} of {1}", photoNumber, photoCount);
            ShowDetailViewController(controller, this);
        }
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            var photo      = PhotoForIndexPath(indexPath);
            var controller = new AAPLPhotoViewController();

            controller.Photo = photo;

            int photoNumber = indexPath.Row + 1;
            int photoCount  = (int)Conversation.Photos.Count;

            controller.Title = string.Format("{0} of {1}", photoNumber, photoCount);
            ShowDetailViewController(controller, this);
        }