mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-06 16:07:42 +02:00
Merge pull request #1651 from vector-im/collection_warning
Fix UICollectionView warning: The behavior of the UICollectionViewFlo…
This commit is contained in:
@@ -277,7 +277,8 @@
|
||||
if (indexPath.section == selectedSection)
|
||||
{
|
||||
// Show edition menu
|
||||
tableViewCell.editionViewHeightConstraint.constant = 65;
|
||||
tableViewCell.editionViewHeightConstraint.constant = 60;
|
||||
tableViewCell.editionViewBottomConstraint.constant = 5;
|
||||
tableViewCell.editionView.hidden = NO;
|
||||
|
||||
MXRoom *room = [self.mainSession roomWithRoomId:editedRoomId];
|
||||
@@ -334,7 +335,7 @@
|
||||
}
|
||||
|
||||
// Retrieve the fixed height of the collection view cell used to display a room.
|
||||
CGFloat height = [RoomCollectionViewCell defaultCellSize].height;
|
||||
CGFloat height = [RoomCollectionViewCell defaultCellSize].height + 1;
|
||||
|
||||
// Check the conditions to display the edition menu
|
||||
if (editedRoomId && indexPath.section == selectedSection)
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
@property (strong, nonatomic) IBOutlet UIView *editionView;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *editionViewHeightConstraint;
|
||||
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *editionViewBottomConstraint;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *directChatButton;
|
||||
@property (weak, nonatomic) IBOutlet UIImageView *directChatImageView;
|
||||
@property (weak, nonatomic) IBOutlet UIButton *notificationsButton;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
[super awakeFromNib];
|
||||
|
||||
self.editionViewHeightConstraint.constant = 0;
|
||||
self.editionViewBottomConstraint.constant = 0;
|
||||
}
|
||||
|
||||
- (void)customizeTableViewCellRendering
|
||||
@@ -42,6 +43,7 @@
|
||||
self.collectionView.delegate = nil;
|
||||
|
||||
self.editionViewHeightConstraint.constant = 0;
|
||||
self.editionViewBottomConstraint.constant = 0;
|
||||
self.editionView.hidden = YES;
|
||||
|
||||
self.collectionView.scrollEnabled = YES;
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13196" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13173"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="20U-7H-xmi" customClass="TableViewCellWithCollectionView">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="180"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="181"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="20U-7H-xmi" id="cFw-g7-Cgn">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="179.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="180.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="iXt-1Y-bEu">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="114.5"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="115"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="10" minimumInteritemSpacing="10" id="zZI-Za-2q1">
|
||||
<size key="itemSize" width="50" height="50"/>
|
||||
@@ -29,7 +29,7 @@
|
||||
</collectionViewFlowLayout>
|
||||
</collectionView>
|
||||
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K7T-mO-6FZ">
|
||||
<rect key="frame" x="15" y="114.5" width="570" height="60"/>
|
||||
<rect key="frame" x="15" y="115.5" width="570" height="60"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="R8G-pa-NMv">
|
||||
<rect key="frame" x="160" y="0.0" width="50" height="60"/>
|
||||
@@ -137,6 +137,7 @@
|
||||
<outlet property="directChatButton" destination="R8G-pa-NMv" id="q3c-wK-rRU"/>
|
||||
<outlet property="directChatImageView" destination="zv7-4U-qzL" id="qnw-jg-llE"/>
|
||||
<outlet property="editionView" destination="K7T-mO-6FZ" id="Mjq-oL-nfX"/>
|
||||
<outlet property="editionViewBottomConstraint" destination="PQs-Ra-gvO" id="s7v-Zz-gv8"/>
|
||||
<outlet property="editionViewHeightConstraint" destination="9CM-a2-YHI" id="FqF-q8-RbP"/>
|
||||
<outlet property="favouriteButton" destination="MbR-Oe-6k1" id="9Jb-dQ-FIX"/>
|
||||
<outlet property="favouriteImageView" destination="f0O-Nh-XqH" id="Eof-Xy-czp"/>
|
||||
|
||||
Reference in New Issue
Block a user