Skip to content

Commit d762c31

Browse files
committed
Updated project for Swift 1.2
1 parent e2d6af0 commit d762c31

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

WaterfallDemo/WaterfallFlowLayout/AppDelegate.swift

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

1616

17-
func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool {
18-
// Override point for customization after application launch.
17+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
1918
return true
2019
}
2120

22-
func applicationWillResignActive(application: UIApplication!) {
21+
func applicationWillResignActive(application: UIApplication) {
2322
// 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.
2423
// 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.
2524
}
2625

27-
func applicationDidEnterBackground(application: UIApplication!) {
26+
func applicationDidEnterBackground(application: UIApplication) {
2827
// 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.
2928
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
3029
}
3130

32-
func applicationWillEnterForeground(application: UIApplication!) {
31+
func applicationWillEnterForeground(application: UIApplication) {
3332
// 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.
3433
}
3534

36-
func applicationDidBecomeActive(application: UIApplication!) {
35+
func applicationDidBecomeActive(application: UIApplication) {
3736
// 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.
3837
}
3938

40-
func applicationWillTerminate(application: UIApplication!) {
39+
func applicationWillTerminate(application: UIApplication) {
4140
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
4241
}
4342

WaterfallDemo/WaterfallFlowLayout/ViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, CollectionVi
5555
}
5656

5757
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
58-
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as UICollectionViewCell
58+
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! UICollectionViewCell
5959

6060
if let label = cell.contentView.viewWithTag(1) as? UILabel {
6161
label.text = String(indexPath.row)
@@ -64,7 +64,7 @@ class ViewController: UIViewController, UICollectionViewDataSource, CollectionVi
6464
return cell
6565
}
6666

67-
func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String!, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView {
67+
func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -> UICollectionReusableView {
6868
var reusableView: UICollectionReusableView? = nil
6969

7070
if kind == CollectionViewWaterfallElementKindSectionHeader {

0 commit comments

Comments
 (0)