Skip to content

Commit

Permalink
#modify 升级 demo 到 swift5
Browse files Browse the repository at this point in the history
#modify 使用 LaunchScreen.storyboard 作为启动页
  • Loading branch information
amisare committed Jul 4, 2019
1 parent 6e796df commit 8860442
Show file tree
Hide file tree
Showing 24 changed files with 394 additions and 408 deletions.
29 changes: 12 additions & 17 deletions NNNavigationBarDemo/NNNavigationBarDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 51;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -263,14 +263,16 @@
TargetAttributes = {
67E93AE220A53C170083B38B = {
CreatedOnToolsVersion = 9.3;
LastSwiftMigration = 0930;
LastSwiftMigration = 1020;
};
67E93AF620A53C190083B38B = {
CreatedOnToolsVersion = 9.3;
LastSwiftMigration = 1020;
TestTargetID = 67E93AE220A53C170083B38B;
};
67E93B0120A53C190083B38B = {
CreatedOnToolsVersion = 9.3;
LastSwiftMigration = 1020;
TestTargetID = 67E93AE220A53C170083B38B;
};
};
Expand Down Expand Up @@ -335,16 +337,11 @@
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-NNNavigationBarDemo/Pods-NNNavigationBarDemo-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/NNNavigationBar/NNNavigationBar.framework",
"${PODS_ROOT}/Target Support Files/Pods-NNNavigationBarDemo/Pods-NNNavigationBarDemo-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NNNavigationBar.framework",
"${PODS_ROOT}/Target Support Files/Pods-NNNavigationBarDemo/Pods-NNNavigationBarDemo-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down Expand Up @@ -562,7 +559,6 @@
baseConfigurationReference = 68F4B6944E8B44841C8BA94D /* Pods-NNNavigationBarDemo.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = TN94U5BZF3;
Expand All @@ -576,7 +572,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "NNNavigationBarDemo/NNNavigationBarDemo-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -586,7 +582,6 @@
baseConfigurationReference = D01731C136791B9B2686CD4E /* Pods-NNNavigationBarDemo.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = TN94U5BZF3;
Expand All @@ -599,7 +594,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.nn.NNNavigationBarDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "NNNavigationBarDemo/NNNavigationBarDemo-Bridging-Header.h";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -618,7 +613,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.nn.NNNavigationBarDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NNNavigationBarDemo.app/NNNavigationBarDemo";
};
Expand All @@ -638,7 +633,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.nn.NNNavigationBarDemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/NNNavigationBarDemo.app/NNNavigationBarDemo";
};
Expand All @@ -657,7 +652,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.nn.NNNavigationBarDemoUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = NNNavigationBarDemo;
};
Expand All @@ -676,7 +671,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.nn.NNNavigationBarDemoUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_TARGET_NAME = NNNavigationBarDemo;
};
Expand Down
2 changes: 1 addition & 1 deletion NNNavigationBarDemo/NNNavigationBarDemo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.

self.window = UIWindow.init(frame: UIScreen.main.bounds)
Expand Down
Binary file removed ...Image.launchimage/[email protected]
Binary file not shown.
Binary file removed ...Image.launchimage/[email protected]
Binary file not shown.
Binary file removed ...chImage.launchimage/[email protected]
Binary file not shown.
Binary file removed ...chImage.launchimage/[email protected]
Binary file not shown.
Binary file not shown.
Binary file removed ...chImage.launchimage/[email protected]
Binary file not shown.
Binary file removed ...hImage.launchimage/[email protected]
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LanuchIcon.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?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" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -20,12 +20,28 @@
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="lanuchIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Ag3-Ja-ZGe">
<rect key="frame" x="112.5" y="258.5" width="150" height="150"/>
<constraints>
<constraint firstAttribute="width" secondItem="Ag3-Ja-ZGe" secondAttribute="height" multiplier="1:1" id="v0g-Xk-ZVa"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Ag3-Ja-ZGe" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="72i-5L-ckb"/>
<constraint firstItem="Ag3-Ja-ZGe" firstAttribute="width" secondItem="Ze5-6b-2t3" secondAttribute="width" multiplier="0.4" id="KKu-MV-tBH"/>
<constraint firstItem="Ag3-Ja-ZGe" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="dG8-sJ-Etc"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="lanuchIcon" width="512" height="512"/>
</resources>
</document>
2 changes: 2 additions & 0 deletions NNNavigationBarDemo/NNNavigationBarDemo/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class PickerController: UITableViewController {

var type = PickerControllerType.default

override init(style: UITableViewStyle) {
override init(style: UITableView.Style) {
super.init(style: style)
self.tableView.register(UINib.init(nibName: String.init(describing: PickerImageCell.self), bundle: nil), forCellReuseIdentifier: String.init(describing: PickerImageCell.self))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ class NNNavigationBarDemoUITests: XCTestCase {
// In UI tests it is usually best to stop immediately when a failure occurs.
continueAfterFailure = false
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
XCUIApplication().launch()
if #available(iOS 9.0, *) {
XCUIApplication().launch()
} else {
// Fallback on earlier versions
}

// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 980e0630684f1a3c7d167ebdafa2544d0863376e

COCOAPODS: 1.6.1
COCOAPODS: 1.7.0
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8860442

Please sign in to comment.