Skip to content

Commit

Permalink
1. Popover Messages snippet completed with an extension method to sho…
Browse files Browse the repository at this point in the history
…w 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.
  • Loading branch information
elliott-io committed Apr 27, 2020
1 parent bcc573a commit b9584ad
Show file tree
Hide file tree
Showing 12 changed files with 288 additions and 28 deletions.
Binary file added .DS_Store
Binary file not shown.
22 changes: 22 additions & 0 deletions StoryboardSnippets/StoryboardSnippets.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
0105EC0024563E55002B38A4 /* AlwaysPresentAsPopover.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0105EBFF24563E55002B38A4 /* AlwaysPresentAsPopover.swift */; };
0105EC0224563ECE002B38A4 /* PopoverViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0105EC0124563ECE002B38A4 /* PopoverViewController.swift */; };
0105EC0424568719002B38A4 /* PopoverPlacementViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0105EC0324568719002B38A4 /* PopoverPlacementViewController.swift */; };
017E1F062454E01000D5362E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017E1F052454E01000D5362E /* AppDelegate.swift */; };
017E1F082454E01000D5362E /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 017E1F072454E01000D5362E /* SceneDelegate.swift */; };
017E1F0D2454E01000D5362E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 017E1F0B2454E01000D5362E /* Main.storyboard */; };
Expand Down Expand Up @@ -45,6 +48,9 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
0105EBFF24563E55002B38A4 /* AlwaysPresentAsPopover.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlwaysPresentAsPopover.swift; sourceTree = "<group>"; };
0105EC0124563ECE002B38A4 /* PopoverViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PopoverViewController.swift; sourceTree = "<group>"; };
0105EC0324568719002B38A4 /* PopoverPlacementViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopoverPlacementViewController.swift; sourceTree = "<group>"; };
017E1F022454E01000D5362E /* Swift Snippets.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Swift Snippets.app"; sourceTree = BUILT_PRODUCTS_DIR; };
017E1F052454E01000D5362E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
017E1F072454E01000D5362E /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -105,6 +111,16 @@
path = Helpers;
sourceTree = "<group>";
};
0105EBFE24563E15002B38A4 /* PopoverMessage */ = {
isa = PBXGroup;
children = (
0105EC0124563ECE002B38A4 /* PopoverViewController.swift */,
0105EBFF24563E55002B38A4 /* AlwaysPresentAsPopover.swift */,
0105EC0324568719002B38A4 /* PopoverPlacementViewController.swift */,
);
path = PopoverMessage;
sourceTree = "<group>";
};
017E1EF92454E01000D5362E = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -162,6 +178,7 @@
017E1F50245530A200D5362E /* Snippets */ = {
isa = PBXGroup;
children = (
0105EBFE24563E15002B38A4 /* PopoverMessage */,
017E1F512455316600D5362E /* SavePhotoCustomAlbum */,
017E1F4624552B2900D5362E /* snippets.json */,
017E1F4C24552E4800D5362E /* Snippet.swift */,
Expand Down Expand Up @@ -316,6 +333,7 @@
files = (
017E1F062454E01000D5362E /* AppDelegate.swift in Sources */,
017E1F4524552A1E00D5362E /* CustomPhotoAlbum.swift in Sources */,
0105EC0224563ECE002B38A4 /* PopoverViewController.swift in Sources */,
017E1F4B24552C8200D5362E /* SnippetManager.swift in Sources */,
017E1F102454E01000D5362E /* StoryboardSnippets.xcdatamodeld in Sources */,
017E1F3F2454FE9300D5362E /* Styles.swift in Sources */,
Expand All @@ -326,6 +344,8 @@
017E1F412455157700D5362E /* GalleryViewController.swift in Sources */,
017E1F392454F80B00D5362E /* SnippetsViewController.swift in Sources */,
017E1F3D2454FDDD00D5362E /* Extensions.swift in Sources */,
0105EC0424568719002B38A4 /* PopoverPlacementViewController.swift in Sources */,
0105EC0024563E55002B38A4 /* AlwaysPresentAsPopover.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -505,6 +525,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.elliottio.StoryboardSnippets;
PRODUCT_NAME = "Swift Snippets";
SWIFT_VERSION = 5.0;
Expand All @@ -523,6 +544,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1;
PRODUCT_BUNDLE_IDENTIFIER = com.elliottio.StoryboardSnippets;
PRODUCT_NAME = "Swift Snippets";
SWIFT_VERSION = 5.0;
Expand Down
Binary file not shown.
Loading

0 comments on commit b9584ad

Please sign in to comment.