Skip to content

Commit

Permalink
2.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
efremidze committed Jun 16, 2018
1 parent a41950e commit ca1bf29
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 9 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## [Version 2.2.5](https://github.com/efremidze/Cluster/releases/tag/2.2.5)
Released on 2018-06-15

- Updated configuration

## [Version 2.2.4](https://github.com/efremidze/Cluster/releases/tag/2.2.4)
Released on 2018-06-15

Expand Down
2 changes: 1 addition & 1 deletion Cluster.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'Cluster'
s.version = '2.2.4'
s.version = '2.2.5'
s.summary = 'Map Clustering Library'
s.homepage = 'https://github.com/efremidze/Cluster'
s.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
7 changes: 4 additions & 3 deletions Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ extension ViewController: MKMapViewDelegate {
var view = mapView.dequeueReusableAnnotationView(withIdentifier: identifier)
if let view = view as? BorderedClusterAnnotationView {
view.annotation = annotation
view.configure(with: style)
view.style = style
view.configure()
} else {
view = BorderedClusterAnnotationView(annotation: annotation, reuseIdentifier: identifier, style: style, borderColor: .white)
}
Expand Down Expand Up @@ -132,8 +133,8 @@ class BorderedClusterAnnotationView: ClusterAnnotationView {
fatalError("init(coder:) has not been implemented")
}

override func configure(with style: ClusterAnnotationStyle) {
super.configure(with: style)
override func configure() {
super.configure()

switch style {
case .image:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ var style: ClusterAnnotationStyle // The style of the cluster annotation view.
You can further customize the annotations by subclassing `ClusterAnnotationView` and overriding `configure`:

```swift
override func configure(with style: ClusterAnnotationStyle) {
super.configure(with: style)
override func configure() {
super.configure()

// customize
}
Expand Down
10 changes: 8 additions & 2 deletions Sources/Annotation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ open class ClusterAnnotationView: MKAnnotationView {
/**
The style of the cluster annotation view.
*/
public private(set) var style: ClusterAnnotationStyle
public var style: ClusterAnnotationStyle

/**
Initializes and returns a new cluster annotation view.
Expand All @@ -86,14 +86,20 @@ open class ClusterAnnotationView: MKAnnotationView {
public init(annotation: MKAnnotation?, reuseIdentifier: String?, style: ClusterAnnotationStyle) {
self.style = style
super.init(annotation: annotation, reuseIdentifier: reuseIdentifier)
configure(with: style)
configure()
}

required public init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}

@available(iOS, deprecated: 2.2.5, message:"Use configure()")
open func configure(with style: ClusterAnnotationStyle) {
self.style = style
configure()
}

open func configure() {
guard let annotation = annotation as? ClusterAnnotation else { return }

switch style {
Expand Down
2 changes: 1 addition & 1 deletion Sources/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>2.2.4</string>
<string>2.2.5</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down

0 comments on commit ca1bf29

Please sign in to comment.