Skip to content

Commit 978d418

Browse files
committed
Use ObjC for custom classes in storyboards
1 parent f3d6eba commit 978d418

File tree

6 files changed

+44
-38
lines changed

6 files changed

+44
-38
lines changed

Sources/Capabilities/Drawing/MediaEditorDrawing.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import UIKit
22

3+
@objc(WPMediaEditorDrawingViewController)
34
@available(iOS 13.0, *)
45
class MediaEditorDrawing: UIViewController {
56

Sources/Capabilities/Filters/MediaEditorFilters.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ struct MediaEditorFilter {
55
let ciFilterName: String
66
}
77

8+
@objc(WPMediaEditorFiltersViewController)
89
class MediaEditorFilters: UIViewController {
910
@IBOutlet weak var imageView: UIImageView!
1011
@IBOutlet weak var filtersCollectionView: UICollectionView!

Sources/MediaEditorHub.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import UIKit
22

3+
@objc(WPMediaEditorHubViewController)
34
public class MediaEditorHub: UIViewController {
45

56
@IBOutlet public weak var doneButton: UIButton!

Sources/Resources/MediaEditorDrawing.storyboard

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" 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="32700.99.1234" 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="15706"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
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>
1010
<scenes>
11-
<!--Media Editor Drawing-->
11+
<!--Media Editor Drawing View Controller-->
1212
<scene sceneID="c1B-7t-CTr">
1313
<objects>
14-
<viewController storyboardIdentifier="drawingViewController" id="uy1-xE-iLe" customClass="MediaEditorDrawing" customModule="MediaEditor" customModuleProvider="target" sceneMemberID="viewController">
14+
<viewController storyboardIdentifier="drawingViewController" id="uy1-xE-iLe" customClass="WPMediaEditorDrawingViewController" sceneMemberID="viewController">
1515
<view key="view" contentMode="scaleToFill" id="4Jy-bd-2Ao">
1616
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
1717
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1818
<subviews>
1919
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="AlG-Gr-6cY">
20-
<rect key="frame" x="0.0" y="44" width="414" height="818"/>
20+
<rect key="frame" x="0.0" y="48" width="414" height="814"/>
2121
<subviews>
2222
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="BwS-ar-kTV">
2323
<rect key="frame" x="0.0" y="0.0" width="414" height="44"/>
2424
<subviews>
25-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IFy-2Y-4OM">
25+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IFy-2Y-4OM">
2626
<rect key="frame" x="0.0" y="0.0" width="156" height="44"/>
2727
<constraints>
2828
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="53" id="FTj-uO-CKq"/>
@@ -71,7 +71,7 @@
7171
</button>
7272
</subviews>
7373
</stackView>
74-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="egE-uW-K1q">
74+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="egE-uW-K1q">
7575
<rect key="frame" x="361" y="0.0" width="53" height="44"/>
7676
<constraints>
7777
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="53" id="Bay-oh-sXZ"/>
@@ -90,10 +90,10 @@
9090
</constraints>
9191
</stackView>
9292
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K5w-Z1-QLC">
93-
<rect key="frame" x="0.0" y="54" width="414" height="764"/>
93+
<rect key="frame" x="0.0" y="54" width="414" height="760"/>
9494
<subviews>
9595
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KuD-cb-ysj" userLabel="Annotation View" customClass="MediaEditorAnnotationView" customModule="MediaEditor" customModuleProvider="target">
96-
<rect key="frame" x="10" y="0.0" width="394" height="764"/>
96+
<rect key="frame" x="10" y="0.0" width="394" height="760"/>
9797
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
9898
</view>
9999
</subviews>
@@ -108,14 +108,14 @@
108108
</subviews>
109109
</stackView>
110110
</subviews>
111+
<viewLayoutGuide key="safeArea" id="sGv-Ig-jBp"/>
111112
<color key="backgroundColor" white="0.12" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
112113
<constraints>
113114
<constraint firstItem="AlG-Gr-6cY" firstAttribute="top" secondItem="sGv-Ig-jBp" secondAttribute="top" id="LbP-L3-IdF"/>
114115
<constraint firstItem="sGv-Ig-jBp" firstAttribute="bottom" secondItem="AlG-Gr-6cY" secondAttribute="bottom" id="a35-7A-fOc"/>
115116
<constraint firstItem="sGv-Ig-jBp" firstAttribute="trailing" secondItem="AlG-Gr-6cY" secondAttribute="trailing" symbolic="YES" id="kjm-l6-Ik3"/>
116117
<constraint firstItem="AlG-Gr-6cY" firstAttribute="leading" secondItem="sGv-Ig-jBp" secondAttribute="leading" id="n9m-6v-EBP"/>
117118
</constraints>
118-
<viewLayoutGuide key="safeArea" id="sGv-Ig-jBp"/>
119119
</view>
120120
<connections>
121121
<outlet property="annotationView" destination="KuD-cb-ysj" id="c7S-PG-Eps"/>

Sources/Resources/MediaEditorFilters.storyboard

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" 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="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3+
<device id="retina6_12" orientation="portrait" appearance="light"/>
34
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
5+
<deployment identifier="iOS"/>
6+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
57
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
68
<capability name="collection view cell content view" minToolsVersion="11.0"/>
79
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
810
</dependencies>
911
<scenes>
10-
<!--Media Editor Filters-->
12+
<!--Media Editor Filters View Controller-->
1113
<scene sceneID="c1B-7t-CTr">
1214
<objects>
13-
<viewController storyboardIdentifier="filtersViewController" id="uy1-xE-iLe" customClass="MediaEditorFilters" customModule="MediaEditor" customModuleProvider="target" sceneMemberID="viewController">
15+
<viewController storyboardIdentifier="filtersViewController" id="uy1-xE-iLe" customClass="WPMediaEditorFiltersViewController" sceneMemberID="viewController">
1416
<view key="view" contentMode="scaleToFill" id="4Jy-bd-2Ao">
15-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
17+
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
1618
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1719
<subviews>
1820
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="AlG-Gr-6cY">
19-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
21+
<rect key="frame" x="0.0" y="59" width="393" height="759"/>
2022
<subviews>
2123
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="K5w-Z1-QLC">
22-
<rect key="frame" x="0.0" y="0.0" width="600" height="443"/>
24+
<rect key="frame" x="0.0" y="0.0" width="393" height="602"/>
2325
<subviews>
2426
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="xoj-Wy-HEs">
25-
<rect key="frame" x="10" y="0.0" width="580" height="443"/>
27+
<rect key="frame" x="10" y="0.0" width="373" height="602"/>
2628
</imageView>
2729
</subviews>
2830
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -34,7 +36,7 @@
3436
</constraints>
3537
</view>
3638
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="ssr-tN-2F7">
37-
<rect key="frame" x="0.0" y="453" width="600" height="93"/>
39+
<rect key="frame" x="0.0" y="612" width="393" height="93"/>
3840
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
3941
<constraints>
4042
<constraint firstAttribute="height" constant="93" id="FCk-xw-ORD"/>
@@ -87,10 +89,10 @@
8789
</cells>
8890
</collectionView>
8991
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="BwS-ar-kTV">
90-
<rect key="frame" x="0.0" y="556" width="600" height="44"/>
92+
<rect key="frame" x="0.0" y="715" width="393" height="44"/>
9193
<subviews>
92-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IFy-2Y-4OM">
93-
<rect key="frame" x="0.0" y="0.0" width="287" height="44"/>
94+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IFy-2Y-4OM">
95+
<rect key="frame" x="0.0" y="0.0" width="80" height="44"/>
9496
<constraints>
9597
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="53" id="FTj-uO-CKq"/>
9698
</constraints>
@@ -105,11 +107,11 @@
105107
</connections>
106108
</button>
107109
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LYk-87-uUE">
108-
<rect key="frame" x="297" y="0.0" width="240" height="44"/>
110+
<rect key="frame" x="90" y="0.0" width="240" height="44"/>
109111
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
110112
</view>
111-
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="egE-uW-K1q">
112-
<rect key="frame" x="547" y="0.0" width="53" height="44"/>
113+
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="egE-uW-K1q">
114+
<rect key="frame" x="340" y="0.0" width="53" height="44"/>
113115
<constraints>
114116
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="53" id="Bay-oh-sXZ"/>
115117
</constraints>
@@ -129,14 +131,14 @@
129131
</subviews>
130132
</stackView>
131133
</subviews>
134+
<viewLayoutGuide key="safeArea" id="sGv-Ig-jBp"/>
132135
<color key="backgroundColor" white="0.12" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
133136
<constraints>
134137
<constraint firstItem="AlG-Gr-6cY" firstAttribute="top" secondItem="sGv-Ig-jBp" secondAttribute="top" id="LbP-L3-IdF"/>
135138
<constraint firstItem="sGv-Ig-jBp" firstAttribute="bottom" secondItem="AlG-Gr-6cY" secondAttribute="bottom" id="a35-7A-fOc"/>
136139
<constraint firstItem="sGv-Ig-jBp" firstAttribute="trailing" secondItem="AlG-Gr-6cY" secondAttribute="trailing" symbolic="YES" id="kjm-l6-Ik3"/>
137140
<constraint firstItem="AlG-Gr-6cY" firstAttribute="leading" secondItem="sGv-Ig-jBp" secondAttribute="leading" id="n9m-6v-EBP"/>
138141
</constraints>
139-
<viewLayoutGuide key="safeArea" id="sGv-Ig-jBp"/>
140142
</view>
141143
<connections>
142144
<outlet property="cancelButton" destination="IFy-2Y-4OM" id="ga6-Vo-1tv"/>

0 commit comments

Comments
 (0)