Changing Frame of UICollectionView RRS feed

  • Question

  • User266789 posted

    I am having trouble altering the size of a collection view programatically and in story board mode.

    In my View Controller I have two UiCollectionViews layered on top of each other. So when a user hits a filter button the hidden UICollectionView shows up on top of the other UICollectionView.

    As it is right now the second UICollectionView I created can't be altered programatically or through the story board mode. When I try to alter the size in story board mode it reverts back immediately to the full width of the screen. I would like for it to be half the width of my primary UICollectionView so that it doesn't cover up the primary UICollectionView.

    I've tried to google this issue and can't seem to find anyone else experiencing this.

    menuFilter.Hidden = true; var frame = new CGRect(0, 170, 150, 200); menuFilter.Frame = frame; menuFilter.BackgroundColor = UIColor.Purple; //menuFilter.Layer.ZPosition = 1;

    Tuesday, February 7, 2017 5:30 PM


  • User266789 posted

    I discovered what I was doing wrong. I had my second UICollectionView embeded inside my primary UICollectionView.

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Tuesday, February 7, 2017 7:28 PM