Skip to content

Commit

Permalink
Move default highlight view onto the top of imageView.
Browse files Browse the repository at this point in the history
  • Loading branch information
WenchaoD committed May 23, 2017
1 parent 6d05ecd commit b7e5d9f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion FSPagerView.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "FSPagerView"
s.version = "0.5.2"
s.version = "0.5.3"
s.summary = "FSPagerView is an elegant Screen Slide Library for making Banner、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders."

s.homepage = "https://github.com/WenchaoD/FSPagerView"
Expand Down
2 changes: 1 addition & 1 deletion FSPagerView/FSPagerView/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>0.5.2</string>
<string>0.5.3</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down
9 changes: 6 additions & 3 deletions Sources/FSPagerViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ open class FSPagerViewCell: UICollectionViewCell {

fileprivate weak var _selectedForegroundView: UIView?
fileprivate var selectedForegroundView: UIView? {
if let _ = _selectedForegroundView {
guard _selectedForegroundView == nil else {
return _selectedForegroundView
}
let view = UIView(frame: self.contentView.bounds)
self.contentView.addSubview(view)
guard let imageView = _imageView else {
return nil
}
let view = UIView(frame: imageView.bounds)
imageView.addSubview(view)
_selectedForegroundView = view
return view
}
Expand Down

0 comments on commit b7e5d9f

Please sign in to comment.