Skip to content

Commit 57191da

Browse files
authored
Update UIKit based disclosure indicators (#3227)
refs: MBL-18325 affects: Student, Teacher, Parent release note: none test plan: - UIKit based disclosure indicators should use textDark tint color.
1 parent c2c942c commit 57191da

20 files changed

+82
-66
lines changed

Core/Core/Common/Extensions/UIKit/UITableViewCellExtensions.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,11 @@ public extension UITableViewCell {
3838
self.contentView.alpha = isAvailable ? 1 : 0.3
3939
self.isUserInteractionEnabled = isUserInteractionEnabled
4040
}
41+
42+
func setupInstDisclosureIndicator() {
43+
let image = UIImageView(image: UIImage.arrowOpenRightLine)
44+
image.frame = CGRect(x: 0, y: 0, width: 16, height: 16)
45+
image.tintColor = .textDark
46+
accessoryView = image
47+
}
4148
}

Core/Core/Features/Conferences/ConferenceListViewController.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ class ConferenceListCell: UITableViewCell {
158158
@IBOutlet weak var statusLabel: UILabel!
159159
@IBOutlet weak var titleLabel: UILabel!
160160

161+
override func awakeFromNib() {
162+
super.awakeFromNib()
163+
setupInstDisclosureIndicator()
164+
}
165+
161166
func update(_ conference: Conference?, color: UIColor?) {
162167
backgroundColor = .backgroundLightest
163168
iconView.icon = .conferences

Core/Core/Features/Discussions/AnnouncementListViewController.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ class AnnouncementListCell: UITableViewCell {
200200
@IBOutlet weak var iconImageView: AccessIconView!
201201
@IBOutlet weak var titleLabel: UILabel!
202202

203+
override func awakeFromNib() {
204+
super.awakeFromNib()
205+
setupInstDisclosureIndicator()
206+
}
207+
203208
func update(topic: DiscussionTopic?, isTeacher: Bool, color: UIColor?) {
204209
iconImageView.icon = .announcementLine
205210
if isTeacher {

Core/Core/Features/Discussions/DiscussionListViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ class DiscussionListCell: UITableViewCell {
299299
pointsDot.setText(pointsDot.text, style: .textCellBottomLabel)
300300
repliesDot.setText(repliesDot.text, style: .textCellBottomLabel)
301301
statusDot.setText(statusDot.text, style: .textCellBottomLabel)
302+
setupInstDisclosureIndicator()
302303
}
303304

304305
func update(topic: DiscussionTopic?, isTeacher: Bool, color: UIColor?) {
@@ -353,6 +354,5 @@ class DiscussionListCell: UITableViewCell {
353354
unreadDot.isHidden = false
354355
dateLabel.isHidden = false
355356
isUserInteractionEnabled = true
356-
accessoryType = .disclosureIndicator
357357
}
358358
}

Core/Core/Features/ErrorReports/ErrorReportViewController.storyboard

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
33
<device id="retina4_7" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
77
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
88
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
99
</dependencies>
@@ -13,11 +13,11 @@
1313
<objects>
1414
<viewController storyboardIdentifier="ErrorReportViewController" title="Report a Problem" modalPresentationStyle="formSheet" useStoryboardIdentifierAsRestorationIdentifier="YES" id="PvC-F6-8XD" customClass="ErrorReportViewController" customModule="Core" customModuleProvider="target" sceneMemberID="viewController">
1515
<view key="view" contentMode="scaleToFill" id="07N-bz-ibZ">
16-
<rect key="frame" x="0.0" y="0.0" width="375" height="623"/>
16+
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
1717
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1818
<subviews>
1919
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D7T-zY-mIK">
20-
<rect key="frame" x="0.0" y="0.0" width="375" height="623"/>
20+
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
2121
<subviews>
2222
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="E5e-lJ-7Bu">
2323
<rect key="frame" x="0.0" y="0.0" width="375" height="215"/>
@@ -151,10 +151,10 @@
151151
</constraints>
152152
<userDefinedRuntimeAttributes>
153153
<userDefinedRuntimeAttribute type="string" keyPath="iconColorName" value="textDark"/>
154-
<userDefinedRuntimeAttribute type="string" keyPath="iconName" value="arrowOpenRightSolid"/>
154+
<userDefinedRuntimeAttribute type="string" keyPath="iconName" value="arrowOpenRightLine"/>
155155
</userDefinedRuntimeAttributes>
156156
</imageView>
157-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sJ2-KZ-oWP" customClass="DynamicButton" customModule="Core" customModuleProvider="target">
157+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="trailing" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="sJ2-KZ-oWP" customClass="DynamicButton" customModule="Core" customModuleProvider="target">
158158
<rect key="frame" x="0.0" y="0.0" width="375" height="54"/>
159159
<inset key="contentEdgeInsets" minX="72" minY="0.0" maxX="36" maxY="0.0"/>
160160
<state key="normal" title="Select One"/>
@@ -195,7 +195,7 @@
195195
<rect key="frame" x="0.0" y="165" width="375" height="50"/>
196196
<subviews>
197197
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Describe the problem" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SsP-Ma-rdc" customClass="DynamicLabel" customModule="Core" customModuleProvider="target">
198-
<rect key="frame" x="16" y="12" width="156.5" height="19.5"/>
198+
<rect key="frame" x="16" y="12" width="164.5" height="20.5"/>
199199
<accessibility key="accessibilityConfiguration">
200200
<bool key="isElement" value="NO"/>
201201
</accessibility>
@@ -249,6 +249,7 @@
249249
</constraints>
250250
</scrollView>
251251
</subviews>
252+
<viewLayoutGuide key="safeArea" id="4eN-vB-wr0"/>
252253
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
253254
<constraints>
254255
<constraint firstItem="D7T-zY-mIK" firstAttribute="leading" secondItem="4eN-vB-wr0" secondAttribute="leading" id="Hh8-aM-dPu"/>
@@ -258,7 +259,6 @@
258259
<constraint firstItem="E5e-lJ-7Bu" firstAttribute="trailing" secondItem="4eN-vB-wr0" secondAttribute="trailing" id="tnX-bA-QyM"/>
259260
<constraint firstItem="4eN-vB-wr0" firstAttribute="trailing" secondItem="D7T-zY-mIK" secondAttribute="trailing" id="yXe-2K-9Vb"/>
260261
</constraints>
261-
<viewLayoutGuide key="safeArea" id="4eN-vB-wr0"/>
262262
</view>
263263
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" translucent="NO" prompted="NO"/>
264264
<nil key="simulatedBottomBarMetrics"/>

Core/Core/Features/Files/View/FileList/FileListViewController.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,11 @@ class FileListCell: UITableViewCell {
513513

514514
private var fileID: String?
515515

516+
override func awakeFromNib() {
517+
super.awakeFromNib()
518+
setupInstDisclosureIndicator()
519+
}
520+
516521
func update(item: FolderItem?, color: UIColor?, isOffline: Bool, isAvailable: Bool) {
517522
fileID = item?.id
518523
if isOffline {

Core/Core/Features/Modules/MasteryPaths/MasteryPathAssignmentCell.xib

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<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">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
33
<device id="retina6_1" orientation="portrait" appearance="light"/>
44
<dependencies>
55
<deployment identifier="iOS"/>
6-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16086"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
77
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
88
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
99
</dependencies>
@@ -35,7 +35,7 @@
3535
<rect key="frame" x="40" y="0.0" width="321" height="52"/>
3636
<subviews>
3737
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mJm-Y4-6rx" customClass="DynamicLabel" customModule="Core" customModuleProvider="target">
38-
<rect key="frame" x="0.0" y="0.0" width="321" height="35"/>
38+
<rect key="frame" x="0.0" y="0.0" width="321" height="31.5"/>
3939
<fontDescription key="fontDescription" type="system" pointSize="17"/>
4040
<nil key="textColor"/>
4141
<nil key="highlightedColor"/>
@@ -45,7 +45,7 @@
4545
</userDefinedRuntimeAttributes>
4646
</label>
4747
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tDm-eb-rI0" customClass="DynamicLabel" customModule="Core" customModuleProvider="target">
48-
<rect key="frame" x="0.0" y="35" width="321" height="17"/>
48+
<rect key="frame" x="0.0" y="31.5" width="321" height="20.5"/>
4949
<fontDescription key="fontDescription" type="system" pointSize="17"/>
5050
<nil key="textColor"/>
5151
<nil key="highlightedColor"/>
@@ -62,22 +62,22 @@
6262
<constraint firstAttribute="width" constant="16" id="CUK-3X-jAs"/>
6363
</constraints>
6464
<userDefinedRuntimeAttributes>
65-
<userDefinedRuntimeAttribute type="string" keyPath="iconName" value="arrowOpenRightSolid"/>
66-
<userDefinedRuntimeAttribute type="string" keyPath="iconColorName" value="borderMedium"/>
65+
<userDefinedRuntimeAttribute type="string" keyPath="iconName" value="arrowOpenRightLine"/>
66+
<userDefinedRuntimeAttribute type="string" keyPath="iconColorName" value="textDark"/>
6767
</userDefinedRuntimeAttributes>
6868
</imageView>
6969
</subviews>
7070
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
7171
</stackView>
7272
</subviews>
73+
<viewLayoutGuide key="safeArea" id="Fug-F3-Sai"/>
7374
<constraints>
7475
<constraint firstItem="Fug-F3-Sai" firstAttribute="trailing" secondItem="tW6-CX-oKy" secondAttribute="trailing" constant="16" id="8eJ-ho-Moo"/>
7576
<constraint firstItem="tW6-CX-oKy" firstAttribute="top" secondItem="Fpb-xb-lBG" secondAttribute="top" constant="16" id="Zis-9x-Hcg"/>
7677
<constraint firstItem="tW6-CX-oKy" firstAttribute="leading" secondItem="Fug-F3-Sai" secondAttribute="leading" constant="16" id="dWm-Kx-Wya"/>
7778
<constraint firstAttribute="bottom" secondItem="tW6-CX-oKy" secondAttribute="bottom" constant="16" id="s6n-a6-Pbp"/>
7879
</constraints>
7980
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
80-
<viewLayoutGuide key="safeArea" id="Fug-F3-Sai"/>
8181
<point key="canvasLocation" x="-433" y="-111"/>
8282
</view>
8383
</objects>

0 commit comments

Comments
 (0)