Workaround for profile header changing size when statuses are loaded in the background
Closes #250
This commit is contained in:
parent
c8375b742a
commit
001a73af3c
|
@ -1616,7 +1616,7 @@
|
|||
TargetAttributes = {
|
||||
D6D4DDCB212518A000E1C4BB = {
|
||||
CreatedOnToolsVersion = 10.0;
|
||||
LastSwiftMigration = 1200;
|
||||
LastSwiftMigration = 1410;
|
||||
};
|
||||
D6D4DDDF212518A200E1C4BB = {
|
||||
CreatedOnToolsVersion = 10.0;
|
||||
|
|
|
@ -61,6 +61,13 @@ class ProfileHeaderCollectionViewCell: UICollectionViewCell {
|
|||
}
|
||||
}
|
||||
|
||||
// overrides an internal method
|
||||
// when the super impl is used, preferredLayoutAttributesFitting(_:) isn't called while the view is offscreen (i.e., window == nil)
|
||||
// and so the collection view imposes a height of 44pts which breaks the layout
|
||||
@objc func _preferredLayoutAttributesFittingAttributes(_ attributes: UICollectionViewLayoutAttributes) -> UICollectionViewLayoutAttributes {
|
||||
return preferredLayoutAttributesFitting(attributes)
|
||||
}
|
||||
|
||||
enum State {
|
||||
case unloaded
|
||||
case placeholder(heightConstraint: NSLayoutConstraint)
|
||||
|
|
Loading…
Reference in New Issue