Skip to content

Commit

Permalink
Update readme, fix merge issue, bump pod version for 2.5.0 release.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyleecodes committed Aug 29, 2018
1 parent af4f788 commit fe0d66a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Pulley.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'Pulley'
s.version = '2.4.5'
s.version = '2.5.0'
s.summary = 'A library to imitate the iOS 10 Maps UI.'

# This description is used to generate tags and improve search results.
Expand Down
12 changes: 5 additions & 7 deletions Pulley/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="eGL-tC-8gT">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14113" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="eGL-tC-8gT">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
Expand Down Expand Up @@ -66,18 +66,15 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="334"/>
</mapView>
<visualEffectView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="D1V-M1-B9h">
<rect key="frame" x="0.0" y="0.0" width="375" height="20"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="0.0"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="Cyw-pD-dsX">
<rect key="frame" x="0.0" y="0.0" width="375" height="20"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="0.0"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
<constraints>
<constraint firstAttribute="height" constant="20" id="Ngx-Aj-MG5"/>
</constraints>
<blurEffect style="light"/>
</visualEffectView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S4A-9H-sT4">
<rect key="frame" x="323" y="28" width="44" height="74"/>
<rect key="frame" x="323" y="8" width="44" height="74"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="infoLight" showsTouchWhenHighlighted="YES" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="98f-el-Efz">
<rect key="frame" x="11" y="10" width="22" height="22"/>
Expand Down Expand Up @@ -128,6 +125,7 @@
<constraint firstAttribute="bottom" secondItem="CdD-I4-t3B" secondAttribute="bottom" constant="8" id="73I-zu-uZx"/>
<constraint firstItem="3nf-7A-qvc" firstAttribute="trailing" secondItem="S4A-9H-sT4" secondAttribute="trailing" constant="8" id="7IE-0v-gtr"/>
<constraint firstItem="D1V-M1-B9h" firstAttribute="leading" secondItem="3nf-7A-qvc" secondAttribute="leading" id="8gK-mG-aI1"/>
<constraint firstItem="3nf-7A-qvc" firstAttribute="top" secondItem="D1V-M1-B9h" secondAttribute="bottom" id="DEV-PB-1hd"/>
<constraint firstAttribute="top" secondItem="D1V-M1-B9h" secondAttribute="top" id="MaD-tO-6jk"/>
<constraint firstItem="3nf-7A-qvc" firstAttribute="trailing" secondItem="D1V-M1-B9h" secondAttribute="trailing" id="SHa-ls-4Fe"/>
<constraint firstItem="BcX-Cl-AEz" firstAttribute="top" secondItem="wsZ-C5-y4c" secondAttribute="top" id="Zrd-LT-tK6"/>
Expand Down
4 changes: 2 additions & 2 deletions Pulley/PrimaryContentViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ extension PrimaryContentViewController: PulleyPrimaryContentControllerDelegate {

func makeUIAdjustmentsForFullscreen(progress: CGFloat, bottomSafeArea: CGFloat)
{
guard let drawer = self.pulleyViewController, drawer.currentDisplayMode == .bottomDrawer else {
guard let drawer = self.pulleyViewController, drawer.currentDisplayMode == .drawer else {
controlsContainer.alpha = 1.0
return
}
Expand All @@ -70,7 +70,7 @@ extension PrimaryContentViewController: PulleyPrimaryContentControllerDelegate {

func drawerChangedDistanceFromBottom(drawer: PulleyViewController, distance: CGFloat, bottomSafeArea: CGFloat)
{
guard drawer.currentDisplayMode == .bottomDrawer else {
guard drawer.currentDisplayMode == .drawer else {

temperatureLabelBottomConstraint.constant = temperatureLabelBottomDistance
return
Expand Down
13 changes: 2 additions & 11 deletions PulleyLib/PulleyViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public enum PulleyPanelCornerPlacement {
case topRight
case bottomLeft
case bottomRight
}

/// Represents the 'snap' mode for Pulley. The default is 'nearest position'. You can use 'nearestPositionUnlessExceeded' to make the drawer feel lighter or heavier.
///
Expand Down Expand Up @@ -426,17 +427,7 @@ open class PulleyViewController: UIViewController, PulleyDrawerViewControllerDel
}
}
}

/// The Y positioning for Pulley. This property is only oberserved when `displayMode` is set to `.automatic` or `leftSide`. Default value is `.top`.
public var cornerPlacement: PulleyCornerPlacement = .top {
didSet {
if self.isViewLoaded
{
self.view.setNeedsLayout()
}
}
}


/// This is here exclusively to support IBInspectable in Interface Builder because Interface Builder can't deal with enums. If you're doing this in code use the -initialDrawerPosition property instead. Available strings are: open, closed, partiallyRevealed, collapsed
@IBInspectable public var initialDrawerPositionFromIB: String? {
didSet {
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ A library to imitate the drawer in Maps for iOS 10/11. The master branch follows

### Update / Migration Info

**ATTENTION:** Pulley 2.4.0 changed PulleyPosition from an enum to a class. This won't affect most uses, but may affect your switch statements. Continue to use the static PulleyPosition values as usual and add a default case. This was done to allow marking some `PulleyDrawerViewControllerDelegate` methods as optional so they don't need to be implemented if you aren't using certain positions (or wish to use the default values). If you have questions, please open an issue.
**ATTENTION:**
Pulley 2.5.0 had significant renaming changes to support new features. Although property names have changed, the functionality should work without any significant changes (aside from renaming). See [this thread](https://github.com/52inc/Pulley/issues/252) for additional information.


Pulley 2.4.0 changed PulleyPosition from an enum to a class. This won't affect most uses, but may affect your switch statements. Continue to use the static PulleyPosition values as usual and add a default case. This was done to allow marking some `PulleyDrawerViewControllerDelegate` methods as optional so they don't need to be implemented if you aren't using certain positions (or wish to use the default values). If you have questions, please open an issue.

_Technical reason: Optional protocol methods require the @objc attribute. Arrays of Swift enums can't be exposed to Objective-C, and supportedDrawerPositions previously returned an array of PulleyPosition enums. This change allows for marking the protocol @objc so methods can be marked optional._

Expand Down Expand Up @@ -131,4 +135,6 @@ if let drawer = self.parentViewController as? PulleyViewController
12. The Swift Interface for `PulleyViewController` is documented in case you want to see real documentation instead of a numbered list of useful things.
13. You can set the initial drawer position by using the initialDrawerPosition property on the `PulleyViewController`.
14. Most settings for the `PulleyViewController` are exposed in Interface Builder. Select the `PulleyViewController` View Controller (not the view) to access them via IBInspectable.
15. By default, Pulley will only use the 'bottomDrawer' display mode (to preserve backwards compatibility). If you want to use the iPad / iPhone landscape modes, you can use 'leftSide' for the display mode. If you want it to automatically switch like Maps.app on iOS, you can set the display mode to 'automatic'.
15. By default, Pulley will only use the 'bottom' display mode (to preserve backwards compatibility). If you want to use the iPad / iPhone landscape modes, you can use 'panel' for the display mode. If you want it to automatically switch like Maps.app on iOS, you can set the display mode to 'automatic'.
16. You can apply a custom mask to the Pulley drawer by setting your drawerViewController's view.layer.mask property to a CAShapeLayer. That mask will also be applied to the drawer in Pulley.
17. You can specify which corner you'd like the panel to display in (when in 'panel' displayMode) by using the 'panelCornerPlacement` property.

0 comments on commit fe0d66a

Please sign in to comment.