Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Fixed a bug where highlightedFont value was ignored on selection. I… #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions AKPickerView/AKPickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ private class AKCollectionViewCell: UICollectionViewCell {
var imageView: UIImageView!
var font = UIFont.systemFontOfSize(UIFont.systemFontSize())
var highlightedFont = UIFont.systemFontOfSize(UIFont.systemFontSize())
var _selected: Bool = false {
didSet(selected) {
override var selected: Bool {
didSet {
let animation = CATransition()
animation.type = kCATransitionFade
animation.duration = 0.15
Expand Down Expand Up @@ -162,7 +162,7 @@ private class AKCollectionViewLayout: UICollectionViewFlowLayout {
return attributes;
}
}

return nil
}

Expand Down Expand Up @@ -534,7 +534,7 @@ public class AKPickerView: UIView, UICollectionViewDataSource, UICollectionViewD
} else if let image = self.dataSource?.pickerView?(self, imageForItem: indexPath.item) {
cell.imageView.image = image
}
cell._selected = (indexPath.item == self.selectedItem)
cell.selected = (indexPath.item == self.selectedItem)
return cell
}

Expand Down Expand Up @@ -602,6 +602,4 @@ public class AKPickerView: UIView, UICollectionViewDataSource, UICollectionViewD
private func pickerViewStyleForCollectionViewLayout(layout: AKCollectionViewLayout) -> AKPickerViewStyle {
return self.pickerViewStyle
}

}