Skip to content

Commit 4f0a958

Browse files
Compatible with swift 4.2
1 parent 5b7781f commit 4f0a958

12 files changed

Lines changed: 70 additions & 261 deletions

File tree

Example/IOStickyHeader.xcodeproj/project.pbxproj

Lines changed: 27 additions & 209 deletions
Large diffs are not rendered by default.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
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>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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>BuildSystemType</key>
6+
<string>Original</string>
7+
<key>PreviewsEnabled</key>
8+
<false/>
9+
</dict>
10+
</plist>

Example/IOStickyHeader/AppDelegate.swift

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -14,34 +14,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414

1515
var window: UIWindow?
1616

17-
18-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
19-
// Override point for customization after application launch.
17+
func application(_ application: UIApplication,
18+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
2019
return true
2120
}
22-
23-
func applicationWillResignActive(_ application: UIApplication) {
24-
// 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.
25-
// 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.
26-
}
27-
28-
func applicationDidEnterBackground(_ application: UIApplication) {
29-
// 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.
30-
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31-
}
32-
33-
func applicationWillEnterForeground(_ application: UIApplication) {
34-
// 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.
35-
}
36-
37-
func applicationDidBecomeActive(_ application: UIApplication) {
38-
// 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.
39-
}
40-
41-
func applicationWillTerminate(_ application: UIApplication) {
42-
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43-
}
44-
45-
4621
}
47-

Example/IOStickyHeader/IOGrowVC.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class IOGrowVC: UIViewController, UICollectionViewDataSource, UICollectionViewDe
6565
self.collectionView.collectionViewLayout = layout
6666
}
6767

68-
self.collectionView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 0, 0)
68+
self.collectionView.scrollIndicatorInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
6969

7070
self.collectionView.register(self.headerNib, forSupplementaryViewOfKind: IOStickyHeaderParallaxHeader, withReuseIdentifier: "header")
7171
}

Example/IOStickyHeader/IOParallaxVC.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class IOParallaxVC: UIViewController, UICollectionViewDataSource, UICollectionVi
6262
self.collectionView.collectionViewLayout = layout
6363
}
6464

65-
self.collectionView.scrollIndicatorInsets = UIEdgeInsetsMake(0, 0, 0, 0)
65+
self.collectionView.scrollIndicatorInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
6666

6767
self.collectionView.register(self.headerNib, forSupplementaryViewOfKind: IOStickyHeaderParallaxHeader, withReuseIdentifier: "header")
6868
}
@@ -93,7 +93,7 @@ class IOParallaxVC: UIViewController, UICollectionViewDataSource, UICollectionVi
9393

9494
func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {
9595
switch kind {
96-
case UICollectionElementKindSectionHeader:
96+
case UICollectionView.elementKindSectionHeader:
9797
let cell = collectionView.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: "sectionHeader", for: indexPath) as! IOSectionHeader
9898
return cell
9999
case IOStickyHeaderParallaxHeader:

Example/IOStickyHeader/Info.plist

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,16 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>$(MARKETING_VERSION)</string>
1919
<key>CFBundleVersion</key>
20-
<string>$(CURRENT_PROJECT_VERSION)</string>
20+
<string>1.0.0</string>
21+
<key>LSApplicationCategoryType</key>
22+
<string></string>
2123
<key>NSPrincipalClass</key>
2224
<string></string>
25+
<key>UILaunchStoryboardName</key>
26+
<string>LaunchScreen</string>
27+
<key>UIMainStoryboardFile</key>
28+
<string>Main</string>
2329
</dict>
2430
</plist>

Example/Podfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@ end
77

88
target 'IOStickyHeader_Tests' do
99
pod "IOStickyHeader", :path => "../"
10-
11-
1210
end

Example/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
PODS:
2-
- IOStickyHeader (1.0.0)
2+
- IOStickyHeader (1.0.2)
33

44
DEPENDENCIES:
55
- IOStickyHeader (from `../`)
66

77
EXTERNAL SOURCES:
88
IOStickyHeader:
9-
:path: ../
9+
:path: "../"
1010

1111
SPEC CHECKSUMS:
12-
IOStickyHeader: 9aef3014a0fc1ed4cbe702d7a0b574e64516f576
12+
IOStickyHeader: 9371261daf8a55591207834261f946322aee6148
1313

14-
PODFILE CHECKSUM: 98c07bf9f34f0cf1d9ecb9d7de1472459ceca4e2
14+
PODFILE CHECKSUM: b88f7f649d7e9eb6526411bc22b15d354f8dcad1
1515

16-
COCOAPODS: 1.1.0.rc.2
16+
COCOAPODS: 1.7.1

IOStickyHeader.podspec

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,21 @@
99

1010
Pod::Spec.new do |s|
1111
s.name = "IOStickyHeader"
12-
s.version = "1.0.1"
12+
s.version = "1.0.4"
1313
s.summary = "Parallax and Sticky header done right using UICollectionViewLayout"
1414
s.description = <<-DESC
1515
UICollectionView are flexible and you can use supplementary views to
1616
anything you wanted.
1717
DESC
1818
s.homepage = "https://github.com/BenjaminPrieur/IOStickyHeader.git"
19-
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
2019
s.license = 'MIT'
2120
s.author = { "Benjamin Prieur" => "benjamin@prieur.org" }
2221
s.source = { :git => "https://github.com/BenjaminPrieur/IOStickyHeader.git", :tag => s.version.to_s }
23-
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
2422

25-
s.pod_target_xcconfig = {
26-
'SWIFT_VERSION' => '3.0'
27-
}
23+
s.swift_version = '4.2'
2824

29-
s.platform = :ios, '9.0'
25+
s.ios.deployment_target = '9.0'
3026
s.requires_arc = true
3127

32-
s.source_files = 'Sources/**/*'
28+
s.source_files = 'Sources/**/*.{swift}'
3329
end

0 commit comments

Comments
 (0)