Skip to content

Commit

Permalink
fix bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
horitaku46 committed Dec 17, 2017
1 parent d6a69c1 commit b68b41a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
33 changes: 33 additions & 0 deletions Serrata.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
Pod::Spec.new do |s|
s.name = "Serrata"
s.version = "1.0.0"
s.summary = "Slide image viewer library similar to twitter and LINE"

s.description = <<-DESC
You can use it simply by passing the necessary information.
It is a UI library that allows you to intuitively view images.
Kingfisher is a lightweight and pure Swift implemented library.
Kingfisher is used in the Serrata. I sincerely respect Kingfisher.
DESC

s.homepage = "https://github.com/horitaku46/Serrata"
s.license = { :type => "MIT", :file => "./LICENSE" }

s.author = { "Takuma Horiuchi" => "horitaku46@gmail.com" }
s.social_media_url = "https://twitter.com/horitaku_"

s.platform = :ios, "10.0"
s.source = { :git => "https://github.com/horitaku46/Serrata.git", :tag => "#{s.version}" }

s.ios.deployment_target = '10.0'

s.source_files = "Serrata/**/*"
s.resource_bundles = {
"Serrata" => ["Serrata/**/*"]
}

s.dependency "Kingfisher"
end
5 changes: 3 additions & 2 deletions Serrata/Sources/ImageDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ open class ImageDetailView: UIView {

@IBOutlet weak private var closeButton: UIButton! { // UIButtonType = custom
didSet {
closeButton.setImage(UIImage(named: "close_cross"), for: .normal)
closeButton.setImage(UIImage(named: "close_cross"), for: .highlighted)
let closeImage = UIImage(named: "close_cross", in: Bundle(for: ImageDetailView.self), compatibleWith: nil)
closeButton.setImage(closeImage, for: .normal)
closeButton.setImage(closeImage, for: .highlighted)
closeButton.layer.cornerRadius = closeButton.bounds.height / 2
closeButton.backgroundColor = UIColor(white: 0, alpha: ImageDetailConst.maxAlpha)
}
Expand Down
4 changes: 2 additions & 2 deletions Serrata/Sources/SlideLeafViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fileprivate enum SlideLeafConst {

@IBOutlet weak private var collectionView: UICollectionView! {
didSet {
collectionView.register(UINib(nibName: "SlideLeafCell", bundle: nil), forCellWithReuseIdentifier: "SlideLeafCell")
collectionView.register(UINib(nibName: "SlideLeafCell", bundle: Bundle(for: SlideLeaf.self)), forCellWithReuseIdentifier: "SlideLeafCell")
collectionView.isPagingEnabled = true
collectionView.backgroundColor = .clear
collectionView.showsHorizontalScrollIndicator = false
Expand Down Expand Up @@ -113,7 +113,7 @@ fileprivate enum SlideLeafConst {
private var isDecideDissmiss = false

open class func make(leafs: [SlideLeaf], startIndex: Int = 0, fromImageView: UIImageView? = nil) -> SlideLeafViewController {
let viewController = UIStoryboard(name: "SlideLeafViewController", bundle: nil)
let viewController = UIStoryboard(name: "SlideLeafViewController", bundle: Bundle(for: SlideLeafViewController.self))
.instantiateViewController(withIdentifier: "SlideLeafViewController") as! SlideLeafViewController
viewController.transitioningDelegate = viewController.serrataTransition
viewController.slideLeafs = leafs
Expand Down

0 comments on commit b68b41a

Please sign in to comment.