Skip to content

Commit

Permalink
Shakes fist at CocoaPods
Browse files Browse the repository at this point in the history
Removed the SwiftMessagesSegueExtras framework because making it work with CocoaPods was challenging and it wasn’t really very useful.
  • Loading branch information
wtmoose committed Aug 29, 2018
1 parent 5042ffa commit 4b719c1
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 406 deletions.
30 changes: 0 additions & 30 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
22F27953210D0FDE00273E7F /* ViewControllersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22F27952210D0FDE00273E7F /* ViewControllersViewController.swift */; };
22FE3FA821193CB90017303D /* SwiftMessages.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22FB324121193A3B005C13D9 /* SwiftMessages.framework */; };
22FE3FA921193CB90017303D /* SwiftMessages.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 22FB324121193A3B005C13D9 /* SwiftMessages.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
22FE3FAC21193CB90017303D /* SwiftMessagesSegueExtras.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 22FB324321193A3B005C13D9 /* SwiftMessagesSegueExtras.framework */; };
22FE3FAD21193CB90017303D /* SwiftMessagesSegueExtras.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 22FB324321193A3B005C13D9 /* SwiftMessagesSegueExtras.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
8642F4361D5F7F540061BDCD /* ExploreViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8642F4351D5F7F540061BDCD /* ExploreViewController.swift */; };
86AEDCE61D5D1DB70030232E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86AEDCE51D5D1DB70030232E /* AppDelegate.swift */; };
86AEDCE81D5D1DB70030232E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86AEDCE71D5D1DB70030232E /* ViewController.swift */; };
Expand Down Expand Up @@ -54,27 +52,13 @@
remoteGlobalIDString = 86B48AEB1D5A41C900063E2B;
remoteInfo = SwiftMessages;
};
22FB324821193A4D005C13D9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 22FB323A21193A3B005C13D9 /* SwiftMessages.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 224FB6A021163FB90081D4DE;
remoteInfo = SwiftMessagesSegueExtras;
};
22FE3FAA21193CB90017303D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 22FB323A21193A3B005C13D9 /* SwiftMessages.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 86B48AEB1D5A41C900063E2B;
remoteInfo = SwiftMessages;
};
22FE3FAE21193CB90017303D /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 22FB323A21193A3B005C13D9 /* SwiftMessages.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 224FB6A021163FB90081D4DE;
remoteInfo = SwiftMessagesSegueExtras;
};
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
Expand All @@ -95,7 +79,6 @@
dstSubfolderSpec = 10;
files = (
22FE3FA921193CB90017303D /* SwiftMessages.framework in Embed Frameworks */,
22FE3FAD21193CB90017303D /* SwiftMessagesSegueExtras.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -127,7 +110,6 @@
buildActionMask = 2147483647;
files = (
22FE3FA821193CB90017303D /* SwiftMessages.framework in Frameworks */,
22FE3FAC21193CB90017303D /* SwiftMessagesSegueExtras.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -207,9 +189,7 @@
);
dependencies = (
22FB324721193A4D005C13D9 /* PBXTargetDependency */,
22FB324921193A4D005C13D9 /* PBXTargetDependency */,
22FE3FAB21193CB90017303D /* PBXTargetDependency */,
22FE3FAF21193CB90017303D /* PBXTargetDependency */,
);
name = Demo;
productName = Demo;
Expand Down Expand Up @@ -319,21 +299,11 @@
name = SwiftMessages;
targetProxy = 22FB324621193A4D005C13D9 /* PBXContainerItemProxy */;
};
22FB324921193A4D005C13D9 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = SwiftMessagesSegueExtras;
targetProxy = 22FB324821193A4D005C13D9 /* PBXContainerItemProxy */;
};
22FE3FAB21193CB90017303D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = SwiftMessages;
targetProxy = 22FE3FAA21193CB90017303D /* PBXContainerItemProxy */;
};
22FE3FAF21193CB90017303D /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = SwiftMessagesSegueExtras;
targetProxy = 22FE3FAE21193CB90017303D /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */

