From d4035ffdf41d6d159263ca2e48b24b0096e48e7d Mon Sep 17 00:00:00 2001 From: Kevin Rummler Date: Sat, 14 May 2016 20:05:05 +0200 Subject: [PATCH] Fixed unit test and problems running when being bridged to objective-c --- SKPhotoBrowser/SKLocalPhoto.swift | 2 +- SKPhotoBrowser/SKPhoto.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SKPhotoBrowser/SKLocalPhoto.swift b/SKPhotoBrowser/SKLocalPhoto.swift index f7736c0..4eb9bb2 100644 --- a/SKPhotoBrowser/SKLocalPhoto.swift +++ b/SKPhotoBrowser/SKLocalPhoto.swift @@ -15,7 +15,7 @@ public class SKLocalPhoto: NSObject, SKPhotoProtocol { public var photoURL: String! public var shouldCachePhotoURLImage: Bool = false public var caption: String! - public var index: Int? + public var index: Int = 0 override init() { super.init() diff --git a/SKPhotoBrowser/SKPhoto.swift b/SKPhotoBrowser/SKPhoto.swift index 5acff7c..b8aef3e 100644 --- a/SKPhotoBrowser/SKPhoto.swift +++ b/SKPhotoBrowser/SKPhoto.swift @@ -8,10 +8,10 @@ import UIKit -public protocol SKPhotoProtocol: NSObjectProtocol { +@objc public protocol SKPhotoProtocol: NSObjectProtocol { var underlyingImage: UIImage! { get } var caption: String! { get } - var index: Int? { get set} + var index: Int { get set} func loadUnderlyingImageAndNotify() func checkCache() } @@ -23,7 +23,7 @@ public class SKPhoto: NSObject, SKPhotoProtocol { public var photoURL: String! public var shouldCachePhotoURLImage: Bool = false public var caption: String! - public var index: Int? + public var index: Int = 0 override init() { super.init()