Add error message to Lightshow file
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22684"/>
|
||||
<capability name="Image references" minToolsVersion="12.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
@@ -165,36 +164,46 @@
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
<prototypes>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="lightshowDownloadCell" textLabel="H3C-bR-A2x" imageView="gH8-qm-w7I" style="IBUITableViewCellStyleDefault" id="gAI-tD-NqL" customClass="LightshowDownloadCell" customModule="LightshowManager" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="50" width="393" height="43.666667938232422"/>
|
||||
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="lightshowDownloadCell" rowHeight="44" id="gAI-tD-NqL" customClass="LightshowDownloadCell" customModule="LightshowManager" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="50" width="393" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="gAI-tD-NqL" id="yMs-se-7eG">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="43.666667938232422"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" insetsLayoutMarginsFromSafeArea="NO" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="H3C-bR-A2x">
|
||||
<rect key="frame" x="59" y="0.0" width="314" height="43.666667938232422"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="0.0"/>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="snz-8m-oZI">
|
||||
<rect key="frame" x="49" y="6" width="42" height="32.666666666666664"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="gH8-qm-w7I">
|
||||
<rect key="frame" x="21.5" y="12.666666666666664" width="21" height="18"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="exclamationmark.triangle.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="3Rz-VE-mxs">
|
||||
<rect key="frame" x="20" y="6.3333333333333339" width="21" height="30.333333333333321"/>
|
||||
<color key="tintColor" systemColor="systemYellowColor"/>
|
||||
<imageReference key="image" image="exclamationmark.triangle.fill" catalog="system" variableValue="1"/>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bGc-sL-2bv">
|
||||
<rect key="frame" x="349.33333333333331" y="16" width="23.666666666666686" height="11"/>
|
||||
<fontDescription key="fontDescription" type="italicSystem" pointSize="9"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<variation key="default">
|
||||
<mask key="subviews">
|
||||
<exclude reference="gH8-qm-w7I"/>
|
||||
</mask>
|
||||
</variation>
|
||||
<constraints>
|
||||
<constraint firstItem="snz-8m-oZI" firstAttribute="top" secondItem="yMs-se-7eG" secondAttribute="top" constant="6" id="0z4-Fm-N31"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bGc-sL-2bv" secondAttribute="trailing" constant="20" symbolic="YES" id="9K0-Uq-MPH"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bGc-sL-2bv" secondAttribute="bottom" constant="17" id="MiY-ve-zS1"/>
|
||||
<constraint firstItem="3Rz-VE-mxs" firstAttribute="top" secondItem="yMs-se-7eG" secondAttribute="top" constant="5" id="Ojo-R2-uwJ"/>
|
||||
<constraint firstItem="bGc-sL-2bv" firstAttribute="top" secondItem="yMs-se-7eG" secondAttribute="top" constant="16" id="TJL-cg-BZv"/>
|
||||
<constraint firstAttribute="bottom" secondItem="3Rz-VE-mxs" secondAttribute="bottom" constant="6.3300000000000001" id="h6a-JZ-tQh"/>
|
||||
<constraint firstItem="3Rz-VE-mxs" firstAttribute="leading" secondItem="yMs-se-7eG" secondAttribute="leading" constant="20" symbolic="YES" id="j8v-Zo-xWf"/>
|
||||
<constraint firstItem="snz-8m-oZI" firstAttribute="leading" secondItem="3Rz-VE-mxs" secondAttribute="trailing" constant="8" symbolic="YES" id="ljZ-WN-dWz"/>
|
||||
<constraint firstAttribute="bottom" secondItem="snz-8m-oZI" secondAttribute="bottom" constant="5.3300000000000001" id="oa0-S6-7Ua"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="LightshowName" destination="H3C-bR-A2x" id="N9T-1R-pFl"/>
|
||||
<outlet property="warningMessage" destination="gH8-qm-w7I" id="YmX-H0-LQg"/>
|
||||
<outlet property="LightshowName" destination="snz-8m-oZI" id="u2g-4g-RDg"/>
|
||||
<outlet property="alertLabel" destination="bGc-sL-2bv" id="qd4-wj-Vdb"/>
|
||||
<outlet property="warningMessage" destination="3Rz-VE-mxs" id="cfR-gD-tbB"/>
|
||||
</connections>
|
||||
</tableViewCell>
|
||||
</prototypes>
|
||||
@@ -207,7 +216,7 @@
|
||||
</tableViewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="j6Q-2x-cYK" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="2763" y="125"/>
|
||||
<point key="canvasLocation" x="2762.5954198473282" y="124.64788732394366"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="M0L-Wa-ERm">
|
||||
|
||||
@@ -11,4 +11,6 @@ class LightshowDownloadCell : UITableViewCell{
|
||||
|
||||
@IBOutlet weak var warningMessage: UIImageView!
|
||||
@IBOutlet weak var LightshowName: UILabel!
|
||||
|
||||
@IBOutlet weak var alertLabel: UILabel!
|
||||
}
|
||||
|
||||
@@ -26,8 +26,16 @@ class LightshowDownloadView: UITableViewController{
|
||||
// Fetch a cell of the appropriate type.
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: "lightshowDownloadCell")
|
||||
let model = model?.getStudentAtIndex(indexPath.row);
|
||||
|
||||
let isOk : Bool = model?.isOkFiles() ?? false;
|
||||
|
||||
(cell as! LightshowDownloadCell).LightshowName.text = model?.name
|
||||
(cell as! LightshowDownloadCell).warningMessage.isHidden = model?.isOkFiles() ?? false;
|
||||
(cell as! LightshowDownloadCell).warningMessage.isHidden = isOk;
|
||||
var alertText = ""
|
||||
if (!isOk){
|
||||
alertText = "(Le fichcier mp3 ou fseq n'a pas été reconnu)"
|
||||
}
|
||||
(cell as! LightshowDownloadCell).alertLabel.text = alertText
|
||||
return cell!
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user