Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions AKPickerView/AKPickerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ private class AKCollectionViewLayout: UICollectionViewFlowLayout {
let visibleRect = CGRect(origin: self.collectionView!.contentOffset, size: self.collectionView!.bounds.size)
self.midX = visibleRect.midX;
self.width = visibleRect.width / 2;
self.maxAngle = CGFloat(M_PI_2);
self.maxAngle = CGFloat(Double.pi/2);
}

fileprivate override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {
Expand All @@ -152,7 +152,7 @@ private class AKCollectionViewLayout: UICollectionViewFlowLayout {
return attributes
case .wheel:
let distance = attributes.frame.midX - self.midX;
let currentAngle = self.maxAngle * distance / self.width / CGFloat(M_PI_2);
let currentAngle = self.maxAngle * distance / self.width / CGFloat(Double.pi/2);
var transform = CATransform3DIdentity;
transform = CATransform3DTranslate(transform, -distance, 0, -self.width);
transform = CATransform3DRotate(transform, currentAngle, 0, 1, 0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
Expand Down Expand Up @@ -30,6 +40,16 @@
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
Expand Down Expand Up @@ -59,6 +79,11 @@
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
Expand Down