Skip to content

Commit 493c5f5

Browse files
committed
BUG FIX: App freezes on iOS 9.3.2 when displaying an entry and there is one shown already #73
1 parent ed815c7 commit 493c5f5

File tree

3 files changed

+52
-39
lines changed

3 files changed

+52
-39
lines changed

Example/SwiftEntryKit.xcodeproj/project.pbxproj

+38-38
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@
104104
14E24A1D208B600E00F32B13 /* UIColor+Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14E24A1C208B600E00F32B13 /* UIColor+Utils.swift */; };
105105
14F36800208B585E001E8F56 /* PresetsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14F367FE208B585E001E8F56 /* PresetsViewController.swift */; };
106106
14F36801208B585E001E8F56 /* PresetTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 14F367FF208B585E001E8F56 /* PresetTableViewCell.swift */; };
107-
5F8A25E9DC59C87C2906C539 /* Pods_SwiftEntryKitDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE82BF42DEC3DD15BB4BEEB7 /* Pods_SwiftEntryKitDemo.framework */; };
108107
607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; };
109108
607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; };
110109
607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; };
111110
607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; };
112-
7200A43EF7178C74A30DC703 /* Pods_SwiftEntryKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63065E8CC3A1681436C5789B /* Pods_SwiftEntryKitTests.framework */; };
111+
6CFABFE3499EBAAAD42732FA /* Pods_SwiftEntryKitTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B89D5725A6405A2223062556 /* Pods_SwiftEntryKitTests.framework */; };
112+
A7EA332E60AA3DD27AC507D6 /* Pods_SwiftEntryKitDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2235372EA387E104A274207F /* Pods_SwiftEntryKitDemo.framework */; };
113113
/* End PBXBuildFile section */
114114

115115
/* Begin PBXContainerItemProxy section */
@@ -295,20 +295,20 @@
295295
14E24A1C208B600E00F32B13 /* UIColor+Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Utils.swift"; sourceTree = "<group>"; };
296296
14F367FE208B585E001E8F56 /* PresetsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresetsViewController.swift; sourceTree = "<group>"; };
297297
14F367FF208B585E001E8F56 /* PresetTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PresetTableViewCell.swift; sourceTree = "<group>"; };
298-
1EB8CBED8ED378A414FE137F /* Pods-SwiftEntryKitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests.release.xcconfig"; sourceTree = "<group>"; };
298+
2029C59B0572812CFEEAE4CC /* Pods-SwiftEntryKitDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.debug.xcconfig"; sourceTree = "<group>"; };
299+
2235372EA387E104A274207F /* Pods_SwiftEntryKitDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftEntryKitDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
299300
2A856CAE48665E23BC76CB3B /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
300-
56C71E84AD11CF2BB1C99A9E /* Pods-SwiftEntryKitDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.release.xcconfig"; sourceTree = "<group>"; };
301+
3B919BB891746AFF6E49D096 /* Pods-SwiftEntryKitDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.release.xcconfig"; sourceTree = "<group>"; };
302+
456D84D3030D3975EEEC7106 /* Pods-SwiftEntryKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests.debug.xcconfig"; sourceTree = "<group>"; };
301303
607FACD01AFB9204008FA782 /* SwiftEntryKitDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftEntryKitDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
302304
607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
303305
607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
304306
607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
305307
607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
306308
607FACE51AFB9204008FA782 /* SwiftEntryKitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftEntryKitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
307309
607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
308-
63065E8CC3A1681436C5789B /* Pods_SwiftEntryKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftEntryKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
309-
7B51F3AF8F115AA10A0B2BFF /* Pods-SwiftEntryKitDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo.debug.xcconfig"; sourceTree = "<group>"; };
310-
B9E018112C8110FE8295D138 /* Pods-SwiftEntryKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests.debug.xcconfig"; sourceTree = "<group>"; };
311-
CE82BF42DEC3DD15BB4BEEB7 /* Pods_SwiftEntryKitDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftEntryKitDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
310+
B1DF02D72E610C7F46A99DBD /* Pods-SwiftEntryKitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftEntryKitTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests.release.xcconfig"; sourceTree = "<group>"; };
311+
B89D5725A6405A2223062556 /* Pods_SwiftEntryKitTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftEntryKitTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
312312
EFEC60E1244126F18ABBB375 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
313313
F1F450C1E75BEC09B67F526C /* SwiftEntryKit.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = SwiftEntryKit.podspec; path = ../SwiftEntryKit.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
314314
/* End PBXFileReference section */
@@ -327,21 +327,32 @@
327327
buildActionMask = 2147483647;
328328
files = (
329329
143C6A2520B54E4A00F7DD89 /* SwiftEntryKit.framework in Frameworks */,
330-
5F8A25E9DC59C87C2906C539 /* Pods_SwiftEntryKitDemo.framework in Frameworks */,
330+
A7EA332E60AA3DD27AC507D6 /* Pods_SwiftEntryKitDemo.framework in Frameworks */,
331331
);
332332
runOnlyForDeploymentPostprocessing = 0;
333333
};
334334
607FACE21AFB9204008FA782 /* Frameworks */ = {
335335
isa = PBXFrameworksBuildPhase;
336336
buildActionMask = 2147483647;
337337
files = (
338-
7200A43EF7178C74A30DC703 /* Pods_SwiftEntryKitTests.framework in Frameworks */,
338+
6CFABFE3499EBAAAD42732FA /* Pods_SwiftEntryKitTests.framework in Frameworks */,
339339
);
340340
runOnlyForDeploymentPostprocessing = 0;
341341
};
342342
/* End PBXFrameworksBuildPhase section */
343343

