Skip to content

Commit b9584ad

Browse files
committed
1. Popover Messages snippet completed with an extension method to show them on any view controller.
1a. Popovers resize automatically based on message text. Autolayout constraints are set in viewWillAppear. 1b. Parameter for no arrow or either up, down, left, right pointing to source view. 1c. Dim animate sending view controller and restore when dismissed. 1d. Parameter for passthrough views which allow user to still tap thought views with popup displayed. 1e. Popover is dismissed on tap or on tapping anywhere that isn’t a passthrough view. 1f. If an existing popover or presenting view controller is displayed, it will be dismissed before showing new popover. 2. Popover Placement View Controller is used to show how popovers work. 3. Extension added to measure the size of a string with a given font and size. 4. AnimationDuration enum added to Styles for global consistency. 5. Fixed AutoLayout warnings for SnippetCell. 6. Updated selected highlight color Style to .systemIndigo.
1 parent bcc573a commit b9584ad

File tree

12 files changed

+288
-28
lines changed

12 files changed

+288
-28
lines changed

Diff for: .DS_Store

8 KB
Binary file not shown.

Diff for: StoryboardSnippets/StoryboardSnippets.xcodeproj/project.pbxproj

+22
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
0105EC0024563E55002B38A4 /* AlwaysPresentAsPopover.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0105EBFF24563E55002B38A4 /* AlwaysPresentAsPopover.swift */; };
11+
0105EC0224563ECE002B38A4 /* PopoverViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0105EC0124563ECE002B38A4 /* PopoverViewController.swift */; };
12+
0105EC0424568719002B38A4 /* PopoverPlacementViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0105EC0324568719002B38A4 /* PopoverPlacementViewController.swift */; };
1013
017E1F062454E01000D5362E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017E1F052454E01000D5362E /* AppDelegate.swift */; };
1114
017E1F082454E01000D5362E /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017E1F072454E01000D5362E /* SceneDelegate.swift */; };
1215
017E1F0D2454E01000D5362E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 017E1F0B2454E01000D5362E /* Main.storyboard */; };
@@ -45,6 +48,9 @@
4548
/* End PBXContainerItemProxy section */
4649

4750
/* Begin PBXFileReference section */
51+
0105EBFF24563E55002B38A4 /* AlwaysPresentAsPopover.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlwaysPresentAsPopover.swift; sourceTree = "<group>"; };
52+
0105EC0124563ECE002B38A4 /* PopoverViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PopoverViewController.swift; sourceTree = "<group>"; };
53+
0105EC0324568719002B38A4 /* PopoverPlacementViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopoverPlacementViewController.swift; sourceTree = "<group>"; };
4854
017E1F022454E01000D5362E /* Swift Snippets.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Swift Snippets.app"; sourceTree = BUILT_PRODUCTS_DIR; };
4955
017E1F052454E01000D5362E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
5056
017E1F072454E01000D5362E /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
@@ -105,6 +111,16 @@
105111
path = Helpers;
106112
sourceTree = "<group>";
107113
};
114+
0105EBFE24563E15002B38A4 /* PopoverMessage */ = {
115+
isa = PBXGroup;
116+
children = (
117+
0105EC0124563ECE002B38A4 /* PopoverViewController.swift */,
118+
0105EBFF24563E55002B38A4 /* AlwaysPresentAsPopover.swift */,
119+
0105EC0324568719002B38A4 /* PopoverPlacementViewController.swift */,
120+
);
121+
path = PopoverMessage;
122+
sourceTree = "<group>";
123+
};
108124
017E1EF92454E01000D5362E = {
109125
isa = PBXGroup;
110126
children = (
@@ -162,6 +178,7 @@
162178
017E1F50245530A200D5362E /* Snippets */ = {
163179
isa = PBXGroup;
164180
children = (
181+
0105EBFE24563E15002B38A4 /* PopoverMessage */,
165182
017E1F512455316600D5362E /* SavePhotoCustomAlbum */,
166183
017E1F4624552B2900D5362E /* snippets.json */,
167184
017E1F4C24552E4800D5362E /* Snippet.swift */,
@@ -316,6 +333,7 @@
316333
files = (
317334
017E1F062454E01000D5362E /* AppDelegate.swift in Sources */,
318335
017E1F4524552A1E00D5362E /* CustomPhotoAlbum.swift in Sources */,
336+
0105EC0224563ECE002B38A4 /* PopoverViewController.swift in Sources */,
319337
017E1F4B24552C8200D5362E /* SnippetManager.swift in Sources */,
320338
017E1F102454E01000D5362E /* StoryboardSnippets.xcdatamodeld in Sources */,
321339
017E1F3F2454FE9300D5362E /* Styles.swift in Sources */,
@@ -326,6 +344,8 @@
326344
017E1F412455157700D5362E /* GalleryViewController.swift in Sources */,
327345
017E1F392454F80B00D5362E /* SnippetsViewController.swift in Sources */,
328346
017E1F3D2454FDDD00D5362E /* Extensions.swift in Sources */,
347+
0105EC0424568719002B38A4 /* PopoverPlacementViewController.swift in Sources */,
348+
0105EC0024563E55002B38A4 /* AlwaysPresentAsPopover.swift in Sources */,
329349
);
330350
runOnlyForDeploymentPostprocessing = 0;
331351
};
@@ -505,6 +525,7 @@
505525
"$(inherited)",
506526
"@executable_path/Frameworks",
507527
);
528+
MARKETING_VERSION = 1.1;
508529
PRODUCT_BUNDLE_IDENTIFIER = com.elliottio.StoryboardSnippets;
509530
PRODUCT_NAME = "Swift Snippets";
510531
SWIFT_VERSION = 5.0;
@@ -523,6 +544,7 @@
523544
"$(inherited)",
524545
"@executable_path/Frameworks",
525546
);
547+
MARKETING_VERSION = 1.1;
526548
PRODUCT_BUNDLE_IDENTIFIER = com.elliottio.StoryboardSnippets;
527549
PRODUCT_NAME = "Swift Snippets";
528550
SWIFT_VERSION = 5.0;

0 commit comments

Comments
 (0)