Merge branch 'master' of github.com:suzuki-0000/SKPhotoBrowser into feature/#137
This commit is contained in:
commit
2dce338349
24
CHANGELOG.md
24
CHANGELOG.md
|
|
@ -1,11 +1,13 @@
|
|||
# Change Log
|
||||
|
||||
## 3.0.1 2016-9
|
||||
## 3.0.1
|
||||
|
||||
Released on 9-2016
|
||||
|
||||
#### Fixed
|
||||
- Skip loading image if already loaded #135
|
||||
|
||||
Released on 2016-8
|
||||
Released on 8-2016
|
||||
|
||||
#### Some Interface is removed, changed this version.
|
||||
- status bar handling is removed.
|
||||
|
|
@ -27,7 +29,7 @@ Released on 2016-8
|
|||
- Some public property to internal for improving
|
||||
|
||||
## 2.0.x
|
||||
Released on 2016-8
|
||||
Released on 8-2016
|
||||
|
||||
#### Added
|
||||
- Migrate UIImage cache category to new SKCache
|
||||
|
|
@ -41,7 +43,7 @@ Released on 2016-8
|
|||
---
|
||||
|
||||
## 1.9.x
|
||||
Released on 2016-6
|
||||
Released on 6-2016
|
||||
|
||||
#### Added
|
||||
- Delegate to notify when the user scroll to an index
|
||||
|
|
@ -54,7 +56,7 @@ Released on 2016-6
|
|||
---
|
||||
|
||||
## 1.8.x
|
||||
Released on 2016-4
|
||||
Released on 4-2016
|
||||
|
||||
#### Added
|
||||
- Using SKPhotoProtocol to enable usage from SKLocalPhoto
|
||||
|
|
@ -69,7 +71,7 @@ Released on 2016-4
|
|||
---
|
||||
|
||||
## 1.7.x
|
||||
Released on 2016-3
|
||||
Released on 3-2016
|
||||
|
||||
#### Added
|
||||
- Enable ability to override statusBar style
|
||||
|
|
@ -104,7 +106,7 @@ Released on 2016-3
|
|||
---
|
||||
|
||||
## 1.4.x
|
||||
Released on 2016-2
|
||||
Released on 2-2016
|
||||
|
||||
#### Added
|
||||
- Delegate add for actionbutton.
|
||||
|
|
@ -116,7 +118,7 @@ Released on 2016-2
|
|||
---
|
||||
|
||||
## 1.3.x
|
||||
Released on 2016-1
|
||||
Released on 1-2016
|
||||
|
||||
#### Added
|
||||
- Added action functionality similar to IDMPhotoBrowser.
|
||||
|
|
@ -129,7 +131,7 @@ Released on 2016-1
|
|||
---
|
||||
|
||||
## 1.2.x
|
||||
Released on 2015-10
|
||||
Released on 10-2015
|
||||
|
||||
#### Added
|
||||
- SKPhotoProtocol is implemented.
|
||||
|
|
@ -140,12 +142,12 @@ Released on 2015-10
|
|||
---
|
||||
|
||||
## 1.1.x
|
||||
Released on 2015-10-09.
|
||||
Released on 10-2015
|
||||
|
||||
#### Fixed
|
||||
- some property make private.
|
||||
- layout bug fixed when zoom.
|
||||
|
||||
## 1.0.0
|
||||
Released on 2015-10-09.
|
||||
Released on 10-2015
|
||||
|
||||
|
|
|
|||
|
|
@ -34,8 +34,15 @@ class SKButton: UIButton {
|
|||
inBundle: bundle, compatibleWithTraitCollection: nil) ?? UIImage()
|
||||
setImage(image, forState: .Normal)
|
||||
}
|
||||
|
||||
func updateFrame() {}
|
||||
|
||||
func updateFrame() { }
|
||||
|
||||
func setFrameSize(size: CGSize) {
|
||||
let newRect = CGRect(x: margin, y: buttonTopOffset, width: size.width, height: size.height)
|
||||
self.frame = newRect
|
||||
showFrame = newRect
|
||||
hideFrame = CGRect(x: margin, y: -20, width: size.width, height: size.height)
|
||||
}
|
||||
}
|
||||
|
||||
class SKCloseButton: SKButton {
|
||||
|
|
@ -64,12 +71,17 @@ class SKDeleteButton: SKButton {
|
|||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
setup(imageName)
|
||||
showFrame = CGRect(x: SKMesurement.screenWidth - size.width, y: buttonTopOffset,
|
||||
width: size.width, height: size.height)
|
||||
hideFrame = CGRect(x: SKMesurement.screenWidth - size.width, y: -20,
|
||||
width: size.width, height: size.height)
|
||||
showFrame = CGRect(x: SKMesurement.screenWidth - size.width, y: buttonTopOffset, width: size.width, height: size.height)
|
||||
hideFrame = CGRect(x: SKMesurement.screenWidth - size.width, y: -20, width: size.width, height: size.height)
|
||||
}
|
||||
|
||||
override func updateFrame() {
|
||||
}
|
||||
|
||||
override func setFrameSize(size: CGSize) {
|
||||
let newRect = CGRect(x: SKMesurement.screenWidth - size.width, y: buttonTopOffset, width: size.width, height: size.height)
|
||||
self.frame = newRect
|
||||
showFrame = newRect
|
||||
hideFrame = CGRect(x: SKMesurement.screenWidth - size.width, y: -20, width: size.width, height: size.height)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -222,18 +222,26 @@ public class SKPhotoBrowser: UIViewController {
|
|||
// MARK: - Public Function For Customizing Buttons
|
||||
|
||||
public extension SKPhotoBrowser {
|
||||
func updateCloseButton(image: UIImage) {
|
||||
func updateCloseButton(image: UIImage, size: CGSize? = nil) {
|
||||
if closeButton == nil {
|
||||
configureCloseButton()
|
||||
}
|
||||
closeButton.setImage(image, forState: .Normal)
|
||||
}
|
||||
|
||||
func updateDeleteButton(image: UIImage) {
|
||||
if let size = size {
|
||||
closeButton.setFrameSize(size)
|
||||
}
|
||||
}
|
||||
|
||||
func updateDeleteButton(image: UIImage, size: CGSize? = nil) {
|
||||
if deleteButton == nil {
|
||||
configureDeleteButton()
|
||||
}
|
||||
deleteButton.setImage(image, forState: .Normal)
|
||||
|
||||
if let size = size {
|
||||
deleteButton.setFrameSize(size)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue