Skip to content

Commit 79b3933

Browse files
authored
Merge pull request #26 from aryaxt/Swift3
updated to swift 3.0
2 parents 2ce4d5b + 3e7332a commit 79b3933

File tree

10 files changed

+294
-59
lines changed

10 files changed

+294
-59
lines changed

.travis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
language: objective-c
2+
osx_image: xcode8
3+
4+
script:
5+
- xcodebuild -project ScrollPager.xcodeproj -scheme ScrollPagerTests -destination 'platform=iOS Simulator,name=iPhone 6' test

ScrollPager.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
Pod::Spec.new do |s|
22
s.name = 'ScrollPager'
3-
s.version = '0.7'
3+
s.version = '0.8'
44
s.summary = 'A fully featured scroll pager similar to the one in flipboard, fully configurable through storyboard'
55
s.homepage = 'https://github.com/aryaxt/ScrollPager'
66
s.license = {
77
:type => 'MIT',
88
:file => 'License.txt'
99
}
1010
s.author = {'Aryan Ghassemi' => 'https://github.com/aryaxt/ScrollPager'}
11-
s.source = {:git => 'https://github.com/aryaxt/ScrollPager.git', :tag => '0.7'}
11+
s.source = {:git => 'https://github.com/aryaxt/ScrollPager.git', :tag => '0.8'}
1212
s.platform = :ios, '8.0'
1313
s.source_files = 'ScrollPager/Source/*.{swift}'
1414
s.framework = 'Foundation', 'UIKit'

ScrollPager.xcodeproj/project.pbxproj

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,14 +169,17 @@
169169
attributes = {
170170
LastSwiftMigration = 0700;
171171
LastSwiftUpdateCheck = 0700;
172-
LastUpgradeCheck = 0700;
172+
LastUpgradeCheck = 0800;
173173
ORGANIZATIONNAME = "Aryan Ghassemi";
174174
TargetAttributes = {
175175
15F9717A1A9A86E400169B7E = {
176176
CreatedOnToolsVersion = 6.1.1;
177+
DevelopmentTeam = 24FGDP9KJW;
178+
LastSwiftMigration = 0800;
177179
};
178180
15F9718F1A9A86E400169B7E = {
179181
CreatedOnToolsVersion = 6.1.1;
182+
LastSwiftMigration = 0800;
180183
TestTargetID = 15F9717A1A9A86E400169B7E;
181184
};
182185
};
@@ -282,8 +285,10 @@
282285
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
283286
CLANG_WARN_EMPTY_BODY = YES;
284287
CLANG_WARN_ENUM_CONVERSION = YES;
288+
CLANG_WARN_INFINITE_RECURSION = YES;
285289
CLANG_WARN_INT_CONVERSION = YES;
286290
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
291+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
287292
CLANG_WARN_UNREACHABLE_CODE = YES;
288293
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
289294
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -292,6 +297,7 @@
292297
ENABLE_TESTABILITY = YES;
293298
GCC_C_LANGUAGE_STANDARD = gnu99;
294299
GCC_DYNAMIC_NO_PIC = NO;
300+
GCC_NO_COMMON_BLOCKS = YES;
295301
GCC_OPTIMIZATION_LEVEL = 0;
296302
GCC_PREPROCESSOR_DEFINITIONS = (
297303
"DEBUG=1",
@@ -326,15 +332,18 @@
326332
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
327333
CLANG_WARN_EMPTY_BODY = YES;
328334
CLANG_WARN_ENUM_CONVERSION = YES;
335+
CLANG_WARN_INFINITE_RECURSION = YES;
329336
CLANG_WARN_INT_CONVERSION = YES;
330337
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
338+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
331339
CLANG_WARN_UNREACHABLE_CODE = YES;
332340
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
333341
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
334342
COPY_PHASE_STRIP = YES;
335343
ENABLE_NS_ASSERTIONS = NO;
336344
ENABLE_STRICT_OBJC_MSGSEND = YES;
337345
GCC_C_LANGUAGE_STANDARD = gnu99;
346+
GCC_NO_COMMON_BLOCKS = YES;
338347
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
339348
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
340349
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -344,6 +353,7 @@
344353
IPHONEOS_DEPLOYMENT_TARGET = 8.1;
345354
MTL_ENABLE_DEBUG_INFO = NO;
346355
SDKROOT = iphoneos;
356+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
347357
TARGETED_DEVICE_FAMILY = "1,2";
348358
VALIDATE_PRODUCT = YES;
349359
};
@@ -353,21 +363,25 @@
353363
isa = XCBuildConfiguration;
354364
buildSettings = {
355365
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
366+
DEVELOPMENT_TEAM = 24FGDP9KJW;
356367
INFOPLIST_FILE = ScrollPager/Info.plist;
357368
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
358369
PRODUCT_BUNDLE_IDENTIFIER = "com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)";
359370
PRODUCT_NAME = "$(TARGET_NAME)";
371+
SWIFT_VERSION = 3.0;
360372
};
361373
name = Debug;
362374
};
363375
15F9719C1A9A86E400169B7E /* Release */ = {
364376
isa = XCBuildConfiguration;
365377
buildSettings = {
366378
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
379+
DEVELOPMENT_TEAM = 24FGDP9KJW;
367380
INFOPLIST_FILE = ScrollPager/Info.plist;
368381
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
369382
PRODUCT_BUNDLE_IDENTIFIER = "com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)";
370383
PRODUCT_NAME = "$(TARGET_NAME)";
384+
SWIFT_VERSION = 3.0;
371385
};
372386
name = Release;
373387
};
@@ -387,6 +401,7 @@
387401
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
388402
PRODUCT_BUNDLE_IDENTIFIER = "com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)";
389403
PRODUCT_NAME = "$(TARGET_NAME)";
404+
SWIFT_VERSION = 3.0;
390405
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ScrollPager.app/ScrollPager";
391406
};
392407
name = Debug;
@@ -403,6 +418,7 @@
403418
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
404419
PRODUCT_BUNDLE_IDENTIFIER = "com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)";
405420
PRODUCT_NAME = "$(TARGET_NAME)";
421+
SWIFT_VERSION = 3.0;
406422
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ScrollPager.app/ScrollPager";
407423
};
408424
name = Release;
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
6+
<false/>
7+
<key>IDESourceControlProjectIdentifier</key>
8+
<string>FE30291C-AA8B-4552-A6D0-DEA9E5E44351</string>
9+
<key>IDESourceControlProjectName</key>
10+
<string>ScrollPager</string>
11+
<key>IDESourceControlProjectOriginsDictionary</key>
12+
<dict>
13+
<key>203B8E4269EA117004AE3A2A717AF64DE226A9BC</key>
14+
<string>https://github.com/aryaxt/ScrollPager.git</string>
15+
</dict>
16+
<key>IDESourceControlProjectPath</key>
17+
<string>ScrollPager.xcodeproj</string>
18+
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
19+
<dict>
20+
<key>203B8E4269EA117004AE3A2A717AF64DE226A9BC</key>
21+
<string>../..</string>
22+
</dict>
23+
<key>IDESourceControlProjectURL</key>
24+
<string>https://github.com/aryaxt/ScrollPager.git</string>
25+
<key>IDESourceControlProjectVersion</key>
26+
<integer>111</integer>
27+
<key>IDESourceControlProjectWCCIdentifier</key>
28+
<string>203B8E4269EA117004AE3A2A717AF64DE226A9BC</string>
29+
<key>IDESourceControlProjectWCConfigurations</key>
30+
<array>
31+
<dict>
32+
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
33+
<string>public.vcs.git</string>
34+
<key>IDESourceControlWCCIdentifierKey</key>
35+
<string>203B8E4269EA117004AE3A2A717AF64DE226A9BC</string>
36+
<key>IDESourceControlWCCName</key>
37+
<string>ScrollPager</string>
38+
</dict>
39+
</array>
40+
</dict>
41+
</plist>
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0800"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "15F9717A1A9A86E400169B7E"
18+
BuildableName = "ScrollPager.app"
19+
BlueprintName = "ScrollPager"
20+
ReferencedContainer = "container:ScrollPager.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
<BuildActionEntry
24+
buildForTesting = "YES"
25+
buildForRunning = "YES"
26+
buildForProfiling = "NO"
27+
buildForArchiving = "NO"
28+
buildForAnalyzing = "YES">
29+
<BuildableReference
30+
BuildableIdentifier = "primary"
31+
BlueprintIdentifier = "15F9718F1A9A86E400169B7E"
32+
BuildableName = "ScrollPagerTests.xctest"
33+
BlueprintName = "ScrollPagerTests"
34+
ReferencedContainer = "container:ScrollPager.xcodeproj">
35+
</BuildableReference>
36+
</BuildActionEntry>
37+
</BuildActionEntries>
38+
</BuildAction>
39+
<TestAction
40+
buildConfiguration = "Debug"
41+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
42+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
43+
shouldUseLaunchSchemeArgsEnv = "YES">
44+
<Testables>
45+
<TestableReference
46+
skipped = "NO">
47+
<BuildableReference
48+
BuildableIdentifier = "primary"
49+
BlueprintIdentifier = "15F9718F1A9A86E400169B7E"
50+
BuildableName = "ScrollPagerTests.xctest"
51+
BlueprintName = "ScrollPagerTests"
52+
ReferencedContainer = "container:ScrollPager.xcodeproj">
53+
</BuildableReference>
54+
</TestableReference>
55+
</Testables>
56+
<MacroExpansion>
57+
<BuildableReference
58+
BuildableIdentifier = "primary"
59+
BlueprintIdentifier = "15F9717A1A9A86E400169B7E"
60+
BuildableName = "ScrollPager.app"
61+
BlueprintName = "ScrollPager"
62+
ReferencedContainer = "container:ScrollPager.xcodeproj">
63+
</BuildableReference>
64+
</MacroExpansion>
65+
<AdditionalOptions>
66+
</AdditionalOptions>
67+
</TestAction>
68+
<LaunchAction
69+
buildConfiguration = "Debug"
70+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
71+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
72+
launchStyle = "0"
73+
useCustomWorkingDirectory = "NO"
74+
ignoresPersistentStateOnLaunch = "NO"
75+
debugDocumentVersioning = "YES"
76+
debugServiceExtension = "internal"
77+
allowLocationSimulation = "YES">
78+
<BuildableProductRunnable
79+
runnableDebuggingMode = "0">
80+
<BuildableReference
81+
BuildableIdentifier = "primary"
82+
BlueprintIdentifier = "15F9717A1A9A86E400169B7E"
83+
BuildableName = "ScrollPager.app"
84+
BlueprintName = "ScrollPager"
85+
ReferencedContainer = "container:ScrollPager.xcodeproj">
86+
</BuildableReference>
87+
</BuildableProductRunnable>
88+
<AdditionalOptions>
89+
</AdditionalOptions>
90+
</LaunchAction>
91+
<ProfileAction
92+
buildConfiguration = "Release"
93+
shouldUseLaunchSchemeArgsEnv = "YES"
94+
savedToolIdentifier = ""
95+
useCustomWorkingDirectory = "NO"
96+
debugDocumentVersioning = "YES">
97+
<BuildableProductRunnable
98+
runnableDebuggingMode = "0">
99+
<BuildableReference
100+
BuildableIdentifier = "primary"
101+
BlueprintIdentifier = "15F9717A1A9A86E400169B7E"
102+
BuildableName = "ScrollPager.app"
103+
BlueprintName = "ScrollPager"
104+
ReferencedContainer = "container:ScrollPager.xcodeproj">
105+
</BuildableReference>
106+
</BuildableProductRunnable>
107+
</ProfileAction>
108+
<AnalyzeAction
109+
buildConfiguration = "Debug">
110+
</AnalyzeAction>
111+
<ArchiveAction
112+
buildConfiguration = "Release"
113+
revealArchiveInOrganizer = "YES">
114+
</ArchiveAction>
115+
</Scheme>
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0800"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
shouldUseLaunchSchemeArgsEnv = "YES">
14+
<Testables>
15+
<TestableReference
16+
skipped = "NO">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "15F9718F1A9A86E400169B7E"
20+
BuildableName = "ScrollPagerTests.xctest"
21+
BlueprintName = "ScrollPagerTests"
22+
ReferencedContainer = "container:ScrollPager.xcodeproj">
23+
</BuildableReference>
24+
</TestableReference>
25+
</Testables>
26+
<AdditionalOptions>
27+
</AdditionalOptions>
28+
</TestAction>
29+
<LaunchAction
30+
buildConfiguration = "Debug"
31+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
32+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
33+
launchStyle = "0"
34+
useCustomWorkingDirectory = "NO"
35+
ignoresPersistentStateOnLaunch = "NO"
36+
debugDocumentVersioning = "YES"
37+
debugServiceExtension = "internal"
38+
allowLocationSimulation = "YES">
39+
<AdditionalOptions>
40+
</AdditionalOptions>
41+
</LaunchAction>
42+
<ProfileAction
43+
buildConfiguration = "Release"
44+
shouldUseLaunchSchemeArgsEnv = "YES"
45+
savedToolIdentifier = ""
46+
useCustomWorkingDirectory = "NO"
47+
debugDocumentVersioning = "YES">
48+
</ProfileAction>
49+
<AnalyzeAction
50+
buildConfiguration = "Debug">
51+
</AnalyzeAction>
52+
<ArchiveAction
53+
buildConfiguration = "Release"
54+
revealArchiveInOrganizer = "YES">
55+
</ArchiveAction>
56+
</Scheme>

ScrollPager/AppDelegate.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414
var window: UIWindow?
1515

1616

17-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17+
private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
1818
// Override point for customization after application launch.
1919
return true
2020
}
2121

22-
func applicationWillResignActive(application: UIApplication) {
22+
private func applicationWillResignActive(application: UIApplication) {
2323
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
2424
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
2525
}
2626

27-
func applicationDidEnterBackground(application: UIApplication) {
27+
private func applicationDidEnterBackground(application: UIApplication) {
2828
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
2929
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
3030
}
3131

32-
func applicationWillEnterForeground(application: UIApplication) {
32+
private func applicationWillEnterForeground(application: UIApplication) {
3333
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
3434
}
3535

36-
func applicationDidBecomeActive(application: UIApplication) {
36+
private func applicationDidBecomeActive(application: UIApplication) {
3737
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
3838
}
3939

40-
func applicationWillTerminate(application: UIApplication) {
40+
private func applicationWillTerminate(application: UIApplication) {
4141
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
4242
}
4343

0 commit comments

Comments
 (0)