Compare commits

..

8 Commits

Author SHA1 Message Date
jonkykong 2f948475be Cocoa pods support for Swift version 3. 2016-09-16 02:28:02 -07:00
jonkykong a0a1f3e96a Corrections to project settings. 2016-09-16 02:01:29 -07:00
jonkykong 16bb5baa65 Updated installation instructions. 2016-09-16 01:35:33 -07:00
jonkykong be9dfb3826 Updated Podspec and README for Cocoapods. 2016-09-15 16:57:06 -07:00
jonkykong 0267c307c8 Fixes for shadow affecting UIVisualEffectViews. Additional corrections for demo project for Swift 3. 2016-09-15 16:47:43 -07:00
Jon Kent dc16746226 Update README.md 2016-09-03 17:44:33 -07:00
jonkykong 01e18ab505 Updated documentation. 2016-09-02 14:26:17 -07:00
jonkykong 9fdf0a22aa Updated code-base for Swift 3 support (Xcode 8 Beta 6). 2016-09-01 16:34:16 -07:00
8 changed files with 36 additions and 41 deletions
@@ -389,7 +389,6 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
@@ -407,7 +406,6 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
+1 -1
View File
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
fileprivate func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [AnyHashable: Any]?) -> Bool {
private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}
+19 -19
View File
@@ -45,7 +45,7 @@
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="pqT-4M-nw1">
<color key="thumbTintColor" red="0.25098040700000002" green="0.0" blue="0.50196081400000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="changeSlider:" destination="QHN-nZ-kbB" eventType="valueChanged" id="Kcj-yD-lS0"/>
<action selector="changeSliderWithSlider:" destination="QHN-nZ-kbB" eventType="valueChanged" id="yrX-3n-Jty"/>
</connections>
</slider>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Menu Present Mode" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Efp-5L-qft">
@@ -61,7 +61,7 @@
<slider opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="Osf-2d-Znm">
<color key="thumbTintColor" red="0.25098040700000002" green="0.0" blue="0.50196081400000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="changeSlider:" destination="QHN-nZ-kbB" eventType="valueChanged" id="cRR-z8-cmm"/>
<action selector="changeSliderWithSlider:" destination="QHN-nZ-kbB" eventType="valueChanged" id="Xn4-bj-6K9"/>
</connections>
</slider>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="owH-AA-wgw">
@@ -72,13 +72,13 @@
<segment title="ExtraLight"/>
</segments>
<connections>
<action selector="changeSegment:" destination="QHN-nZ-kbB" eventType="valueChanged" id="Mna-Yh-fHu"/>
<action selector="changeSegmentWithSegmentControl:" destination="QHN-nZ-kbB" eventType="valueChanged" id="PfY-zK-O6f"/>
</connections>
</segmentedControl>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="0.001" minValue="0.001" maxValue="2" translatesAutoresizingMaskIntoConstraints="NO" id="Xp9-C5-Td1">
<color key="thumbTintColor" red="0.25098040700000002" green="0.0" blue="0.50196081400000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="changeSlider:" destination="QHN-nZ-kbB" eventType="valueChanged" id="PMM-8h-apN"/>
<action selector="changeSliderWithSlider:" destination="QHN-nZ-kbB" eventType="valueChanged" id="tce-Qj-Iwy"/>
</connections>
</slider>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Menu Shadow Opacity" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2QC-6F-Xpx">
@@ -89,7 +89,7 @@
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="Cor-r1-osR">
<color key="thumbTintColor" red="0.25098040700000002" green="0.0" blue="0.50196081400000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="changeSlider:" destination="QHN-nZ-kbB" eventType="valueChanged" id="TSE-rt-Run"/>
<action selector="changeSliderWithSlider:" destination="QHN-nZ-kbB" eventType="valueChanged" id="7bf-AN-txB"/>
</connections>
</slider>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Menu Transform Scale Factor" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tsg-30-YHs">
@@ -115,7 +115,7 @@
<switch opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" on="YES" translatesAutoresizingMaskIntoConstraints="NO" id="oFS-2Q-kPB">
<color key="onTintColor" red="0.25098040700000002" green="0.0" blue="0.50196081400000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<connections>
<action selector="changeSwitch:" destination="QHN-nZ-kbB" eventType="valueChanged" id="2wD-Py-Q4n"/>
<action selector="changeSwitchWithSwitchControl:" destination="QHN-nZ-kbB" eventType="valueChanged" id="8un-gW-vka"/>
</connections>
</switch>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" translatesAutoresizingMaskIntoConstraints="NO" id="KV2-tN-Aff">
@@ -126,7 +126,7 @@
<segment title="Dissolve"/>
</segments>
<connections>
<action selector="changeSegment:" destination="QHN-nZ-kbB" eventType="valueChanged" id="B2a-9p-5O1"/>
<action selector="changeSegmentWithSegmentControl:" destination="QHN-nZ-kbB" eventType="valueChanged" id="wUX-I2-oLd"/>
</connections>
</segmentedControl>
</subviews>
@@ -268,11 +268,11 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="7tx-O6-zAs" id="K0u-J2-Ab7">
<frame key="frameInset" width="320" height="43"/>
<frame key="frameInset" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Push View Controller 1" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="4WI-Ed-3Gr">
<frame key="frameInset" minX="15" width="290" height="43"/>
<frame key="frameInset" minX="15" width="290" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -289,11 +289,11 @@
<rect key="frame" x="0.0" y="44" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="f9Q-QP-TZ6" id="i3p-Ya-AvO">
<frame key="frameInset" width="320" height="43"/>
<frame key="frameInset" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Push View Controller 2" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="DpJ-hV-lmw">
<frame key="frameInset" minX="15" width="290" height="43"/>
<frame key="frameInset" minX="15" width="290" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -310,11 +310,11 @@
<rect key="frame" x="0.0" y="88" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dc6-l8-0cu" id="gyo-JQ-fx5">
<frame key="frameInset" width="320" height="43"/>
<frame key="frameInset" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Push View Controller 3" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="mAf-mx-C48">
<frame key="frameInset" minX="15" width="290" height="43"/>
<frame key="frameInset" minX="15" width="290" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -399,11 +399,11 @@
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8Ng-b4-4hH" id="U5K-l9-XWv">
<frame key="frameInset" width="320" height="43"/>
<frame key="frameInset" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Present View Controller 1" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="NLA-8t-ufi">
<frame key="frameInset" minX="15" width="290" height="43"/>
<frame key="frameInset" minX="15" width="290" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -420,11 +420,11 @@
<rect key="frame" x="0.0" y="44" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Eok-gX-LwQ" id="IOJ-bC-bNt">
<frame key="frameInset" width="320" height="43"/>
<frame key="frameInset" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Present View Controller 2" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="IdU-2D-zHb">
<frame key="frameInset" minX="15" width="290" height="43"/>
<frame key="frameInset" minX="15" width="290" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -441,11 +441,11 @@
<rect key="frame" x="0.0" y="88" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="41i-KK-YM3" id="629-G3-Agl">
<frame key="frameInset" width="320" height="43"/>
<frame key="frameInset" width="320" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Present View Controller 3" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="6x7-O7-DkG">
<frame key="frameInset" minX="15" width="290" height="43"/>
<frame key="frameInset" minX="15" width="290" height="43.5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
+12 -12
View File
@@ -9,13 +9,13 @@ import SideMenu
class MainViewController: UIViewController {
@IBOutlet fileprivate weak var presentModeSegmentedControl:UISegmentedControl!
@IBOutlet fileprivate weak var blurSegmentControl:UISegmentedControl!
@IBOutlet fileprivate weak var darknessSlider:UISlider!
@IBOutlet fileprivate weak var shadowOpacitySlider:UISlider!
@IBOutlet fileprivate weak var screenWidthSlider:UISlider!
@IBOutlet fileprivate weak var shrinkFactorSlider:UISlider!
@IBOutlet fileprivate weak var blackOutStatusBar:UISwitch!
@IBOutlet private weak var presentModeSegmentedControl:UISegmentedControl!
@IBOutlet private weak var blurSegmentControl:UISegmentedControl!
@IBOutlet private weak var darknessSlider:UISlider!
@IBOutlet private weak var shadowOpacitySlider:UISlider!
@IBOutlet private weak var screenWidthSlider:UISlider!
@IBOutlet private weak var shrinkFactorSlider:UISlider!
@IBOutlet private weak var blackOutStatusBar:UISwitch!
override func viewDidLoad() {
super.viewDidLoad()
@@ -24,7 +24,7 @@ class MainViewController: UIViewController {
setDefaults()
}
fileprivate func setupSideMenu() {
private func setupSideMenu() {
// Define the menus
SideMenuManager.menuLeftNavigationController = storyboard!.instantiateViewController(withIdentifier: "LeftMenuNavigationController") as? UISideMenuNavigationController
SideMenuManager.menuRightNavigationController = storyboard!.instantiateViewController(withIdentifier: "RightMenuNavigationController") as? UISideMenuNavigationController
@@ -38,7 +38,7 @@ class MainViewController: UIViewController {
SideMenuManager.menuAnimationBackgroundColor = UIColor(patternImage: UIImage(named: "background")!)
}
fileprivate func setDefaults() {
private func setDefaults() {
let modes:[SideMenuManager.MenuPresentMode] = [.menuSlideIn, .viewSlideOut, .menuDissolveIn]
presentModeSegmentedControl.selectedSegmentIndex = modes.index(of: SideMenuManager.menuPresentMode)!
@@ -56,7 +56,7 @@ class MainViewController: UIViewController {
blackOutStatusBar.isOn = SideMenuManager.menuFadeStatusBar
}
@IBAction fileprivate func changeSegment(_ segmentControl: UISegmentedControl) {
@IBAction private func changeSegment(segmentControl: UISegmentedControl) {
switch segmentControl {
case presentModeSegmentedControl:
let modes:[SideMenuManager.MenuPresentMode] = [.menuSlideIn, .viewSlideOut, .viewSlideInOut, .menuDissolveIn]
@@ -72,7 +72,7 @@ class MainViewController: UIViewController {
}
}
@IBAction fileprivate func changeSlider(_ slider: UISlider) {
@IBAction private func changeSlider(slider: UISlider) {
switch slider {
case darknessSlider:
SideMenuManager.menuAnimationFadeStrength = CGFloat(slider.value)
@@ -86,7 +86,7 @@ class MainViewController: UIViewController {
}
}
@IBAction fileprivate func changeSwitch(_ switchControl: UISwitch) {
@IBAction private func changeSwitch(switchControl: UISwitch) {
SideMenuManager.menuFadeStatusBar = switchControl.isOn
}
}
@@ -9,7 +9,7 @@ import UIKit
class PresentedViewController: UIViewController {
@IBAction fileprivate func close() {
@IBAction private func close() {
self.dismiss(animated: true, completion: nil)
}
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2015 Jonathan Kent <contact@jonkent.me>
Copyright (c) 2015 jonkykong <jpkent@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+1 -4
View File
@@ -15,7 +15,7 @@ SideMenu is a simple and versatile side menu control written in Swift.
* Global menu configuration. Set-up once and be done for all screens.
* Menus can be presented and dismissed the same as any other View Controller since this control uses custom transitions.
Check out the example project to see it in action!
Check out the example project or this [interactive demo](https://appetize.io/app/64a9v3e6b8c6f53zvn5pnny80m) to see it in action!
![](etc/SlideOut.gif)
![](etc/SlideIn.gif)
@@ -163,9 +163,6 @@ open static var menuFadeStatusBar = true
## Known Issues
Don't try to change the status bar appearance when presenting a menu. When used with quick gestures/animations, it causes the presentation animation to not complete properly and locks the UI. See [radar 21961293](http://www.openradar.me/21961293) for more information.
## Thank You
A special thank you to everyone that has [contributed](https://github.com/jonkykong/SideMenu/graphs/contributors) to this library to make it better. Your support is appreciated!
## About Me
My name is Jon Kent and I'm a freelance iOS designer, developer, and mobile strategist. I love coffee and play the drums. **Hire me!**
+1 -1
View File
@@ -8,7 +8,7 @@
Pod::Spec.new do |s|
s.name = "SideMenu"
s.version = "2.0.2"
s.version = "2.0.0"
s.summary = "Simple side menu control for iOS in Swift inspired by Facebook. Right and Left sides. No coding required."
# This description is used to generate tags and improve search results.