Move default highlight view onto the top of imageView.

This commit is contained in:
WenchaoD 2017-05-23 11:29:50 +08:00
parent 6d05ecd7a8
commit b7e5d9fd9d
3 changed files with 8 additions and 5 deletions

View File

@ -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"

View File

@ -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>

View File

@ -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
}