Skip to content

Commit

Permalink
[update]some delegate goes to optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki_keishi committed Feb 22, 2016
1 parent 323bc65 commit 0d6b88b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
disabled_rules:
- type_body_length
- line_length
- trailing_newline
- trailing_whitespace
Expand All @@ -14,6 +15,6 @@ excluded:

variable_name_min_length: 1
variable_name_max_length: 40
function_body_length: 300
function_body_length: 350
file_length: 800
type_body_length: 800
2 changes: 1 addition & 1 deletion SKPhotoBrowser.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "SKPhotoBrowser"
s.version = "1.4.1"
s.version = "1.4.2"
s.summary = "Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift2.0."
s.homepage = "https://github.com/suzuki-0000/SKPhotoBrowser"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down
4 changes: 2 additions & 2 deletions SKPhotoBrowser/SKPhotoBrowser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit

@objc public protocol SKPhotoBrowserDelegate {
func didShowPhotoAtIndex(index: Int)
optional func didShowPhotoAtIndex(index: Int)
optional func willDismissAtPageIndex(index: Int)
optional func willShowActionSheet(photoIndex: Int)
optional func didDismissAtPageIndex(index: Int)
Expand Down Expand Up @@ -709,7 +709,7 @@ public class SKPhotoBrowser: UIViewController, UIScrollViewDelegate, UIActionShe
}

private func didStartViewingPageAtIndex(index: Int) {
delegate?.didShowPhotoAtIndex(index)
delegate?.didShowPhotoAtIndex?(index)
}

private func captionViewForPhotoAtIndex(index: Int) -> SKCaptionView? {
Expand Down

0 comments on commit 0d6b88b

Please sign in to comment.