objective c - iOS: animate UICollectionView vertical expansion with constraints? -



objective c - iOS: animate UICollectionView vertical expansion with constraints? -

i've view controller uicollectionview on top (using default grid layout) followed other controls below it. add together / remove cells / collection view, want expand / contract in vertical direction (so has plenty rows show of cells , no more), , controls below move downwards / screen accordingly. if imagine how email app uis work when add together / remove addresses, that's effect i'm trying implement. achieving effect using constraints, though, eluding me. help greatly, appreciated!

what did:

removed constraints in ib added height constraint on collection view , connected iboutlet had ib add together missing constraints add observer collection view's contentsize property

now, when add together cell collection view , tell reload, i'm notified when contentsize changes , can set constant height constraint contentsize height. result: collection view resizes fill it's content, other controls moving / downwards needed :-)

ios objective-c uicollectionview constraints

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -