Skip to content

Commit

Permalink
Swift3 (#12)
Browse files Browse the repository at this point in the history
* Update due to swift 3 guidelines

* Update readme

* Rename classes

* Update project settings

* Set swift version

* Minor fixes

* Rename files

* Drop carthage support because it doesn't work for now
  • Loading branch information
serejahh authored Sep 27, 2016
1 parent 92fa4b2 commit 9b1e90f
Show file tree
Hide file tree
Showing 34 changed files with 470 additions and 1,469 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0
4 changes: 2 additions & 2 deletions DisplaySwitcher.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "DisplaySwitcher"
s.version = "0.1.1"
s.version = "1.0"
s.summary = "This component implements custom transition between two collection view layouts."
s.screenshot = 'https://d13yacurqjgara.cloudfront.net/users/116693/screenshots/2276068/open-uri20151005-3-walc59'

Expand All @@ -13,7 +13,7 @@ Pod::Spec.new do |s|
s.platform = :ios, '8.0'
s.ios.deployment_target = '8.0'

s.source = { :git => "https://github.com/Yalantis/DisplaySwitcher.git", :tag => "0.1.1" }
s.source = { :git => "https://github.com/Yalantis/DisplaySwitcher.git", :tag => s.version }
s.source_files = 'Pod/Classes/**/*'

s.requires_arc = true
Expand Down
886 changes: 0 additions & 886 deletions DisplaySwitcher/DisplaySwitcher.xcodeproj/project.pbxproj

This file was deleted.

This file was deleted.

This file was deleted.

19 changes: 0 additions & 19 deletions DisplaySwitcher/DisplaySwitcher/DisplaySwitcher.h

This file was deleted.

26 changes: 0 additions & 26 deletions DisplaySwitcher/DisplaySwitcher/Info.plist

This file was deleted.

8 changes: 7 additions & 1 deletion Example/DisplaySwitcher.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,11 @@
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0800;
};
607FACE41AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0800;
TestTargetID = 607FACCF1AFB9204008FA782;
};
};
Expand Down Expand Up @@ -457,7 +459,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -612,6 +614,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "DisplaySwitcher/DisplaySwitcher_Example-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -628,6 +631,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "DisplaySwitcher/DisplaySwitcher_Example-Bridging-Header.h";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -646,6 +650,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
Expand All @@ -660,6 +665,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand Down
14 changes: 6 additions & 8 deletions Example/DisplaySwitcher/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
let navigationBarAppearace = UINavigationBar.appearance()
navigationBarAppearace.titleTextAttributes = ([NSFontAttributeName: UIFont(name: "Dosis-SemiBold", size: 21)!,
NSForegroundColorAttributeName: UIColor.navigationBarTintColor()])
UINavigationBar.appearance().barTintColor = UIColor.navigationBarBackgroundColor()
navigationBarAppearace.translucent = false
navigationBarAppearace.isTranslucent = false

UIApplication.sharedApplication().statusBarStyle = UIStatusBarStyle.LightContent
UIApplication.shared.statusBarStyle = .lightContent

UITextField.appearanceWhenContainedInInstancesOfClasses([UISearchBar.self]).backgroundColor = .blackColor()
UITextField.appearanceWhenContainedInInstancesOfClasses([UISearchBar.self]).tintColor = .lightGrayColor()
UITextField.appearanceWhenContainedInInstancesOfClasses([UISearchBar.self]).textColor = .lightGrayColor()
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).backgroundColor = .black
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).tintColor = .lightGray
UITextField.appearance(whenContainedInInstancesOf: [UISearchBar.self]).textColor = .lightGray

return true
}


}

Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down
9 changes: 5 additions & 4 deletions Example/DisplaySwitcher/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
Expand All @@ -14,9 +15,9 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down
Loading

0 comments on commit 9b1e90f

Please sign in to comment.