mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-02 14:16:59 +02:00
Change group name
This commit is contained in:
+64
@@ -0,0 +1,64 @@
|
||||
//
|
||||
// Copyright 2020 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Reusable
|
||||
|
||||
struct DirectoryNetworkVM {
|
||||
var title: String?
|
||||
}
|
||||
|
||||
@objc protocol DirectoryNetworkTableHeaderFooterViewDelegate: NSObjectProtocol {
|
||||
func directoryNetworkTableHeaderFooterViewDidTapSwitch(_ view: DirectoryNetworkTableHeaderFooterView)
|
||||
}
|
||||
|
||||
class DirectoryNetworkTableHeaderFooterView: UITableViewHeaderFooterView {
|
||||
|
||||
@IBOutlet private weak var titleLabel: UILabel!
|
||||
@IBOutlet private weak var switchButton: UIButton! {
|
||||
didSet {
|
||||
switchButton.setTitle(VectorL10n.switch, for: .normal)
|
||||
}
|
||||
}
|
||||
@IBOutlet private weak var separatorView: UIView!
|
||||
|
||||
weak var delegate: DirectoryNetworkTableHeaderFooterViewDelegate?
|
||||
|
||||
func configure(withViewModel viewModel: DirectoryNetworkVM) {
|
||||
titleLabel.text = viewModel.title
|
||||
}
|
||||
|
||||
@IBAction private func switchButtonTapped(_ sender: UIButton) {
|
||||
delegate?.directoryNetworkTableHeaderFooterViewDidTapSwitch(self)
|
||||
}
|
||||
}
|
||||
|
||||
extension DirectoryNetworkTableHeaderFooterView: NibReusable {}
|
||||
|
||||
extension DirectoryNetworkTableHeaderFooterView: Themable {
|
||||
|
||||
func update(theme: Theme) {
|
||||
// bg
|
||||
let view = UIView()
|
||||
view.backgroundColor = theme.backgroundColor
|
||||
backgroundView = view
|
||||
|
||||
titleLabel.textColor = theme.textSecondaryColor
|
||||
theme.applyStyle(onButton: switchButton)
|
||||
separatorView.backgroundColor = theme.lineBreakColor
|
||||
}
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina6_1" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<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"/>
|
||||
<view contentMode="scaleToFill" id="IKv-Eo-Uhr" customClass="DirectoryNetworkTableHeaderFooterView" customModule="Riot" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="399" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DFi-MN-E9H">
|
||||
<rect key="frame" x="0.0" y="9" width="399" height="30"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="w20-KY-Toq">
|
||||
<rect key="frame" x="16" y="5" width="42" height="20.5"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZMw-in-qvp">
|
||||
<rect key="frame" x="334" y="0.0" width="49" height="30"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="15"/>
|
||||
<state key="normal" title="Switch"/>
|
||||
<connections>
|
||||
<action selector="switchButtonTapped:" destination="IKv-Eo-Uhr" eventType="touchUpInside" id="QDw-YB-3Uj"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="30" id="CBk-T8-H3L"/>
|
||||
<constraint firstItem="w20-KY-Toq" firstAttribute="leading" secondItem="DFi-MN-E9H" secondAttribute="leading" constant="16" id="D88-nj-LLg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ZMw-in-qvp" secondAttribute="trailing" constant="16" id="DfS-xd-Rtc"/>
|
||||
<constraint firstItem="ZMw-in-qvp" firstAttribute="centerY" secondItem="DFi-MN-E9H" secondAttribute="centerY" id="euM-Vt-Qp0"/>
|
||||
<constraint firstItem="w20-KY-Toq" firstAttribute="centerY" secondItem="DFi-MN-E9H" secondAttribute="centerY" id="n2J-hq-wkG"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eQG-M1-gau">
|
||||
<rect key="frame" x="16" y="39" width="383" height="1"/>
|
||||
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="eV0-cd-aDv"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="DFi-MN-E9H" secondAttribute="bottom" constant="1" id="Bbk-Uz-sn1"/>
|
||||
<constraint firstItem="Tnw-0a-us5" firstAttribute="trailing" secondItem="DFi-MN-E9H" secondAttribute="trailing" id="g30-VP-4hM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eQG-M1-gau" secondAttribute="trailing" id="jiW-vO-gZ0"/>
|
||||
<constraint firstAttribute="bottom" secondItem="eQG-M1-gau" secondAttribute="bottom" id="s0Q-A7-LJG"/>
|
||||
<constraint firstItem="DFi-MN-E9H" firstAttribute="leading" secondItem="Tnw-0a-us5" secondAttribute="leading" id="swz-j4-zcd"/>
|
||||
<constraint firstItem="eQG-M1-gau" firstAttribute="leading" secondItem="IKv-Eo-Uhr" secondAttribute="leading" constant="16" id="utf-t0-1An"/>
|
||||
</constraints>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<viewLayoutGuide key="safeArea" id="Tnw-0a-us5"/>
|
||||
<connections>
|
||||
<outlet property="separatorView" destination="eQG-M1-gau" id="hLt-rM-Lsc"/>
|
||||
<outlet property="switchButton" destination="ZMw-in-qvp" id="Tdr-44-Akl"/>
|
||||
<outlet property="titleLabel" destination="w20-KY-Toq" id="AgV-tj-DYl"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-676.08695652173924" y="-641.85267857142856"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
Reference in New Issue
Block a user