void ReleaseDesignerOutlets()
        {
            if (FeedCollectionView != null)
            {
                FeedCollectionView.Dispose();
                FeedCollectionView = null;
            }

            if (HomeButton != null)
            {
                HomeButton.Dispose();
                HomeButton = null;
            }

            if (FriendsButton != null)
            {
                FriendsButton.Dispose();
                FriendsButton = null;
            }

            if (AddPostButton != null)
            {
                AddPostButton.Dispose();
                AddPostButton = null;
            }

            if (ProfileButton != null)
            {
                ProfileButton.Dispose();
                ProfileButton = null;
            }
        }
Example #2
0
        public void SetBindings()
        {
            source.OnItemChanged += (o, e) =>
            {
                source.LoadData(dataContext.Posts.ToList());

                FeedCollectionView.ReloadData();
            };
        }
Example #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            SetBindings();
            SetCommands();
            BaseStyling();
            EventStyling();

            NavigationBar.Set(this, HomeButton, FriendsButton, AddPostButton, ProfileButton);

            FeedCollectionView.RegisterNibForCell(FeedCollectionViewCell.Nib, FeedCollectionViewCell.Key);

            var layout = new UICollectionViewFlowLayout();

            layout.ItemSize = new CoreGraphics.CGSize(388, 500);

            FeedCollectionView.SetCollectionViewLayout(layout, true);

            FeedCollectionView.Source = source;
            FeedCollectionView.ReloadData();
        }