/* Begin PBXVariantGroup section */
Expand Down
16 changes: 8 additions & 8 deletions Demo/Demo/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesTopSegue" customModule="SwiftMessagesSegueExtras" id="LI8-6K-7oJ"/>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesTopSegue" customModule="Demo" customModuleProvider="target" id="7xS-Ca-mnb"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GeC-SP-rSC">
Expand All @@ -860,7 +860,7 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesBottomSegue" customModule="SwiftMessagesSegueExtras" id="6Yg-dE-eXA"/>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesBottomSegue" customModule="Demo" customModuleProvider="target" id="6Yg-dE-eXA"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DGn-eY-EEX">
Expand All @@ -874,7 +874,7 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesTopCardSegue" customModule="SwiftMessagesSegueExtras" id="Hzu-ei-Yah"/>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesTopCardSegue" customModule="Demo" customModuleProvider="target" id="Hzu-ei-Yah"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZQs-MK-vK3">
Expand All @@ -888,7 +888,7 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesBottomCardSegue" customModule="SwiftMessagesSegueExtras" id="TBl-s0-9vL"/>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesBottomCardSegue" customModule="Demo" customModuleProvider="target" id="TBl-s0-9vL"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kux-aE-Bdv" userLabel="Top Tab">
Expand All @@ -902,7 +902,7 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesTopTabSegue" customModule="SwiftMessagesSegueExtras" id="p7Y-6q-gfK"/>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesTopTabSegue" customModule="Demo" customModuleProvider="target" id="p7Y-6q-gfK"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dMQ-xF-RwV" userLabel="Bottom Tab">
Expand All @@ -916,7 +916,7 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesBottomTabSegue" customModule="SwiftMessagesSegueExtras" id="EaG-Ea-U3j"/>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesBottomTabSegue" customModule="Demo" customModuleProvider="target" id="EaG-Ea-U3j"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CDi-Gu-bE2" userLabel="Centered">
Expand All @@ -930,7 +930,7 @@
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesCenteredSegue" customModule="SwiftMessagesSegueExtras" id="had-cE-9YN"/>
<segue destination="dHK-y5-h16" kind="custom" customClass="SwiftMessagesCenteredSegue" customModule="Demo" customModuleProvider="target" id="had-cE-9YN"/>
</connections>
</button>
</subviews>
Expand Down Expand Up @@ -1112,6 +1112,6 @@
</resources>
<inferredMetricsTieBreakers>
<segue reference="h5n-Vv-Q3y"/>
<segue reference="EaG-Ea-U3j"/>
<segue reference="TBl-s0-9vL"/>
</inferredMetricsTieBreakers>
</document>
57 changes: 57 additions & 0 deletions Demo/Demo/ViewControllersViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,61 @@ class ViewControllersViewController: UIViewController {
@objc @IBAction private func dismissPresented(segue: UIStoryboardSegue) {
dismiss(animated: true, completion: nil)
}

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let segue = segue as? SwiftMessagesSegue {
segue.configure(layout: .bottomCard)
segue.dimMode = .blur(style: .dark, alpha: 0.9, interactive: true)
segue.messageView.configureNoDropShadow()
}
}
}

class SwiftMessagesTopSegue: SwiftMessagesSegue {
override public init(identifier: String?, source: UIViewController, destination: UIViewController) {
super.init(identifier: identifier, source: source, destination: destination)
configure(layout: .topMessage)
}
}

class SwiftMessagesTopCardSegue: SwiftMessagesSegue {
override public init(identifier: String?, source: UIViewController, destination: UIViewController) {
super.init(identifier: identifier, source: source, destination: destination)
configure(layout: .topCard)
}
}

class SwiftMessagesTopTabSegue: SwiftMessagesSegue {
override public init(identifier: String?, source: UIViewController, destination: UIViewController) {
super.init(identifier: identifier, source: source, destination: destination)
configure(layout: .topTab)
}
}

class SwiftMessagesBottomSegue: SwiftMessagesSegue {
override public init(identifier: String?, source: UIViewController, destination: UIViewController) {
super.init(identifier: identifier, source: source, destination: destination)
configure(layout: .bottomMessage)
}
}

class SwiftMessagesBottomCardSegue: SwiftMessagesSegue {
override public init(identifier: String?, source: UIViewController, destination: UIViewController) {
super.init(identifier: identifier, source: source, destination: destination)
configure(layout: .bottomCard)
}
}

class SwiftMessagesBottomTabSegue: SwiftMessagesSegue {
override public init(identifier: String?, source: UIViewController, destination: UIViewController) {
super.init(identifier: identifier, source: source, destination: destination)
configure(layout: .bottomTab)
}
}

class SwiftMessagesCenteredSegue: SwiftMessagesSegue {
override public init(identifier: String?, source: UIViewController, destination: UIViewController) {
super.init(identifier: identifier, source: source, destination: destination)
configure(layout: .centered)
}
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ let view: MyCustomView = try! SwiftMessages.viewFromNib()

#### MessageView

`MessageView` is a light-weight view that all of the bundled designs use. It primarily consists of the following optional `@IBOutlet` properties:

[`MessageView`](./SwiftMessages/MessageView.swift) is a light-weight view that all of the bundled designs use. It primarily consists of the following optional `@IBOutlet` properties:

Element | Declaration | Description
--------|-----------|-----
Expand Down
10 changes: 0 additions & 10 deletions SwiftMessages.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ Pod::Spec.new do |spec|
app.resource_bundles = {'SwiftMessages' => ['SwiftMessages/Resources/**/*']}
end

# Contains sub-classes of SwiftMessagesSegue with pre-defined layout and animation
# configurations (all of them can be seen in the "View Controllers" section of the Demo app.
# Note that by including this sub-spec, Interface Builder will display all seven options
# in the "Segue Type" picker when creating a new segue. If you don't want this, create your
# own sub-classes as needed or use the `SwiftMessagesSegue` base class (which appears in the picker
# as "swift messages" and configure it in prepare(for:sender).
spec.subspec 'SegueExtras' do |segues|
segues.source_files = 'SwiftMessagesSegueExtras/**/*.swift'
end

spec.subspec 'AppExtension' do |ext|
ext.source_files = 'SwiftMessages/**/*.swift'
ext.exclude_files = 'SwiftMessages/**/SegueConvenienceClasses.swift'
Expand Down
Loading

0 comments on commit 4b719c1

Please sign in to comment.