344344
/* Begin PBXGroup section */
345+
022595CBB3CB59FC33E263AF /* Pods */ = {
346+
isa = PBXGroup;
347+
children = (
348+
2029C59B0572812CFEEAE4CC /* Pods-SwiftEntryKitDemo.debug.xcconfig */,
349+
3B919BB891746AFF6E49D096 /* Pods-SwiftEntryKitDemo.release.xcconfig */,
350+
456D84D3030D3975EEEC7106 /* Pods-SwiftEntryKitTests.debug.xcconfig */,
351+
B1DF02D72E610C7F46A99DBD /* Pods-SwiftEntryKitTests.release.xcconfig */,
352+
);
353+
name = Pods;
354+
sourceTree = "<group>";
355+
};
345356
1430767820B5E3C00069BA1B /* Products */ = {
346357
isa = PBXGroup;
347358
children = (
@@ -590,17 +601,6 @@
590601
path = NibExampleView;
591602
sourceTree = "<group>";
592603
};
593-
1A857AB3954BD9C79FDE9658 /* Pods */ = {
594-
isa = PBXGroup;
595-
children = (
596-
7B51F3AF8F115AA10A0B2BFF /* Pods-SwiftEntryKitDemo.debug.xcconfig */,
597-
56C71E84AD11CF2BB1C99A9E /* Pods-SwiftEntryKitDemo.release.xcconfig */,
598-
B9E018112C8110FE8295D138 /* Pods-SwiftEntryKitTests.debug.xcconfig */,
599-
1EB8CBED8ED378A414FE137F /* Pods-SwiftEntryKitTests.release.xcconfig */,
600-
);
601-
name = Pods;
602-
sourceTree = "<group>";
603-
};
604604
607FACC71AFB9204008FA782 = {
605605
isa = PBXGroup;
606606
children = (
@@ -612,7 +612,7 @@
612612
143C6A1F20B54E4A00F7DD89 /* SwiftEntryKit */,
613613
607FACD11AFB9204008FA782 /* Products */,
614614
89834CCE498EB0030FCF4F08 /* Frameworks */,
615-
1A857AB3954BD9C79FDE9658 /* Pods */,
615+
022595CBB3CB59FC33E263AF /* Pods */,
616616
);
617617
sourceTree = "<group>";
618618
};
@@ -684,8 +684,8 @@
684684
children = (
685685
1430769C20B5E5970069BA1B /* QuickLayout.framework */,
686686
14B0B95020B7E4FE00D24D8A /* QuickLayout.framework */,
687-
CE82BF42DEC3DD15BB4BEEB7 /* Pods_SwiftEntryKitDemo.framework */,
688-
63065E8CC3A1681436C5789B /* Pods_SwiftEntryKitTests.framework */,
687+
2235372EA387E104A274207F /* Pods_SwiftEntryKitDemo.framework */,
688+
B89D5725A6405A2223062556 /* Pods_SwiftEntryKitTests.framework */,
689689
);
690690
name = Frameworks;
691691
sourceTree = "<group>";
@@ -726,12 +726,12 @@
726726
isa = PBXNativeTarget;
727727
buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftEntryKitDemo" */;
728728
buildPhases = (
729-
84C717364AC21B8582D47F6C /* [CP] Check Pods Manifest.lock */,
729+
AA91DAFE12D185EB2575D2A6 /* [CP] Check Pods Manifest.lock */,
730730
607FACCC1AFB9204008FA782 /* Sources */,
731731
607FACCD1AFB9204008FA782 /* Frameworks */,
732732
607FACCE1AFB9204008FA782 /* Resources */,
733733
143C6A2A20B54E4A00F7DD89 /* Embed Frameworks */,
734-
23976C4871B88C5DD76DF6F8 /* [CP] Embed Pods Frameworks */,
734+
3C99819289B0C81B0EBCD893 /* [CP] Embed Pods Frameworks */,
735735
);
736736
buildRules = (
737737
);
@@ -747,11 +747,11 @@
747747
isa = PBXNativeTarget;
748748
buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "SwiftEntryKitTests" */;
749749
buildPhases = (
750-
788BA94117D31CE69492C0DD /* [CP] Check Pods Manifest.lock */,
750+
E5A307617B376F5CD7107A37 /* [CP] Check Pods Manifest.lock */,
751751
607FACE11AFB9204008FA782 /* Sources */,
752752
607FACE21AFB9204008FA782 /* Frameworks */,
753753
607FACE31AFB9204008FA782 /* Resources */,
754-
34D98EE602FCD615ED8CC76C /* [CP] Embed Pods Frameworks */,
754+
89AF64504C4D45F0958E0C00 /* [CP] Embed Pods Frameworks */,
755755
);
756756
buildRules = (
757757
);
@@ -898,7 +898,7 @@
898898
/* End PBXResourcesBuildPhase section */
899899

900900
/* Begin PBXShellScriptBuildPhase section */
901-
23976C4871B88C5DD76DF6F8 /* [CP] Embed Pods Frameworks */ = {
901+
3C99819289B0C81B0EBCD893 /* [CP] Embed Pods Frameworks */ = {
902902
isa = PBXShellScriptBuildPhase;
903903
buildActionMask = 2147483647;
904904
files = (
@@ -918,7 +918,7 @@
918918
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftEntryKitDemo/Pods-SwiftEntryKitDemo-frameworks.sh\"\n";
919919
showEnvVarsInLog = 0;
920920
};
921-
34D98EE602FCD615ED8CC76C /* [CP] Embed Pods Frameworks */ = {
921+
89AF64504C4D45F0958E0C00 /* [CP] Embed Pods Frameworks */ = {
922922
isa = PBXShellScriptBuildPhase;
923923
buildActionMask = 2147483647;
924924
files = (
@@ -942,7 +942,7 @@
942942
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftEntryKitTests/Pods-SwiftEntryKitTests-frameworks.sh\"\n";
943943
showEnvVarsInLog = 0;
944944
};
945-
788BA94117D31CE69492C0DD /* [CP] Check Pods Manifest.lock */ = {
945+
AA91DAFE12D185EB2575D2A6 /* [CP] Check Pods Manifest.lock */ = {
946946
isa = PBXShellScriptBuildPhase;
947947
buildActionMask = 2147483647;
948948
files = (
@@ -953,14 +953,14 @@
953953
);
954954
name = "[CP] Check Pods Manifest.lock";
955955
outputPaths = (
956-
"$(DERIVED_FILE_DIR)/Pods-SwiftEntryKitTests-checkManifestLockResult.txt",
956+
"$(DERIVED_FILE_DIR)/Pods-SwiftEntryKitDemo-checkManifestLockResult.txt",
957957
);
958958
runOnlyForDeploymentPostprocessing = 0;
959959
shellPath = /bin/sh;
960960
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
961961
showEnvVarsInLog = 0;
962962
};
963-
84C717364AC21B8582D47F6C /* [CP] Check Pods Manifest.lock */ = {
963+
E5A307617B376F5CD7107A37 /* [CP] Check Pods Manifest.lock */ = {
964964
isa = PBXShellScriptBuildPhase;
965965
buildActionMask = 2147483647;
966966
files = (
@@ -971,7 +971,7 @@
971971
);
972972
name = "[CP] Check Pods Manifest.lock";
973973
outputPaths = (
974-
"$(DERIVED_FILE_DIR)/Pods-SwiftEntryKitDemo-checkManifestLockResult.txt",
974+
"$(DERIVED_FILE_DIR)/Pods-SwiftEntryKitTests-checkManifestLockResult.txt",
975975
);
976976
runOnlyForDeploymentPostprocessing = 0;
977977
shellPath = /bin/sh;
@@ -1305,7 +1305,7 @@
13051305
};
13061306
607FACF01AFB9204008FA782 /* Debug */ = {
13071307
isa = XCBuildConfiguration;
1308-
baseConfigurationReference = 7B51F3AF8F115AA10A0B2BFF /* Pods-SwiftEntryKitDemo.debug.xcconfig */;
1308+
baseConfigurationReference = 2029C59B0572812CFEEAE4CC /* Pods-SwiftEntryKitDemo.debug.xcconfig */;
13091309
buildSettings = {
13101310
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
13111311
CODE_SIGN_IDENTITY = "iPhone Developer";
@@ -1327,7 +1327,7 @@
13271327
};
13281328
607FACF11AFB9204008FA782 /* Release */ = {
13291329
isa = XCBuildConfiguration;
1330-
baseConfigurationReference = 56C71E84AD11CF2BB1C99A9E /* Pods-SwiftEntryKitDemo.release.xcconfig */;
1330+
baseConfigurationReference = 3B919BB891746AFF6E49D096 /* Pods-SwiftEntryKitDemo.release.xcconfig */;
13311331
buildSettings = {
13321332
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
13331333
CODE_SIGN_IDENTITY = "iPhone Developer";
@@ -1349,7 +1349,7 @@
13491349
};
13501350
607FACF31AFB9204008FA782 /* Debug */ = {
13511351
isa = XCBuildConfiguration;
1352-
baseConfigurationReference = B9E018112C8110FE8295D138 /* Pods-SwiftEntryKitTests.debug.xcconfig */;
1352+
baseConfigurationReference = 456D84D3030D3975EEEC7106 /* Pods-SwiftEntryKitTests.debug.xcconfig */;
13531353
buildSettings = {
13541354
CODE_SIGN_IDENTITY = "iPhone Developer";
13551355
CODE_SIGN_STYLE = Automatic;
@@ -1378,7 +1378,7 @@
13781378
};
13791379
607FACF41AFB9204008FA782 /* Release */ = {
13801380
isa = XCBuildConfiguration;
1381-
baseConfigurationReference = 1EB8CBED8ED378A414FE137F /* Pods-SwiftEntryKitTests.release.xcconfig */;
1381+
baseConfigurationReference = B1DF02D72E610C7F46A99DBD /* Pods-SwiftEntryKitTests.release.xcconfig */;
13821382
buildSettings = {
13831383
CODE_SIGN_IDENTITY = "iPhone Developer";
13841384
CODE_SIGN_STYLE = Automatic;

Source/Infra/EKEntryView.swift

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ class EKEntryView: EKStyleView {
6969

7070
override func layoutSubviews() {
7171
super.layoutSubviews()
72-
contentView.layoutIfNeeded()
7372
applyFrameStyle()
7473
}
7574

Source/Infra/EKStyleView.swift

+14
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@ class EKStyleView: UIView {
1111
return CAShapeLayer()
1212
}()
1313

14+
private var roundCorners: EKAttributes.RoundCorners!
15+
private var border: EKAttributes.Border!
16+
1417
var appliedStyle = false
1518

1619
func applyFrameStyle(roundCorners: EKAttributes.RoundCorners, border: EKAttributes.Border) {
20+
self.roundCorners = roundCorners
21+
self.border = border
22+
1723
var cornerRadius: CGFloat = 0
1824
var corners: UIRectCorner = []
1925
(corners, cornerRadius) = roundCorners.cornerValues ?? ([], 0)
@@ -38,4 +44,12 @@ class EKStyleView: UIView {
3844

3945
appliedStyle = true
4046
}
47+
48+
override func layoutSubviews() {
49+
super.layoutSubviews()
50+
guard let roundCorners = roundCorners, let border = border else {
51+
return
52+
}
53+
applyFrameStyle(roundCorners: roundCorners, border: border)
54+
}
4155
}

0 commit comments

Comments
 (0)