Skip to content

Commit dbc9515

Browse files
committed
Merge branch 'swift2.3'
2 parents 72f108f + 108823b commit dbc9515

File tree

5 files changed

+50
-7
lines changed

5 files changed

+50
-7
lines changed

Example.xcodeproj/project.pbxproj

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,18 +325,21 @@
325325
attributes = {
326326
LastSwiftMigration = 0700;
327327
LastSwiftUpdateCheck = 0700;
328-
LastUpgradeCheck = 0700;
328+
LastUpgradeCheck = 0800;
329329
ORGANIZATIONNAME = "Alexander Schuch";
330330
TargetAttributes = {
331331
4D6451451A64079200108EA3 = {
332332
CreatedOnToolsVersion = 6.2;
333+
LastSwiftMigration = 0800;
333334
};
334335
4D64514F1A64079200108EA3 = {
335336
CreatedOnToolsVersion = 6.2;
337+
LastSwiftMigration = 0800;
336338
TestTargetID = 4DE62ADB19B658610021630A;
337339
};
338340
4DE62ADB19B658610021630A = {
339341
CreatedOnToolsVersion = 6.0;
342+
LastSwiftMigration = 0800;
340343
};
341344
523646871C6F87B000392180 = {
342345
CreatedOnToolsVersion = 7.2.1;
@@ -486,6 +489,7 @@
486489
isa = XCBuildConfiguration;
487490
buildSettings = {
488491
CLANG_ENABLE_MODULES = YES;
492+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
489493
CURRENT_PROJECT_VERSION = 1;
490494
DEFINES_MODULE = YES;
491495
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -503,6 +507,7 @@
503507
PRODUCT_NAME = StatefulViewController;
504508
SKIP_INSTALL = YES;
505509
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
510+
SWIFT_VERSION = 2.3;
506511
TARGETED_DEVICE_FAMILY = "1,2";
507512
VERSIONING_SYSTEM = "apple-generic";
508513
VERSION_INFO_PREFIX = "";
@@ -513,6 +518,7 @@
513518
isa = XCBuildConfiguration;
514519
buildSettings = {
515520
CLANG_ENABLE_MODULES = YES;
521+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
516522
COPY_PHASE_STRIP = NO;
517523
CURRENT_PROJECT_VERSION = 1;
518524
DEFINES_MODULE = YES;
@@ -526,6 +532,7 @@
526532
PRODUCT_BUNDLE_IDENTIFIER = com.aschuch.StatefulViewController;
527533
PRODUCT_NAME = StatefulViewController;
528534
SKIP_INSTALL = YES;
535+
SWIFT_VERSION = 2.3;
529536
TARGETED_DEVICE_FAMILY = "1,2";
530537
VERSIONING_SYSTEM = "apple-generic";
531538
VERSION_INFO_PREFIX = "";
@@ -545,6 +552,7 @@
545552
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
546553
PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.$(PRODUCT_NAME:rfc1034identifier)";
547554
PRODUCT_NAME = "$(TARGET_NAME)";
555+
SWIFT_VERSION = 2.3;
548556
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
549557
};
550558
name = Debug;
@@ -559,6 +567,7 @@
559567
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
560568
PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.$(PRODUCT_NAME:rfc1034identifier)";
561569
PRODUCT_NAME = "$(TARGET_NAME)";
570+
SWIFT_VERSION = 2.3;
562571
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example";
563572
};
564573
name = Release;
@@ -576,8 +585,10 @@
576585
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
577586
CLANG_WARN_EMPTY_BODY = YES;
578587
CLANG_WARN_ENUM_CONVERSION = YES;
588+
CLANG_WARN_INFINITE_RECURSION = YES;
579589
CLANG_WARN_INT_CONVERSION = YES;
580590
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
591+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
581592
CLANG_WARN_UNREACHABLE_CODE = YES;
582593
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
583594
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -586,6 +597,7 @@
586597
ENABLE_TESTABILITY = YES;
587598
GCC_C_LANGUAGE_STANDARD = gnu99;
588599
GCC_DYNAMIC_NO_PIC = NO;
600+
GCC_NO_COMMON_BLOCKS = YES;
589601
GCC_OPTIMIZATION_LEVEL = 0;
590602
GCC_PREPROCESSOR_DEFINITIONS = (
591603
"DEBUG=1",
@@ -619,15 +631,18 @@
619631
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
620632
CLANG_WARN_EMPTY_BODY = YES;
621633
CLANG_WARN_ENUM_CONVERSION = YES;
634+
CLANG_WARN_INFINITE_RECURSION = YES;
622635
CLANG_WARN_INT_CONVERSION = YES;
623636
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
637+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
624638
CLANG_WARN_UNREACHABLE_CODE = YES;
625639
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
626640
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
627641
COPY_PHASE_STRIP = YES;
628642
ENABLE_NS_ASSERTIONS = NO;
629643
ENABLE_STRICT_OBJC_MSGSEND = YES;
630644
GCC_C_LANGUAGE_STANDARD = gnu99;
645+
GCC_NO_COMMON_BLOCKS = YES;
631646
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
632647
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
633648
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -637,6 +652,7 @@
637652
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
638653
MTL_ENABLE_DEBUG_INFO = NO;
639654
SDKROOT = iphoneos;
655+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
640656
VALIDATE_PRODUCT = YES;
641657
};
642658
name = Release;
@@ -649,6 +665,7 @@
649665
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
650666
PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.$(PRODUCT_NAME:rfc1034identifier)";
651667
PRODUCT_NAME = "$(TARGET_NAME)";
668+
SWIFT_VERSION = 2.3;
652669
};
653670
name = Debug;
654671
};
@@ -660,12 +677,14 @@
660677
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
661678
PRODUCT_BUNDLE_IDENTIFIER = "com.aschuch.$(PRODUCT_NAME:rfc1034identifier)";
662679
PRODUCT_NAME = "$(TARGET_NAME)";
680+
SWIFT_VERSION = 2.3;
663681
};
664682
name = Release;
665683
};
666684
5236468D1C6F87B000392180 /* Debug */ = {
667685
isa = XCBuildConfiguration;
668686
buildSettings = {
687+
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
669688
CURRENT_PROJECT_VERSION = 1;
670689
DEBUG_INFORMATION_FORMAT = dwarf;
671690
DEFINES_MODULE = YES;
@@ -690,6 +709,7 @@
690709
5236468E1C6F87B000392180 /* Release */ = {
691710
isa = XCBuildConfiguration;
692711
buildSettings = {
712+
"CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
693713
COPY_PHASE_STRIP = NO;
694714
CURRENT_PROJECT_VERSION = 1;
695715
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";

Example.xcodeproj/xcshareddata/xcschemes/StatefulViewController-iOS Tests.xcscheme

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0700"
3+
LastUpgradeVersion = "0800"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -79,6 +79,15 @@
7979
savedToolIdentifier = ""
8080
useCustomWorkingDirectory = "NO"
8181
debugDocumentVersioning = "YES">
82+
<MacroExpansion>
83+
<BuildableReference
84+
BuildableIdentifier = "primary"
85+
BlueprintIdentifier = "4D64514F1A64079200108EA3"
86+
BuildableName = "StatefulViewController-iOS Tests.xctest"
87+
BlueprintName = "StatefulViewController-iOS Tests"
88+
ReferencedContainer = "container:Example.xcodeproj">
89+
</BuildableReference>
90+
</MacroExpansion>
8291
</ProfileAction>
8392
<AnalyzeAction
8493
buildConfiguration = "Debug">

Example.xcodeproj/xcshareddata/xcschemes/StatefulViewController-iOS.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0700"
3+
LastUpgradeVersion = "0800"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Example.xcodeproj/xcshareddata/xcschemes/StatefulViewController-tvOS.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0720"
3+
LastUpgradeVersion = "0800"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Build Status](https://travis-ci.org/aschuch/StatefulViewController.svg)](https://travis-ci.org/aschuch/StatefulViewController)
44
![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)
5-
![Swift 2.2](https://img.shields.io/badge/Swift-2.2-orange.svg)
5+
![Swift 2.3](https://img.shields.io/badge/Swift-2.3-orange.svg)
66
![Platform](https://img.shields.io/badge/platform-iOS%20%7C%20tvOS-lightgrey.svg)
77

88
> This project is [Migrating to Swift 3](http://www.jessesquires.com/migrating-to-swift-3/).
@@ -13,6 +13,8 @@ A protocol to enable `UIViewController`s or `UIView`s to present placeholder vie
1313

1414
![StatefulViewController Example](Resources/example.gif)
1515

16+
## Overview
17+
1618
In a networked application a view controller or custom view typically has the following states that need to be communicated to the user:
1719

1820
* **Loading**: The content is currently loaded over the network.
@@ -26,10 +28,22 @@ As trivial as this flow may sound, there are a lot of cases that result in a rat
2628

2729
`StatefulViewController` is a concrete implementation of this particular decision tree. (If you want to create your own modified version, you might be interested in the [state machine](#viewstatemachine) that is used to show and hide views.)
2830

31+
## Version Compatibility
32+
33+
Current Swift compatibility breakdown:
34+
35+
| Swift Version | Framework Version |
36+
| ------------- | ----------------- |
37+
| 2.3 | 2.x |
38+
| 2.2 | 1.x |
39+
40+
[all releases]: https://github.com/aschuch/StatefulViewController/releases
41+
2942
## Usage
43+
3044
> This guide describes the use of the `StatefulViewController` protocol on `UIViewController`. However, you can also adopt the `StatefulViewController` protocol on any `UIViewController` subclass, such as `UITableViewController` or `UICollectionViewController`, as well as your custom `UIView` subclasses.
3145
32-
First, make sure your view controller adopts to the `StatefulViewController` protocol.
46+
First, make sure your view controller adopts to the `StatefulViewController` protocol.
3347

3448
```swift
3549
class MyViewController: UIViewController, StatefulViewController {
@@ -71,7 +85,7 @@ override func viewWillAppear(animated: Bool) {
7185

7286
func loadDeliciousWines() {
7387
startLoading()
74-
88+
7589
let url = NSURL(string: "http://example.com/api")
7690
let session = NSURLSession.sharedSession()
7791
session.dataTaskWithURL(url) { (let data, let response, let error) in

0 commit comments

Comments
 (0)