├── .gitignore ├── .travis.yml ├── Donut.podspec ├── Donut ├── DonutView.swift ├── DonutViewCell.swift └── UIViewAnimationOptionsExtension.swift ├── Example ├── Donut.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── Donut.xcworkspace │ └── contents.xcworkspacedata ├── Donut │ ├── AppDelegate.swift │ ├── Base.lproj │ │ └── LaunchScreen.xib │ ├── Controller │ │ ├── ConfigViewController.swift │ │ └── PreviewViewController.swift │ ├── Donut.h │ ├── Images.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Cards │ │ │ ├── 01_windy.imageset │ │ │ │ ├── 01_windy-1.png │ │ │ │ ├── 01_windy-2.png │ │ │ │ ├── 01_windy.png │ │ │ │ └── Contents.json │ │ │ ├── 02_fly.imageset │ │ │ │ ├── 02_fly-1.png │ │ │ │ ├── 02_fly-2.png │ │ │ │ ├── 02_fly.png │ │ │ │ └── Contents.json │ │ │ ├── 03_shadow.imageset │ │ │ │ ├── 03_shadow-1.png │ │ │ │ ├── 03_shadow-2.png │ │ │ │ ├── 03_shadow.png │ │ │ │ └── Contents.json │ │ │ ├── 04_watery.imageset │ │ │ │ ├── 04_watery-1.png │ │ │ │ ├── 04_watery-2.png │ │ │ │ ├── 04_watery.png │ │ │ │ └── Contents.json │ │ │ ├── 05_wood.imageset │ │ │ │ ├── 05_wood-1.png │ │ │ │ ├── 05_wood-2.png │ │ │ │ ├── 05_wood.png │ │ │ │ └── Contents.json │ │ │ ├── 06_wind.imageset │ │ │ │ ├── 06_wind-1.png │ │ │ │ ├── 06_wind-2.png │ │ │ │ ├── 06_wind.png │ │ │ │ └── Contents.json │ │ │ ├── 07_jump.imageset │ │ │ │ ├── 07_jump-1.png │ │ │ │ ├── 07_jump-2.png │ │ │ │ ├── 07_jump.png │ │ │ │ └── Contents.json │ │ │ ├── 08_illusion.imageset │ │ │ │ ├── 08_illusion-1.png │ │ │ │ ├── 08_illusion-2.png │ │ │ │ ├── 08_illusion.png │ │ │ │ └── Contents.json │ │ │ ├── 09_silent.imageset │ │ │ │ ├── 09_silent-1.png │ │ │ │ ├── 09_silent-2.png │ │ │ │ ├── 09_silent.png │ │ │ │ └── Contents.json │ │ │ ├── 10_thunder.imageset │ │ │ │ ├── 10_thunder-1.png │ │ │ │ ├── 10_thunder-2.png │ │ │ │ ├── 10_thunder.png │ │ │ │ └── Contents.json │ │ │ ├── 11_sword.imageset │ │ │ │ ├── 11_sword-1.png │ │ │ │ ├── 11_sword-2.png │ │ │ │ ├── 11_sword.png │ │ │ │ └── Contents.json │ │ │ ├── 12_flower.imageset │ │ │ │ ├── 12_flower-1.png │ │ │ │ ├── 12_flower-2.png │ │ │ │ ├── 12_flower.png │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── img_bg.imageset │ │ │ ├── Contents.json │ │ │ ├── img_bg-1.png │ │ │ ├── img_bg-2.png │ │ │ └── img_bg.png │ │ ├── img_bg2.imageset │ │ │ ├── Contents.json │ │ │ ├── スクリーンショット 2017-09-12 14.22.28-1.png │ │ │ ├── スクリーンショット 2017-09-12 14.22.28-2.png │ │ │ └── スクリーンショット 2017-09-12 14.22.28.png │ │ ├── img_bg3.imageset │ │ │ ├── 147992-aleni-1.png │ │ │ ├── 147992-aleni-2.png │ │ │ ├── 147992-aleni.png │ │ │ └── Contents.json │ │ ├── img_bg4.imageset │ │ │ ├── Contents.json │ │ │ ├── img_1-1.png │ │ │ ├── img_1-2.png │ │ │ └── img_1.png │ │ ├── img_bg5.imageset │ │ │ ├── 5536339adb03994032eb63ad0289e6d8-1.png │ │ │ ├── 5536339adb03994032eb63ad0289e6d8-2.png │ │ │ ├── 5536339adb03994032eb63ad0289e6d8.png │ │ │ └── Contents.json │ │ └── img_bg6.imageset │ │ │ ├── 503e54f56ce3538da19e0c731680fcf3-1.jpg │ │ │ ├── 503e54f56ce3538da19e0c731680fcf3-2.jpg │ │ │ ├── 503e54f56ce3538da19e0c731680fcf3.jpg │ │ │ └── Contents.json │ ├── Info.plist │ ├── Main.storyboard │ ├── Manager │ │ └── ConfigManager.swift │ └── View │ │ ├── ClowCardCell.swift │ │ ├── ClowCardCell.xib │ │ ├── SegmentTableViewCell.swift │ │ ├── SegmentTableViewCell.xib │ │ ├── SwitchTableViewCell.swift │ │ └── SwitchTableViewCell.xib ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── Donut.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Donut.xcscheme │ └── Target Support Files │ │ ├── Donut │ │ ├── Donut-dummy.m │ │ ├── Donut-prefix.pch │ │ ├── Donut-umbrella.h │ │ ├── Donut.modulemap │ │ ├── Donut.xcconfig │ │ └── Info.plist │ │ ├── Pods-Donut_Example │ │ ├── Info.plist │ │ ├── Pods-Donut_Example-acknowledgements.markdown │ │ ├── Pods-Donut_Example-acknowledgements.plist │ │ ├── Pods-Donut_Example-dummy.m │ │ ├── Pods-Donut_Example-frameworks.sh │ │ ├── Pods-Donut_Example-resources.sh │ │ ├── Pods-Donut_Example-umbrella.h │ │ ├── Pods-Donut_Example.debug.xcconfig │ │ ├── Pods-Donut_Example.modulemap │ │ └── Pods-Donut_Example.release.xcconfig │ │ └── Pods-Donut_Tests │ │ ├── Info.plist │ │ ├── Pods-Donut_Tests-acknowledgements.markdown │ │ ├── Pods-Donut_Tests-acknowledgements.plist │ │ ├── Pods-Donut_Tests-dummy.m │ │ ├── Pods-Donut_Tests-frameworks.sh │ │ ├── Pods-Donut_Tests-resources.sh │ │ ├── Pods-Donut_Tests-umbrella.h │ │ ├── Pods-Donut_Tests.debug.xcconfig │ │ ├── Pods-Donut_Tests.modulemap │ │ └── Pods-Donut_Tests.release.xcconfig └── Tests │ ├── Info.plist │ └── Tests.swift ├── LICENSE ├── README.md └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | osx_image: xcode7.3 6 | language: objective-c 7 | # cache: cocoapods 8 | # podfile: Example/Podfile 9 | # before_install: 10 | # - gem install cocoapods # Since Travis is not always on latest version 11 | # - pod install --project-directory=Example 12 | script: 13 | - set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/Donut.xcworkspace -scheme Donut-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty 14 | - pod lib lint 15 | -------------------------------------------------------------------------------- /Donut.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'Donut' 3 | s.version = '1.0.1' 4 | s.summary = 'Donut is a library for arranging views circularly like a donut.' 5 | 6 | s.description = <<-DESC 7 | Donut is a library for arranging views circularly like a donut. 8 | 9 | You can use it so easily, and it will be a wonderful experience for you. 10 | 11 | This library is inspired by EMCarousel. 12 | DESC 13 | 14 | s.homepage = 'https://github.com/cokaholic/Donut' 15 | s.license = { :type => 'MIT', :file => 'LICENSE' } 16 | s.author = { 'Keisuke Tatsumi' => 'nietzsche.god.is.dead@gmail.com' } 17 | s.source = { :git => 'https://github.com/cokaholic/Donut.git', :tag => s.version.to_s } 18 | s.social_media_url = 'https://twitter.com/TK_u_nya' 19 | 20 | s.ios.deployment_target = '9.0' 21 | 22 | s.source_files = 'Donut/**/*' 23 | end 24 | -------------------------------------------------------------------------------- /Donut/DonutView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DonutView.swift 3 | // Donut 4 | // 5 | // Created by Keisuke Tatsumi on 2017/07/06. 6 | // Copyright © 2017 Keisuke Tatsumi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @objc public protocol DonutViewDelegate: NSObjectProtocol { 12 | @objc optional func donutView(_ donutView: DonutView, didChangeCenter cell: DonutViewCell) 13 | @objc optional func donutView(_ donutView: DonutView, didSelect cell: DonutViewCell) 14 | } 15 | 16 | open class DonutView: UIView { 17 | 18 | weak open var delegate: DonutViewDelegate? 19 | 20 | private var inclinationAngleX: CGFloat = 0.0 21 | private var inclinationAngleZ: CGFloat = 0.0 22 | private var frontCellAlpha: CGFloat = 1.0 23 | private var backCellAlpha: CGFloat = 0.7 24 | private var isSelectableCell = true 25 | private var isCellAlignmentCenter = true 26 | private var isBackCellInteractionEnabled = false 27 | private var isOnlyCellInteractionEnabled = true 28 | private var animationCurve: UIViewAnimationCurve = .linear 29 | 30 | private var cells: [DonutViewCell] = [] 31 | private var isSingleTap = false 32 | private var startPosition: CGFloat = 0.0 33 | private var separationAngle: CGFloat = 0.0 34 | private var radius: CGFloat = 0.0 35 | private var centerDiff: CGPoint = CGPoint(x: 0, y: 0) 36 | 37 | override init(frame: CGRect) { 38 | super.init(frame: frame) 39 | setUpInitialState() 40 | } 41 | 42 | required public init?(coder aDecoder: NSCoder) { 43 | super.init(coder: aDecoder) 44 | setUpInitialState() 45 | } 46 | 47 | // MARK: - Public Functions 48 | 49 | public func setSelectedCellAndCenter(_ cell: DonutViewCell) { 50 | if cell.angle >= .pi { 51 | moveDonut(angleOffset: -(cell.angle - (2.0 * .pi))) 52 | } else { 53 | moveDonut(angleOffset: -cell.angle) 54 | } 55 | } 56 | 57 | public func addCell(_ cell: DonutViewCell, animated: Bool = true) { 58 | DispatchQueue.main.async { [weak self] in 59 | guard let me = self else { return } 60 | me.layer.insertSublayer(cell.layer, at: UInt32(me.cells.count)) 61 | cell.layer.position = CGPoint(x: me.frame.width / 2.0 + me.centerDiff.x, y: me.frame.height / 2.0 + me.centerDiff.y) 62 | me.cells.append(cell) 63 | me.refreshCellsPosition(animated: animated) 64 | } 65 | } 66 | 67 | public func addCells(_ cells: [DonutViewCell], animated: Bool = true) { 68 | cells.forEach { [weak self] cell in 69 | self?.addCell(cell, animated: animated) 70 | } 71 | } 72 | 73 | public func removeCell(_ cell: DonutViewCell) { 74 | guard let index: Int = cells.index(of: cell) else { return } 75 | DispatchQueue.main.async { [weak self] in 76 | guard let me = self else { return } 77 | cell.layer.removeFromSuperlayer() 78 | me.cells.remove(at: index) 79 | me.refreshCellsPosition(animated: true) 80 | } 81 | } 82 | 83 | public func removeAllCells(animated: Bool = true) { 84 | DispatchQueue.main.async { [weak self] in 85 | guard let me = self else { return } 86 | me.cells.forEach { [weak self] cell in 87 | cell.layer.removeFromSuperlayer() 88 | self?.refreshCellsPosition(animated: animated) 89 | } 90 | me.cells.removeAll() 91 | } 92 | } 93 | 94 | // default value is x: 0.0, z: 0.0 95 | public func setCarouselInclination(angleX: CGFloat = 0.0, angleZ: CGFloat = 0.0) { 96 | inclinationAngleX = angleX 97 | inclinationAngleZ = angleZ 98 | } 99 | 100 | // default value is 1.0 101 | public func setFrontCellAlpha(_ alpha: CGFloat) { 102 | if alpha >= 0.0 && alpha <= 1.0 { 103 | frontCellAlpha = alpha 104 | } 105 | } 106 | 107 | // default value is 0.7 108 | public func setBackCellAlpha(_ alpha: CGFloat) { 109 | if alpha >= 0.0 && alpha <= 1.0 { 110 | backCellAlpha = alpha 111 | } 112 | } 113 | 114 | // default is (0, 0) 115 | public func setCenterDiff(_ centerDiff: CGPoint) { 116 | self.centerDiff = centerDiff 117 | } 118 | 119 | // default value is true 120 | public func setSelectableCell(_ isSelectableCell: Bool) { 121 | self.isSelectableCell = isSelectableCell 122 | } 123 | 124 | // default value is true 125 | public func setCellAlignmentCenter(_ isCellAlignmentCenter: Bool) { 126 | self.isCellAlignmentCenter = isCellAlignmentCenter 127 | } 128 | 129 | // default value is false 130 | public func setBackCellInteractionEnabled(_ enabled: Bool) { 131 | isBackCellInteractionEnabled = enabled 132 | } 133 | 134 | // default value is true 135 | public func setOnlyCellInteractionEnabled(_ enabled: Bool) { 136 | isOnlyCellInteractionEnabled = enabled 137 | } 138 | 139 | // default value is .linear 140 | public func setAnimationCurve(_ animationCurve: UIViewAnimationCurve) { 141 | self.animationCurve = animationCurve 142 | } 143 | 144 | public func getCellAtIndex(_ index: Int) -> DonutViewCell? { 145 | if cells.count == 0 { 146 | return nil 147 | } 148 | return circularObject(cells: cells, index: index) 149 | } 150 | 151 | public func getCells() -> [DonutViewCell] { 152 | return cells 153 | } 154 | 155 | // MARK: - UIResponder Functions 156 | 157 | open override func touchesBegan(_ touches: Set, with event: UIEvent?) { 158 | guard let touchEvent = touches.first else { return } 159 | let targetPoint = touchEvent.location(in: self) 160 | guard let targetLayer = layer.hitTest(targetPoint) else { return } 161 | let targetCell = findCellOnScreen(targetLayer: targetLayer) 162 | 163 | if isCellPositionBack(angle: targetCell?.angle) && !isBackCellInteractionEnabled { 164 | return 165 | } 166 | 167 | if targetCell == nil && isOnlyCellInteractionEnabled { 168 | return 169 | } 170 | 171 | startPosition = targetPoint.x 172 | 173 | isSingleTap = touchEvent.tapCount == 1 174 | } 175 | 176 | open override func touchesMoved(_ touches: Set, with event: UIEvent?) { 177 | 178 | guard let touchEvent = touches.first else { return } 179 | let targetPoint = touchEvent.location(in: self) 180 | guard let targetLayer = layer.hitTest(targetPoint) else { return } 181 | let targetCell = findCellOnScreen(targetLayer: targetLayer) 182 | 183 | if isCellPositionBack(angle: targetCell?.angle) && !isBackCellInteractionEnabled { 184 | return 185 | } 186 | 187 | if targetCell == nil && isOnlyCellInteractionEnabled { 188 | return 189 | } 190 | 191 | let movedPoint = touchEvent.location(in: self) 192 | let offset = startPosition - movedPoint.x 193 | if offset != 0 { 194 | isSingleTap = false 195 | } 196 | let offsetToMove = -atan(offset / radius) 197 | 198 | startPosition = movedPoint.x 199 | 200 | moveDonut(angleOffset: offsetToMove) 201 | } 202 | 203 | open override func touchesEnded(_ touches: Set, with event: UIEvent?) { 204 | 205 | guard let touchEvent = touches.first else { return } 206 | let targetPoint = touchEvent.location(in: self) 207 | guard let targetLayer = layer.hitTest(targetPoint) else { return } 208 | let targetCell = findCellOnScreen(targetLayer: targetLayer) 209 | 210 | if isCellPositionBack(angle: targetCell?.angle) && !isBackCellInteractionEnabled { 211 | return 212 | } 213 | 214 | if targetCell == nil && isOnlyCellInteractionEnabled { 215 | if isCellAlignmentCenter, let selectedCell = getSelectedCell() { 216 | setSelectedCellAndCenter(selectedCell) 217 | } 218 | return 219 | } 220 | 221 | if isSingleTap && isSelectableCell { 222 | if let targetCell = targetCell { 223 | setSelectedCellAndCenter(targetCell) 224 | delegate?.donutView?(self, didSelect: targetCell) 225 | delegate?.donutView?(self, didChangeCenter: targetCell) 226 | } 227 | } else { 228 | if isCellAlignmentCenter, let selectedCell = getSelectedCell() { 229 | setSelectedCellAndCenter(selectedCell) 230 | } 231 | } 232 | 233 | isSingleTap = false 234 | } 235 | 236 | // MARK: - Private Functions 237 | 238 | private func setUpInitialState() { 239 | 240 | isUserInteractionEnabled = true 241 | autoresizesSubviews = true 242 | clipsToBounds = true 243 | } 244 | 245 | private func refreshCellsPosition(animated: Bool) { 246 | if cells.count == 0 { 247 | return 248 | } 249 | 250 | let cellView = cells[0] 251 | 252 | radius = (cellView.bounds.size.width / 2.0) / tan(.pi / CGFloat(cells.count)) 253 | separationAngle = (2.0 * .pi) / CGFloat(cells.count) 254 | 255 | if animated { 256 | UIView.beginAnimations(nil, context: nil) 257 | UIView.setAnimationCurve(animationCurve) 258 | UIView.setAnimationBeginsFromCurrentState(true) 259 | } 260 | 261 | var angle: CGFloat = 0.0 262 | for cell in cells { 263 | cell.setCellAngle(angle) 264 | cell.layer.anchorPoint = CGPoint(x: 0.5, y: 0.5) 265 | cell.layer.anchorPointZ = -radius 266 | cell.layer.transform = CATransform3DMakeRotation(cell.angle, 0, 1, 0) 267 | cell.layer.transform = CATransform3DConcat(cell.layer.transform, CATransform3DMakeRotation(inclinationAngleX, 1, 0, 0)) 268 | cell.layer.transform = CATransform3DConcat(cell.layer.transform, CATransform3DMakeRotation(inclinationAngleZ, 0, 0, 1)) 269 | cell.alpha = isCellPositionBack(angle: angle) ? backCellAlpha : frontCellAlpha 270 | 271 | angle += separationAngle 272 | } 273 | 274 | if animated { 275 | UIView.commitAnimations() 276 | } 277 | } 278 | 279 | private func findCellOnScreen(targetLayer: CALayer) -> DonutViewCell? { 280 | var foundCell: DonutViewCell? = nil 281 | 282 | for h in 0.. (2 * .pi) { 330 | cell.setCellAngle(cell.angle - (2.0 * .pi)) 331 | } 332 | while cell.angle < 0 { 333 | cell.setCellAngle(cell.angle + (2.0 * .pi)) 334 | } 335 | 336 | if cell.angle == 0 { 337 | me.delegate?.donutView?(me, didChangeCenter: cell) 338 | } 339 | }) 340 | } 341 | } 342 | 343 | private func getSelectedCell() -> DonutViewCell? { 344 | 345 | if cells.count == 0 { return nil } 346 | 347 | var minimumAngle: CGFloat = .pi 348 | var selectedCell: DonutViewCell? = nil 349 | 350 | for i in 0.. (2.0 * .pi) { 356 | angle = angle - (2.0 * .pi) 357 | } 358 | 359 | if angle < minimumAngle { 360 | minimumAngle = angle 361 | selectedCell = cell 362 | } 363 | } 364 | 365 | return selectedCell 366 | } 367 | 368 | private func isCellPositionBack(angle: CGFloat?) -> Bool { 369 | guard let angle = angle else { return false } 370 | if angle > .pi / 2.0 && angle < 1.5 * .pi { 371 | return true 372 | } 373 | return false 374 | } 375 | } 376 | 377 | // MARK: - For Circular 378 | 379 | extension DonutView { 380 | 381 | func circularObject(cells: [DonutViewCell], index: Int) -> DonutViewCell { 382 | 383 | var circularIndex = index 384 | while circularIndex < 0 { 385 | circularIndex = circularIndex + cells.count 386 | } 387 | return cells[circularIndex%cells.count] 388 | } 389 | 390 | func circularPreviousObject(cells: [DonutViewCell], cell: DonutViewCell) -> DonutViewCell? { 391 | 392 | guard let index = cells.index(of: cell) else { return nil } 393 | return circularObject(cells: cells, index: index - 1) 394 | } 395 | 396 | func circularNextObject(cells: [DonutViewCell], cell: DonutViewCell) -> DonutViewCell? { 397 | 398 | guard let index = cells.index(of: cell) else { return nil } 399 | return circularObject(cells: cells, index: index + 1) 400 | } 401 | } 402 | -------------------------------------------------------------------------------- /Donut/DonutViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DonutViewCell.swift 3 | // Donut 4 | // 5 | // Created by Keisuke Tatsumi on 2017/07/06. 6 | // Copyright © 2017 Keisuke Tatsumi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class DonutViewCell: UIView { 12 | 13 | private(set) var angle: CGFloat = 0.0 14 | 15 | override init(frame: CGRect) { 16 | super.init(frame: frame) 17 | isUserInteractionEnabled = true 18 | } 19 | 20 | required public init?(coder aDecoder: NSCoder) { 21 | super.init(coder: aDecoder) 22 | isUserInteractionEnabled = true 23 | } 24 | 25 | override open func draw(_ rect: CGRect) { 26 | let context = UIGraphicsGetCurrentContext() 27 | context?.setShouldAntialias(true) 28 | } 29 | 30 | // MARK: - Public Functions 31 | 32 | public func setCellAngle(_ angle: CGFloat) { 33 | self.angle = angle 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Donut/UIViewAnimationOptionsExtension.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewAnimationOptionsExtension.swift 3 | // TKCarouselView 4 | // 5 | // Created by Keisuke Tatsumi on 2017/09/12. 6 | // Copyright © 2017 Keisuke Tatsumi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension UIViewAnimationOptions { 12 | init(curve: UIViewAnimationCurve) { 13 | switch curve { 14 | case .easeIn: 15 | self = .curveEaseIn 16 | case .easeOut: 17 | self = .curveEaseOut 18 | case .easeInOut: 19 | self = .curveEaseInOut 20 | case .linear: 21 | self = .curveLinear 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Example/Donut.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 11 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 12 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 13 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 14 | 700003C2CBB161C5C7A67B3B /* Pods_Donut_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4DD01A15611F62A583DCAC09 /* Pods_Donut_Tests.framework */; }; 15 | AAAD7928E5216F470DF0723C /* Pods_Donut_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B63E04E20D48FF0639C479D4 /* Pods_Donut_Example.framework */; }; 16 | FF5102CF1F724FEF008CD6D9 /* ConfigManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF5102CE1F724FEF008CD6D9 /* ConfigManager.swift */; }; 17 | FF5102D21F725036008CD6D9 /* ClowCardCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF5102D01F725036008CD6D9 /* ClowCardCell.swift */; }; 18 | FF5102D31F725036008CD6D9 /* ClowCardCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = FF5102D11F725036008CD6D9 /* ClowCardCell.xib */; }; 19 | FF5102D51F725057008CD6D9 /* PreviewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF5102D41F725057008CD6D9 /* PreviewViewController.swift */; }; 20 | FFB4D0101F72AB9F007624F1 /* SegmentTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB4D00F1F72AB9F007624F1 /* SegmentTableViewCell.swift */; }; 21 | FFB4D0121F72ABB4007624F1 /* SegmentTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = FFB4D0111F72ABB4007624F1 /* SegmentTableViewCell.xib */; }; 22 | FFB4D0141F72BC47007624F1 /* SwitchTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB4D0131F72BC47007624F1 /* SwitchTableViewCell.swift */; }; 23 | FFB4D0161F72BC58007624F1 /* SwitchTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = FFB4D0151F72BC58007624F1 /* SwitchTableViewCell.xib */; }; 24 | FFB4D0181F72C446007624F1 /* ConfigViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFB4D0171F72C446007624F1 /* ConfigViewController.swift */; }; 25 | FFDB3E681F711D8C006941B4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FFDB3E671F711D8C006941B4 /* Main.storyboard */; }; 26 | /* End PBXBuildFile section */ 27 | 28 | /* Begin PBXContainerItemProxy section */ 29 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 34 | remoteInfo = Donut; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 09416353102B11FE59F3073F /* Pods-Donut_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Donut_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests.debug.xcconfig"; sourceTree = ""; }; 40 | 337B05780CC29DE47271F690 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 41 | 4DD01A15611F62A583DCAC09 /* Pods_Donut_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Donut_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 5C671613BB3B30501EC67D54 /* Pods-Donut_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Donut_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example.release.xcconfig"; sourceTree = ""; }; 43 | 607FACD01AFB9204008FA782 /* Donut_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Donut_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 46 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 47 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 48 | 607FACE51AFB9204008FA782 /* Donut_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Donut_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 51 | A3A0F30D9AB8CFA7E60F46D6 /* Pods-Donut_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Donut_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests.release.xcconfig"; sourceTree = ""; }; 52 | B63E04E20D48FF0639C479D4 /* Pods_Donut_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Donut_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | CE2D9A387E95AC62920C3D1A /* Donut.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Donut.podspec; path = ../Donut.podspec; sourceTree = ""; }; 54 | D1170FD600E83E278B82D2D2 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 55 | F5194B908C3A1AA2AE0898D1 /* Pods-Donut_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Donut_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example.debug.xcconfig"; sourceTree = ""; }; 56 | FF5102CE1F724FEF008CD6D9 /* ConfigManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ConfigManager.swift; path = Manager/ConfigManager.swift; sourceTree = ""; }; 57 | FF5102D01F725036008CD6D9 /* ClowCardCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ClowCardCell.swift; path = View/ClowCardCell.swift; sourceTree = ""; }; 58 | FF5102D11F725036008CD6D9 /* ClowCardCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ClowCardCell.xib; path = View/ClowCardCell.xib; sourceTree = ""; }; 59 | FF5102D41F725057008CD6D9 /* PreviewViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PreviewViewController.swift; path = Controller/PreviewViewController.swift; sourceTree = ""; }; 60 | FFB4D00F1F72AB9F007624F1 /* SegmentTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SegmentTableViewCell.swift; path = View/SegmentTableViewCell.swift; sourceTree = ""; }; 61 | FFB4D0111F72ABB4007624F1 /* SegmentTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = SegmentTableViewCell.xib; path = View/SegmentTableViewCell.xib; sourceTree = ""; }; 62 | FFB4D0131F72BC47007624F1 /* SwitchTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SwitchTableViewCell.swift; path = View/SwitchTableViewCell.swift; sourceTree = ""; }; 63 | FFB4D0151F72BC58007624F1 /* SwitchTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = SwitchTableViewCell.xib; path = View/SwitchTableViewCell.xib; sourceTree = ""; }; 64 | FFB4D0171F72C446007624F1 /* ConfigViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ConfigViewController.swift; path = Controller/ConfigViewController.swift; sourceTree = ""; }; 65 | FFDB3E671F711D8C006941B4 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; 66 | /* End PBXFileReference section */ 67 | 68 | /* Begin PBXFrameworksBuildPhase section */ 69 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | AAAD7928E5216F470DF0723C /* Pods_Donut_Example.framework in Frameworks */, 74 | ); 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | 700003C2CBB161C5C7A67B3B /* Pods_Donut_Tests.framework in Frameworks */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | /* End PBXFrameworksBuildPhase section */ 86 | 87 | /* Begin PBXGroup section */ 88 | 401519AEB5E067EA71DEAC36 /* Pods */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | F5194B908C3A1AA2AE0898D1 /* Pods-Donut_Example.debug.xcconfig */, 92 | 5C671613BB3B30501EC67D54 /* Pods-Donut_Example.release.xcconfig */, 93 | 09416353102B11FE59F3073F /* Pods-Donut_Tests.debug.xcconfig */, 94 | A3A0F30D9AB8CFA7E60F46D6 /* Pods-Donut_Tests.release.xcconfig */, 95 | ); 96 | name = Pods; 97 | sourceTree = ""; 98 | }; 99 | 607FACC71AFB9204008FA782 = { 100 | isa = PBXGroup; 101 | children = ( 102 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 103 | 607FACD21AFB9204008FA782 /* Example for Donut */, 104 | 607FACE81AFB9204008FA782 /* Tests */, 105 | 607FACD11AFB9204008FA782 /* Products */, 106 | 401519AEB5E067EA71DEAC36 /* Pods */, 107 | F5523A801B403B73B34FAAE7 /* Frameworks */, 108 | ); 109 | sourceTree = ""; 110 | }; 111 | 607FACD11AFB9204008FA782 /* Products */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 607FACD01AFB9204008FA782 /* Donut_Example.app */, 115 | 607FACE51AFB9204008FA782 /* Donut_Tests.xctest */, 116 | ); 117 | name = Products; 118 | sourceTree = ""; 119 | }; 120 | 607FACD21AFB9204008FA782 /* Example for Donut */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 124 | FF5102CC1F724EED008CD6D9 /* Controller */, 125 | FF5102CD1F724F82008CD6D9 /* Manager */, 126 | FF5102CB1F724D02008CD6D9 /* View */, 127 | FFDB3E671F711D8C006941B4 /* Main.storyboard */, 128 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 129 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 130 | 607FACD31AFB9204008FA782 /* Supporting Files */, 131 | ); 132 | name = "Example for Donut"; 133 | path = Donut; 134 | sourceTree = ""; 135 | }; 136 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 607FACD41AFB9204008FA782 /* Info.plist */, 140 | ); 141 | name = "Supporting Files"; 142 | sourceTree = ""; 143 | }; 144 | 607FACE81AFB9204008FA782 /* Tests */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 607FACEB1AFB9204008FA782 /* Tests.swift */, 148 | 607FACE91AFB9204008FA782 /* Supporting Files */, 149 | ); 150 | path = Tests; 151 | sourceTree = ""; 152 | }; 153 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 154 | isa = PBXGroup; 155 | children = ( 156 | 607FACEA1AFB9204008FA782 /* Info.plist */, 157 | ); 158 | name = "Supporting Files"; 159 | sourceTree = ""; 160 | }; 161 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | CE2D9A387E95AC62920C3D1A /* Donut.podspec */, 165 | D1170FD600E83E278B82D2D2 /* README.md */, 166 | 337B05780CC29DE47271F690 /* LICENSE */, 167 | ); 168 | name = "Podspec Metadata"; 169 | sourceTree = ""; 170 | }; 171 | F5523A801B403B73B34FAAE7 /* Frameworks */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | B63E04E20D48FF0639C479D4 /* Pods_Donut_Example.framework */, 175 | 4DD01A15611F62A583DCAC09 /* Pods_Donut_Tests.framework */, 176 | ); 177 | name = Frameworks; 178 | sourceTree = ""; 179 | }; 180 | FF5102CB1F724D02008CD6D9 /* View */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | FF5102D01F725036008CD6D9 /* ClowCardCell.swift */, 184 | FF5102D11F725036008CD6D9 /* ClowCardCell.xib */, 185 | FFB4D00F1F72AB9F007624F1 /* SegmentTableViewCell.swift */, 186 | FFB4D0111F72ABB4007624F1 /* SegmentTableViewCell.xib */, 187 | FFB4D0131F72BC47007624F1 /* SwitchTableViewCell.swift */, 188 | FFB4D0151F72BC58007624F1 /* SwitchTableViewCell.xib */, 189 | ); 190 | name = View; 191 | sourceTree = ""; 192 | }; 193 | FF5102CC1F724EED008CD6D9 /* Controller */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | FF5102D41F725057008CD6D9 /* PreviewViewController.swift */, 197 | FFB4D0171F72C446007624F1 /* ConfigViewController.swift */, 198 | ); 199 | name = Controller; 200 | sourceTree = ""; 201 | }; 202 | FF5102CD1F724F82008CD6D9 /* Manager */ = { 203 | isa = PBXGroup; 204 | children = ( 205 | FF5102CE1F724FEF008CD6D9 /* ConfigManager.swift */, 206 | ); 207 | name = Manager; 208 | sourceTree = ""; 209 | }; 210 | /* End PBXGroup section */ 211 | 212 | /* Begin PBXNativeTarget section */ 213 | 607FACCF1AFB9204008FA782 /* Donut_Example */ = { 214 | isa = PBXNativeTarget; 215 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Donut_Example" */; 216 | buildPhases = ( 217 | 286EDD545826C056E309F81C /* [CP] Check Pods Manifest.lock */, 218 | 607FACCC1AFB9204008FA782 /* Sources */, 219 | 607FACCD1AFB9204008FA782 /* Frameworks */, 220 | 607FACCE1AFB9204008FA782 /* Resources */, 221 | 7699BE462FBF57EC346ECBC1 /* [CP] Embed Pods Frameworks */, 222 | 265472919AB5204D377048CA /* [CP] Copy Pods Resources */, 223 | ); 224 | buildRules = ( 225 | ); 226 | dependencies = ( 227 | ); 228 | name = Donut_Example; 229 | productName = Donut; 230 | productReference = 607FACD01AFB9204008FA782 /* Donut_Example.app */; 231 | productType = "com.apple.product-type.application"; 232 | }; 233 | 607FACE41AFB9204008FA782 /* Donut_Tests */ = { 234 | isa = PBXNativeTarget; 235 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Donut_Tests" */; 236 | buildPhases = ( 237 | 284F23509F25020F07D35119 /* [CP] Check Pods Manifest.lock */, 238 | 607FACE11AFB9204008FA782 /* Sources */, 239 | 607FACE21AFB9204008FA782 /* Frameworks */, 240 | 607FACE31AFB9204008FA782 /* Resources */, 241 | 417F975073EF96F47A590838 /* [CP] Embed Pods Frameworks */, 242 | E7E014D03A35D133D8D53AFA /* [CP] Copy Pods Resources */, 243 | ); 244 | buildRules = ( 245 | ); 246 | dependencies = ( 247 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 248 | ); 249 | name = Donut_Tests; 250 | productName = Tests; 251 | productReference = 607FACE51AFB9204008FA782 /* Donut_Tests.xctest */; 252 | productType = "com.apple.product-type.bundle.unit-test"; 253 | }; 254 | /* End PBXNativeTarget section */ 255 | 256 | /* Begin PBXProject section */ 257 | 607FACC81AFB9204008FA782 /* Project object */ = { 258 | isa = PBXProject; 259 | attributes = { 260 | LastSwiftUpdateCheck = 0720; 261 | LastUpgradeCheck = 0820; 262 | ORGANIZATIONNAME = CocoaPods; 263 | TargetAttributes = { 264 | 607FACCF1AFB9204008FA782 = { 265 | CreatedOnToolsVersion = 6.3.1; 266 | LastSwiftMigration = 0820; 267 | }; 268 | 607FACE41AFB9204008FA782 = { 269 | CreatedOnToolsVersion = 6.3.1; 270 | LastSwiftMigration = 0820; 271 | TestTargetID = 607FACCF1AFB9204008FA782; 272 | }; 273 | }; 274 | }; 275 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Donut" */; 276 | compatibilityVersion = "Xcode 3.2"; 277 | developmentRegion = English; 278 | hasScannedForEncodings = 0; 279 | knownRegions = ( 280 | en, 281 | Base, 282 | ); 283 | mainGroup = 607FACC71AFB9204008FA782; 284 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 285 | projectDirPath = ""; 286 | projectRoot = ""; 287 | targets = ( 288 | 607FACCF1AFB9204008FA782 /* Donut_Example */, 289 | 607FACE41AFB9204008FA782 /* Donut_Tests */, 290 | ); 291 | }; 292 | /* End PBXProject section */ 293 | 294 | /* Begin PBXResourcesBuildPhase section */ 295 | 607FACCE1AFB9204008FA782 /* Resources */ = { 296 | isa = PBXResourcesBuildPhase; 297 | buildActionMask = 2147483647; 298 | files = ( 299 | FF5102D31F725036008CD6D9 /* ClowCardCell.xib in Resources */, 300 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 301 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 302 | FFB4D0161F72BC58007624F1 /* SwitchTableViewCell.xib in Resources */, 303 | FFDB3E681F711D8C006941B4 /* Main.storyboard in Resources */, 304 | FFB4D0121F72ABB4007624F1 /* SegmentTableViewCell.xib in Resources */, 305 | ); 306 | runOnlyForDeploymentPostprocessing = 0; 307 | }; 308 | 607FACE31AFB9204008FA782 /* Resources */ = { 309 | isa = PBXResourcesBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | }; 315 | /* End PBXResourcesBuildPhase section */ 316 | 317 | /* Begin PBXShellScriptBuildPhase section */ 318 | 265472919AB5204D377048CA /* [CP] Copy Pods Resources */ = { 319 | isa = PBXShellScriptBuildPhase; 320 | buildActionMask = 2147483647; 321 | files = ( 322 | ); 323 | inputPaths = ( 324 | ); 325 | name = "[CP] Copy Pods Resources"; 326 | outputPaths = ( 327 | ); 328 | runOnlyForDeploymentPostprocessing = 0; 329 | shellPath = /bin/sh; 330 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example-resources.sh\"\n"; 331 | showEnvVarsInLog = 0; 332 | }; 333 | 284F23509F25020F07D35119 /* [CP] Check Pods Manifest.lock */ = { 334 | isa = PBXShellScriptBuildPhase; 335 | buildActionMask = 2147483647; 336 | files = ( 337 | ); 338 | inputPaths = ( 339 | ); 340 | name = "[CP] Check Pods Manifest.lock"; 341 | outputPaths = ( 342 | ); 343 | runOnlyForDeploymentPostprocessing = 0; 344 | shellPath = /bin/sh; 345 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 346 | showEnvVarsInLog = 0; 347 | }; 348 | 286EDD545826C056E309F81C /* [CP] Check Pods Manifest.lock */ = { 349 | isa = PBXShellScriptBuildPhase; 350 | buildActionMask = 2147483647; 351 | files = ( 352 | ); 353 | inputPaths = ( 354 | ); 355 | name = "[CP] Check Pods Manifest.lock"; 356 | outputPaths = ( 357 | ); 358 | runOnlyForDeploymentPostprocessing = 0; 359 | shellPath = /bin/sh; 360 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 361 | showEnvVarsInLog = 0; 362 | }; 363 | 417F975073EF96F47A590838 /* [CP] Embed Pods Frameworks */ = { 364 | isa = PBXShellScriptBuildPhase; 365 | buildActionMask = 2147483647; 366 | files = ( 367 | ); 368 | inputPaths = ( 369 | ); 370 | name = "[CP] Embed Pods Frameworks"; 371 | outputPaths = ( 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | shellPath = /bin/sh; 375 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests-frameworks.sh\"\n"; 376 | showEnvVarsInLog = 0; 377 | }; 378 | 7699BE462FBF57EC346ECBC1 /* [CP] Embed Pods Frameworks */ = { 379 | isa = PBXShellScriptBuildPhase; 380 | buildActionMask = 2147483647; 381 | files = ( 382 | ); 383 | inputPaths = ( 384 | ); 385 | name = "[CP] Embed Pods Frameworks"; 386 | outputPaths = ( 387 | ); 388 | runOnlyForDeploymentPostprocessing = 0; 389 | shellPath = /bin/sh; 390 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example-frameworks.sh\"\n"; 391 | showEnvVarsInLog = 0; 392 | }; 393 | E7E014D03A35D133D8D53AFA /* [CP] Copy Pods Resources */ = { 394 | isa = PBXShellScriptBuildPhase; 395 | buildActionMask = 2147483647; 396 | files = ( 397 | ); 398 | inputPaths = ( 399 | ); 400 | name = "[CP] Copy Pods Resources"; 401 | outputPaths = ( 402 | ); 403 | runOnlyForDeploymentPostprocessing = 0; 404 | shellPath = /bin/sh; 405 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests-resources.sh\"\n"; 406 | showEnvVarsInLog = 0; 407 | }; 408 | /* End PBXShellScriptBuildPhase section */ 409 | 410 | /* Begin PBXSourcesBuildPhase section */ 411 | 607FACCC1AFB9204008FA782 /* Sources */ = { 412 | isa = PBXSourcesBuildPhase; 413 | buildActionMask = 2147483647; 414 | files = ( 415 | FF5102D21F725036008CD6D9 /* ClowCardCell.swift in Sources */, 416 | FFB4D0101F72AB9F007624F1 /* SegmentTableViewCell.swift in Sources */, 417 | FFB4D0141F72BC47007624F1 /* SwitchTableViewCell.swift in Sources */, 418 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 419 | FFB4D0181F72C446007624F1 /* ConfigViewController.swift in Sources */, 420 | FF5102CF1F724FEF008CD6D9 /* ConfigManager.swift in Sources */, 421 | FF5102D51F725057008CD6D9 /* PreviewViewController.swift in Sources */, 422 | ); 423 | runOnlyForDeploymentPostprocessing = 0; 424 | }; 425 | 607FACE11AFB9204008FA782 /* Sources */ = { 426 | isa = PBXSourcesBuildPhase; 427 | buildActionMask = 2147483647; 428 | files = ( 429 | 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, 430 | ); 431 | runOnlyForDeploymentPostprocessing = 0; 432 | }; 433 | /* End PBXSourcesBuildPhase section */ 434 | 435 | /* Begin PBXTargetDependency section */ 436 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 437 | isa = PBXTargetDependency; 438 | target = 607FACCF1AFB9204008FA782 /* Donut_Example */; 439 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 440 | }; 441 | /* End PBXTargetDependency section */ 442 | 443 | /* Begin PBXVariantGroup section */ 444 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 445 | isa = PBXVariantGroup; 446 | children = ( 447 | 607FACDF1AFB9204008FA782 /* Base */, 448 | ); 449 | name = LaunchScreen.xib; 450 | sourceTree = ""; 451 | }; 452 | /* End PBXVariantGroup section */ 453 | 454 | /* Begin XCBuildConfiguration section */ 455 | 607FACED1AFB9204008FA782 /* Debug */ = { 456 | isa = XCBuildConfiguration; 457 | buildSettings = { 458 | ALWAYS_SEARCH_USER_PATHS = NO; 459 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 460 | CLANG_CXX_LIBRARY = "libc++"; 461 | CLANG_ENABLE_MODULES = YES; 462 | CLANG_ENABLE_OBJC_ARC = YES; 463 | CLANG_WARN_BOOL_CONVERSION = YES; 464 | CLANG_WARN_CONSTANT_CONVERSION = YES; 465 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 466 | CLANG_WARN_EMPTY_BODY = YES; 467 | CLANG_WARN_ENUM_CONVERSION = YES; 468 | CLANG_WARN_INFINITE_RECURSION = YES; 469 | CLANG_WARN_INT_CONVERSION = YES; 470 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 471 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 472 | CLANG_WARN_UNREACHABLE_CODE = YES; 473 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 474 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 475 | COPY_PHASE_STRIP = NO; 476 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 477 | ENABLE_STRICT_OBJC_MSGSEND = YES; 478 | ENABLE_TESTABILITY = YES; 479 | GCC_C_LANGUAGE_STANDARD = gnu99; 480 | GCC_DYNAMIC_NO_PIC = NO; 481 | GCC_NO_COMMON_BLOCKS = YES; 482 | GCC_OPTIMIZATION_LEVEL = 0; 483 | GCC_PREPROCESSOR_DEFINITIONS = ( 484 | "DEBUG=1", 485 | "$(inherited)", 486 | ); 487 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 488 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 489 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 490 | GCC_WARN_UNDECLARED_SELECTOR = YES; 491 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 492 | GCC_WARN_UNUSED_FUNCTION = YES; 493 | GCC_WARN_UNUSED_VARIABLE = YES; 494 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 495 | MTL_ENABLE_DEBUG_INFO = YES; 496 | ONLY_ACTIVE_ARCH = YES; 497 | SDKROOT = iphoneos; 498 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 499 | }; 500 | name = Debug; 501 | }; 502 | 607FACEE1AFB9204008FA782 /* Release */ = { 503 | isa = XCBuildConfiguration; 504 | buildSettings = { 505 | ALWAYS_SEARCH_USER_PATHS = NO; 506 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 507 | CLANG_CXX_LIBRARY = "libc++"; 508 | CLANG_ENABLE_MODULES = YES; 509 | CLANG_ENABLE_OBJC_ARC = YES; 510 | CLANG_WARN_BOOL_CONVERSION = YES; 511 | CLANG_WARN_CONSTANT_CONVERSION = YES; 512 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 513 | CLANG_WARN_EMPTY_BODY = YES; 514 | CLANG_WARN_ENUM_CONVERSION = YES; 515 | CLANG_WARN_INFINITE_RECURSION = YES; 516 | CLANG_WARN_INT_CONVERSION = YES; 517 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 518 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 519 | CLANG_WARN_UNREACHABLE_CODE = YES; 520 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 521 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 522 | COPY_PHASE_STRIP = NO; 523 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 524 | ENABLE_NS_ASSERTIONS = NO; 525 | ENABLE_STRICT_OBJC_MSGSEND = YES; 526 | GCC_C_LANGUAGE_STANDARD = gnu99; 527 | GCC_NO_COMMON_BLOCKS = YES; 528 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 529 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 530 | GCC_WARN_UNDECLARED_SELECTOR = YES; 531 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 532 | GCC_WARN_UNUSED_FUNCTION = YES; 533 | GCC_WARN_UNUSED_VARIABLE = YES; 534 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 535 | MTL_ENABLE_DEBUG_INFO = NO; 536 | SDKROOT = iphoneos; 537 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 538 | VALIDATE_PRODUCT = YES; 539 | }; 540 | name = Release; 541 | }; 542 | 607FACF01AFB9204008FA782 /* Debug */ = { 543 | isa = XCBuildConfiguration; 544 | baseConfigurationReference = F5194B908C3A1AA2AE0898D1 /* Pods-Donut_Example.debug.xcconfig */; 545 | buildSettings = { 546 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 547 | INFOPLIST_FILE = Donut/Info.plist; 548 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 549 | MODULE_NAME = ExampleApp; 550 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 551 | PRODUCT_NAME = "$(TARGET_NAME)"; 552 | SWIFT_VERSION = 3.0; 553 | }; 554 | name = Debug; 555 | }; 556 | 607FACF11AFB9204008FA782 /* Release */ = { 557 | isa = XCBuildConfiguration; 558 | baseConfigurationReference = 5C671613BB3B30501EC67D54 /* Pods-Donut_Example.release.xcconfig */; 559 | buildSettings = { 560 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 561 | INFOPLIST_FILE = Donut/Info.plist; 562 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 563 | MODULE_NAME = ExampleApp; 564 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 565 | PRODUCT_NAME = "$(TARGET_NAME)"; 566 | SWIFT_VERSION = 3.0; 567 | }; 568 | name = Release; 569 | }; 570 | 607FACF31AFB9204008FA782 /* Debug */ = { 571 | isa = XCBuildConfiguration; 572 | baseConfigurationReference = 09416353102B11FE59F3073F /* Pods-Donut_Tests.debug.xcconfig */; 573 | buildSettings = { 574 | FRAMEWORK_SEARCH_PATHS = ( 575 | "$(SDKROOT)/Developer/Library/Frameworks", 576 | "$(inherited)", 577 | ); 578 | GCC_PREPROCESSOR_DEFINITIONS = ( 579 | "DEBUG=1", 580 | "$(inherited)", 581 | ); 582 | INFOPLIST_FILE = Tests/Info.plist; 583 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 584 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 585 | PRODUCT_NAME = "$(TARGET_NAME)"; 586 | SWIFT_VERSION = 3.0; 587 | }; 588 | name = Debug; 589 | }; 590 | 607FACF41AFB9204008FA782 /* Release */ = { 591 | isa = XCBuildConfiguration; 592 | baseConfigurationReference = A3A0F30D9AB8CFA7E60F46D6 /* Pods-Donut_Tests.release.xcconfig */; 593 | buildSettings = { 594 | FRAMEWORK_SEARCH_PATHS = ( 595 | "$(SDKROOT)/Developer/Library/Frameworks", 596 | "$(inherited)", 597 | ); 598 | INFOPLIST_FILE = Tests/Info.plist; 599 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 600 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 601 | PRODUCT_NAME = "$(TARGET_NAME)"; 602 | SWIFT_VERSION = 3.0; 603 | }; 604 | name = Release; 605 | }; 606 | /* End XCBuildConfiguration section */ 607 | 608 | /* Begin XCConfigurationList section */ 609 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "Donut" */ = { 610 | isa = XCConfigurationList; 611 | buildConfigurations = ( 612 | 607FACED1AFB9204008FA782 /* Debug */, 613 | 607FACEE1AFB9204008FA782 /* Release */, 614 | ); 615 | defaultConfigurationIsVisible = 0; 616 | defaultConfigurationName = Release; 617 | }; 618 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Donut_Example" */ = { 619 | isa = XCConfigurationList; 620 | buildConfigurations = ( 621 | 607FACF01AFB9204008FA782 /* Debug */, 622 | 607FACF11AFB9204008FA782 /* Release */, 623 | ); 624 | defaultConfigurationIsVisible = 0; 625 | defaultConfigurationName = Release; 626 | }; 627 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "Donut_Tests" */ = { 628 | isa = XCConfigurationList; 629 | buildConfigurations = ( 630 | 607FACF31AFB9204008FA782 /* Debug */, 631 | 607FACF41AFB9204008FA782 /* Release */, 632 | ); 633 | defaultConfigurationIsVisible = 0; 634 | defaultConfigurationName = Release; 635 | }; 636 | /* End XCConfigurationList section */ 637 | }; 638 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 639 | } 640 | -------------------------------------------------------------------------------- /Example/Donut.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Donut.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/Donut/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Donut 4 | // 5 | // Created by Keisuke Tatsumi on 09/19/2017. 6 | // Copyright (c) 2017 Keisuke Tatsumi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | return true 19 | } 20 | 21 | func applicationWillResignActive(_ application: UIApplication) { 22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 23 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 24 | } 25 | 26 | func applicationDidEnterBackground(_ application: UIApplication) { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | func applicationWillEnterForeground(_ application: UIApplication) { 32 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 33 | } 34 | 35 | func applicationDidBecomeActive(_ application: UIApplication) { 36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 37 | } 38 | 39 | func applicationWillTerminate(_ application: UIApplication) { 40 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 41 | } 42 | 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /Example/Donut/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 24 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Example/Donut/Controller/ConfigViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ConfigViewController.swift 3 | // Donut 4 | // 5 | // Created by 辰己 佳祐 on 2017/09/20. 6 | // Copyright © 2017年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class ConfigViewController: UIViewController, UITableViewDataSource, UITableViewDelegate { 12 | 13 | @IBOutlet weak var tableView: UITableView! 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | title = "Config" 19 | 20 | view.backgroundColor = .white 21 | 22 | tableView.register(UINib(nibName: SegmentTableViewCell.Const.cellIdentifier, bundle: nil), 23 | forCellReuseIdentifier: SegmentTableViewCell.Const.cellIdentifier) 24 | tableView.register(UINib(nibName: SwitchTableViewCell.Const.cellIdentifier, bundle: nil), 25 | forCellReuseIdentifier: SwitchTableViewCell.Const.cellIdentifier) 26 | tableView.dataSource = self 27 | tableView.delegate = self 28 | } 29 | 30 | // MARK: - UITableViewDataSource 31 | 32 | func numberOfSections(in tableView: UITableView) -> Int { 33 | return 2 34 | } 35 | 36 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 37 | switch section { 38 | case 0: 39 | return 6 40 | case 1: 41 | return 4 42 | default: 43 | fatalError() 44 | } 45 | } 46 | 47 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 48 | 49 | switch indexPath.section { 50 | case 0: 51 | let cell = tableView.dequeueReusableCell(withIdentifier: SegmentTableViewCell.Const.cellIdentifier, 52 | for: indexPath) as! SegmentTableViewCell 53 | switch indexPath.row { 54 | case 0: 55 | cell.setCellConfig(cellType: .centerDiffX) 56 | case 1: 57 | cell.setCellConfig(cellType: .centerDiffY) 58 | case 2: 59 | cell.setCellConfig(cellType: .inclinationX) 60 | case 3: 61 | cell.setCellConfig(cellType: .inclinationZ) 62 | case 4: 63 | cell.setCellConfig(cellType: .frontCellAlpha) 64 | case 5: 65 | cell.setCellConfig(cellType: .backCellAlpha) 66 | default: 67 | fatalError() 68 | } 69 | return cell 70 | case 1: 71 | let cell = tableView.dequeueReusableCell(withIdentifier: SwitchTableViewCell.Const.cellIdentifier, 72 | for: indexPath) as! SwitchTableViewCell 73 | switch indexPath.row { 74 | case 0: 75 | cell.setCellConfig(cellType: .selectableCell) 76 | case 1: 77 | cell.setCellConfig(cellType: .cellAlignmentCenter) 78 | case 2: 79 | cell.setCellConfig(cellType: .backCellInteractionEnabled) 80 | case 3: 81 | cell.setCellConfig(cellType: .onlyCellInteractionEnabled) 82 | default: 83 | fatalError() 84 | } 85 | return cell 86 | default: 87 | fatalError() 88 | } 89 | } 90 | 91 | // MARK: - UITableViewDelegate 92 | 93 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { 94 | return 70 95 | } 96 | 97 | // MARK: - Button Action 98 | 99 | @IBAction func resetAllConfig(_ sender: Any) { 100 | ConfigManager.shared.reset() 101 | tableView.reloadData() 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /Example/Donut/Controller/PreviewViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PreviewViewController.swift 3 | // Donut 4 | // 5 | // Created by Keisuke Tatsumi on 09/19/2017. 6 | // Copyright (c) 2017 Keisuke Tatsumi. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Donut 11 | 12 | final class PreviewViewController: UIViewController, DonutViewDelegate { 13 | 14 | enum Const { 15 | static let cardImageNames = ["01_windy", 16 | "02_fly", 17 | "03_shadow", 18 | "04_watery", 19 | "05_wood", 20 | "06_wind", 21 | "07_jump", 22 | "08_illusion", 23 | "09_silent", 24 | "10_thunder", 25 | "11_sword", 26 | "12_flower"] 27 | } 28 | 29 | private let donutView = DonutView() 30 | 31 | override func viewDidLoad() { 32 | super.viewDidLoad() 33 | 34 | title = "Preview" 35 | 36 | donutView.frame = view.bounds 37 | donutView.delegate = self 38 | updateConfig() 39 | donutView.addCells(getCardCells()) 40 | view.addSubview(donutView) 41 | } 42 | 43 | override func viewDidAppear(_ animated: Bool) { 44 | super.viewDidAppear(animated) 45 | updateConfig() 46 | reloadCells() 47 | } 48 | 49 | override func viewWillLayoutSubviews() { 50 | super.viewWillLayoutSubviews() 51 | donutView.frame = view.bounds 52 | } 53 | 54 | override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) { 55 | super.viewWillTransition(to: size, with: coordinator) 56 | 57 | coordinator.animate(alongsideTransition: { _ in 58 | self.reloadCells() 59 | }) 60 | } 61 | 62 | // MARK: - DonutViewDelegate 63 | 64 | func donutView(_ donutView: DonutView, didChangeCenter cell: DonutViewCell) { 65 | print("current center cell: \(cell)") 66 | } 67 | 68 | func donutView(_ donutView: DonutView, didSelect cell: DonutViewCell) { 69 | print("selected cell: \(cell)") 70 | } 71 | 72 | // MARK: - Private Methods 73 | 74 | private func updateConfig() { 75 | let manager = ConfigManager.shared 76 | donutView.setCenterDiff(CGPoint(x: manager.centerDiffX, y: manager.centerDiffY)) 77 | donutView.setCarouselInclination(angleX: manager.inclinationX, angleZ: manager.inclinationZ) 78 | donutView.setFrontCellAlpha(manager.frontCellAlpha) 79 | donutView.setBackCellAlpha(manager.backCellAlpha) 80 | donutView.setSelectableCell(manager.isSelectableCell) 81 | donutView.setCellAlignmentCenter(manager.isCellAlignmentCenter) 82 | donutView.setBackCellInteractionEnabled(manager.isBackCellInteractionEnabled) 83 | donutView.setOnlyCellInteractionEnabled(manager.isOnlyCellInteractionEnabled) 84 | donutView.setAnimationCurve(manager.animationCurve) 85 | } 86 | 87 | private func getCardCells() -> [DonutViewCell] { 88 | 89 | var cells: [DonutViewCell] = [] 90 | for i in 0.. 10 | 11 | //! Project version number for Donut. 12 | FOUNDATION_EXPORT double DonutVersionNumber; 13 | 14 | //! Project version string for Donut. 15 | FOUNDATION_EXPORT const unsigned char DonutVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/01_windy.imageset/01_windy-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/01_windy.imageset/01_windy-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/01_windy.imageset/01_windy-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/01_windy.imageset/01_windy-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/01_windy.imageset/01_windy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/01_windy.imageset/01_windy.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/01_windy.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "01_windy.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "01_windy-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "01_windy-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/02_fly.imageset/02_fly-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/02_fly.imageset/02_fly-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/02_fly.imageset/02_fly-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/02_fly.imageset/02_fly-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/02_fly.imageset/02_fly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/02_fly.imageset/02_fly.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/02_fly.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "02_fly.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "02_fly-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "02_fly-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/03_shadow.imageset/03_shadow-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/03_shadow.imageset/03_shadow-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/03_shadow.imageset/03_shadow-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/03_shadow.imageset/03_shadow-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/03_shadow.imageset/03_shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/03_shadow.imageset/03_shadow.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/03_shadow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "03_shadow.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "03_shadow-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "03_shadow-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/04_watery.imageset/04_watery-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/04_watery.imageset/04_watery-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/04_watery.imageset/04_watery-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/04_watery.imageset/04_watery-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/04_watery.imageset/04_watery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/04_watery.imageset/04_watery.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/04_watery.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "04_watery.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "04_watery-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "04_watery-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/05_wood.imageset/05_wood-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/05_wood.imageset/05_wood-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/05_wood.imageset/05_wood-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/05_wood.imageset/05_wood-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/05_wood.imageset/05_wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/05_wood.imageset/05_wood.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/05_wood.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "05_wood.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "05_wood-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "05_wood-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/06_wind.imageset/06_wind-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/06_wind.imageset/06_wind-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/06_wind.imageset/06_wind-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/06_wind.imageset/06_wind-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/06_wind.imageset/06_wind.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/06_wind.imageset/06_wind.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/06_wind.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "06_wind.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "06_wind-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "06_wind-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/07_jump.imageset/07_jump-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/07_jump.imageset/07_jump-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/07_jump.imageset/07_jump-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/07_jump.imageset/07_jump-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/07_jump.imageset/07_jump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/07_jump.imageset/07_jump.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/07_jump.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "07_jump.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "07_jump-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "07_jump-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/08_illusion.imageset/08_illusion-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/08_illusion.imageset/08_illusion-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/08_illusion.imageset/08_illusion-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/08_illusion.imageset/08_illusion-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/08_illusion.imageset/08_illusion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/08_illusion.imageset/08_illusion.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/08_illusion.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "08_illusion.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "08_illusion-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "08_illusion-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/09_silent.imageset/09_silent-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/09_silent.imageset/09_silent-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/09_silent.imageset/09_silent-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/09_silent.imageset/09_silent-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/09_silent.imageset/09_silent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/09_silent.imageset/09_silent.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/09_silent.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "09_silent.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "09_silent-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "09_silent-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/10_thunder.imageset/10_thunder-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/10_thunder.imageset/10_thunder-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/10_thunder.imageset/10_thunder-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/10_thunder.imageset/10_thunder-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/10_thunder.imageset/10_thunder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/10_thunder.imageset/10_thunder.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/10_thunder.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "10_thunder.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "10_thunder-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "10_thunder-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/11_sword.imageset/11_sword-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/11_sword.imageset/11_sword-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/11_sword.imageset/11_sword-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/11_sword.imageset/11_sword-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/11_sword.imageset/11_sword.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/11_sword.imageset/11_sword.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/11_sword.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "11_sword.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "11_sword-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "11_sword-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/12_flower.imageset/12_flower-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/12_flower.imageset/12_flower-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/12_flower.imageset/12_flower-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/12_flower.imageset/12_flower-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/12_flower.imageset/12_flower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/Cards/12_flower.imageset/12_flower.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/12_flower.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "12_flower.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "12_flower-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "12_flower-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Cards/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "img_bg.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "img_bg-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "img_bg-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg.imageset/img_bg-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg.imageset/img_bg-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg.imageset/img_bg-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg.imageset/img_bg-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg.imageset/img_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg.imageset/img_bg.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "スクリーンショット 2017-09-12 14.22.28.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "スクリーンショット 2017-09-12 14.22.28-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "スクリーンショット 2017-09-12 14.22.28-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg2.imageset/スクリーンショット 2017-09-12 14.22.28-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg2.imageset/スクリーンショット 2017-09-12 14.22.28-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg2.imageset/スクリーンショット 2017-09-12 14.22.28-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg2.imageset/スクリーンショット 2017-09-12 14.22.28-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg2.imageset/スクリーンショット 2017-09-12 14.22.28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg2.imageset/スクリーンショット 2017-09-12 14.22.28.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg3.imageset/147992-aleni-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg3.imageset/147992-aleni-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg3.imageset/147992-aleni-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg3.imageset/147992-aleni-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg3.imageset/147992-aleni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg3.imageset/147992-aleni.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "147992-aleni.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "147992-aleni-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "147992-aleni-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "img_1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "img_1-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "img_1-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg4.imageset/img_1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg4.imageset/img_1-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg4.imageset/img_1-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg4.imageset/img_1-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg4.imageset/img_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg4.imageset/img_1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg5.imageset/5536339adb03994032eb63ad0289e6d8-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg5.imageset/5536339adb03994032eb63ad0289e6d8-1.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg5.imageset/5536339adb03994032eb63ad0289e6d8-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg5.imageset/5536339adb03994032eb63ad0289e6d8-2.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg5.imageset/5536339adb03994032eb63ad0289e6d8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg5.imageset/5536339adb03994032eb63ad0289e6d8.png -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "5536339adb03994032eb63ad0289e6d8.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "5536339adb03994032eb63ad0289e6d8-1.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "5536339adb03994032eb63ad0289e6d8-2.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg6.imageset/503e54f56ce3538da19e0c731680fcf3-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg6.imageset/503e54f56ce3538da19e0c731680fcf3-1.jpg -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg6.imageset/503e54f56ce3538da19e0c731680fcf3-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg6.imageset/503e54f56ce3538da19e0c731680fcf3-2.jpg -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg6.imageset/503e54f56ce3538da19e0c731680fcf3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cokaholic/Donut/508dead1643c7c75cff8817e39f7e9db4d5c2557/Example/Donut/Images.xcassets/img_bg6.imageset/503e54f56ce3538da19e0c731680fcf3.jpg -------------------------------------------------------------------------------- /Example/Donut/Images.xcassets/img_bg6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "503e54f56ce3538da19e0c731680fcf3.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "503e54f56ce3538da19e0c731680fcf3-1.jpg", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "503e54f56ce3538da19e0c731680fcf3-2.jpg", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/Donut/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UIViewControllerBasedStatusBarAppearance 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Example/Donut/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /Example/Donut/Manager/ConfigManager.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ConfigManager.swift 3 | // Donut 4 | // 5 | // Created by 辰己 佳祐 on 2017/09/20. 6 | // Copyright © 2017年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | final class ConfigManager { 13 | 14 | enum Const { 15 | static let centerDiffMin: CGFloat = -100.0 16 | static let centerDiffMax: CGFloat = 100.0 17 | } 18 | 19 | static let shared = ConfigManager() 20 | 21 | var centerDiffX: CGFloat = 0.0 { 22 | willSet { 23 | self.centerDiffX = checkValueMinMax(newValue: newValue, 24 | minValue: Const.centerDiffMin, 25 | maxValue: Const.centerDiffMax) 26 | } 27 | } 28 | var centerDiffY: CGFloat = 0.0 { 29 | willSet { 30 | self.centerDiffY = checkValueMinMax(newValue: newValue, 31 | minValue: Const.centerDiffMin, 32 | maxValue: Const.centerDiffMax) 33 | } 34 | } 35 | var inclinationX: CGFloat = -0.1 { 36 | willSet { 37 | self.inclinationX = checkValueMinMax(newValue: newValue, 38 | minValue: -.pi, 39 | maxValue: .pi) 40 | } 41 | } 42 | var inclinationZ: CGFloat = 0.0 { 43 | willSet { 44 | self.inclinationZ = checkValueMinMax(newValue: newValue, 45 | minValue: -.pi, 46 | maxValue: .pi) 47 | } 48 | } 49 | var frontCellAlpha: CGFloat = 1.0 { 50 | willSet { 51 | self.frontCellAlpha = checkValueMinMax(newValue: newValue, 52 | minValue: 0.0, 53 | maxValue: 1.0) 54 | } 55 | } 56 | var backCellAlpha: CGFloat = 0.7 { 57 | willSet { 58 | self.backCellAlpha = checkValueMinMax(newValue: newValue, 59 | minValue: 0.0, 60 | maxValue: 1.0) 61 | } 62 | } 63 | var isSelectableCell = true 64 | var isCellAlignmentCenter = true 65 | var isBackCellInteractionEnabled = false 66 | var isOnlyCellInteractionEnabled = true 67 | var animationCurve: UIViewAnimationCurve = .linear 68 | 69 | func reset() { 70 | centerDiffX = 0.0 71 | centerDiffY = 0.0 72 | inclinationX = -0.1 73 | inclinationZ = 0.0 74 | frontCellAlpha = 1.0 75 | backCellAlpha = 0.7 76 | isSelectableCell = true 77 | isCellAlignmentCenter = true 78 | isBackCellInteractionEnabled = false 79 | isOnlyCellInteractionEnabled = true 80 | animationCurve = .linear 81 | } 82 | 83 | private func checkValueMinMax(newValue: CGFloat, minValue: CGFloat, maxValue: CGFloat) -> CGFloat { 84 | if newValue < minValue { 85 | return minValue 86 | } else if newValue > maxValue { 87 | return maxValue 88 | } 89 | return newValue 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /Example/Donut/View/ClowCardCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ClowCardCell.swift 3 | // TKCarouselView 4 | // 5 | // Created by 辰己 佳祐 on 2017/09/19. 6 | // Copyright © 2017年 辰己 佳祐. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import Donut 11 | 12 | final class ClowCardCell: DonutViewCell { 13 | 14 | class func makeFromNib() -> ClowCardCell { 15 | let nib = UINib(nibName: "ClowCardCell", bundle: nil) 16 | return nib.instantiate(withOwner: self, options: nil)[0] as! ClowCardCell 17 | } 18 | 19 | @IBOutlet weak var imageView: UIImageView! { 20 | didSet { 21 | backgroundColor = .clear 22 | contentMode = .scaleAspectFit 23 | } 24 | } 25 | 26 | override func awakeFromNib() { 27 | super.awakeFromNib() 28 | backgroundColor = .clear 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Example/Donut/View/ClowCardCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Example/Donut/View/SegmentTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SegmentTableViewCell.swift 3 | // Donut 4 | // 5 | // Created by 辰己 佳祐 on 2017/09/20. 6 | // Copyright © 2017年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class SegmentTableViewCell: UITableViewCell { 12 | 13 | enum Const { 14 | static let cellIdentifier = "SegmentTableViewCell" 15 | } 16 | 17 | enum CellType { 18 | case none 19 | case centerDiffX 20 | case centerDiffY 21 | case inclinationX 22 | case inclinationZ 23 | case frontCellAlpha 24 | case backCellAlpha 25 | } 26 | 27 | @IBOutlet weak var titleLabel: UILabel! 28 | 29 | @IBOutlet weak var segmentedControl: UISegmentedControl! 30 | 31 | private var cellType: CellType = .none 32 | private var values: [CGFloat] = [] 33 | 34 | override func prepareForReuse() { 35 | super.prepareForReuse() 36 | titleLabel.text = "" 37 | segmentedControl.removeAllSegments() 38 | cellType = .none 39 | values = [] 40 | } 41 | 42 | override func awakeFromNib() { 43 | super.awakeFromNib() 44 | selectionStyle = .none 45 | segmentedControl.removeAllSegments() 46 | segmentedControl.addTarget(self, 47 | action: #selector(segmentedControlChanged(_:)), 48 | for: .valueChanged) 49 | } 50 | 51 | func setCellConfig(cellType: CellType) { 52 | self.cellType = cellType 53 | 54 | switch cellType { 55 | case .centerDiffX, .centerDiffY: 56 | values = [ConfigManager.Const.centerDiffMin, ConfigManager.Const.centerDiffMin / 2, 0.0, ConfigManager.Const.centerDiffMax / 2, ConfigManager.Const.centerDiffMax] 57 | case .inclinationX, .inclinationZ: 58 | values = [-0.2, -0.1, 0.0, 0.1, 0.2] 59 | case .frontCellAlpha, .backCellAlpha: 60 | values = [0.0, 0.3, 0.5, 0.7, 1.0] 61 | case .none: 62 | values = [] 63 | break 64 | } 65 | 66 | var currentIndex: Int = 0 67 | let manager = ConfigManager.shared 68 | for (index, value) in values.enumerated() { 69 | segmentedControl.insertSegment(withTitle: "\(value)", at: segmentedControl.numberOfSegments, animated: false) 70 | 71 | switch cellType { 72 | case .centerDiffX: 73 | titleLabel.text = "Center Diff X" 74 | if value == manager.centerDiffX { 75 | currentIndex = index 76 | } 77 | case .centerDiffY: 78 | titleLabel.text = "Center Diff Y" 79 | if value == manager.centerDiffY { 80 | currentIndex = index 81 | } 82 | case .inclinationX: 83 | titleLabel.text = "Inclination X" 84 | if value == manager.inclinationX { 85 | currentIndex = index 86 | } 87 | case .inclinationZ: 88 | titleLabel.text = "Inclination Z" 89 | if value == manager.inclinationZ { 90 | currentIndex = index 91 | } 92 | case .frontCellAlpha: 93 | titleLabel.text = "Front Cell Alpha" 94 | if value == manager.frontCellAlpha { 95 | currentIndex = index 96 | } 97 | case .backCellAlpha: 98 | titleLabel.text = "Back Cell Alpha" 99 | if value == manager.backCellAlpha { 100 | currentIndex = index 101 | } 102 | case .none: 103 | break 104 | } 105 | } 106 | segmentedControl.selectedSegmentIndex = currentIndex 107 | } 108 | 109 | @objc private func segmentedControlChanged(_ segmentedControl: UISegmentedControl) { 110 | 111 | let manager = ConfigManager.shared 112 | switch cellType { 113 | case .centerDiffX: 114 | manager.centerDiffX = values[segmentedControl.selectedSegmentIndex] 115 | case .centerDiffY: 116 | manager.centerDiffY = values[segmentedControl.selectedSegmentIndex] 117 | case .inclinationX: 118 | manager.inclinationX = values[segmentedControl.selectedSegmentIndex] 119 | case .inclinationZ: 120 | manager.inclinationZ = values[segmentedControl.selectedSegmentIndex] 121 | case .frontCellAlpha: 122 | manager.frontCellAlpha = values[segmentedControl.selectedSegmentIndex] 123 | case .backCellAlpha: 124 | manager.backCellAlpha = values[segmentedControl.selectedSegmentIndex] 125 | case .none: 126 | break 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /Example/Donut/View/SegmentTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Example/Donut/View/SwitchTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwitchTableViewCell.swift 3 | // Donut 4 | // 5 | // Created by 辰己 佳祐 on 2017/09/21. 6 | // Copyright © 2017年 CocoaPods. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | final class SwitchTableViewCell: UITableViewCell { 12 | 13 | enum Const { 14 | static let cellIdentifier = "SwitchTableViewCell" 15 | } 16 | 17 | enum CellType { 18 | case none 19 | case selectableCell 20 | case cellAlignmentCenter 21 | case backCellInteractionEnabled 22 | case onlyCellInteractionEnabled 23 | } 24 | 25 | @IBOutlet weak var titleLabel: UILabel! 26 | 27 | @IBOutlet weak var switchControl: UISwitch! 28 | 29 | private var cellType: CellType = .none 30 | 31 | override func prepareForReuse() { 32 | super.prepareForReuse() 33 | titleLabel.text = "" 34 | switchControl.isOn = false 35 | cellType = .none 36 | } 37 | 38 | override func awakeFromNib() { 39 | super.awakeFromNib() 40 | selectionStyle = .none 41 | switchControl.addTarget(self, 42 | action: #selector(switchControlChanged(_:)), 43 | for: .valueChanged) 44 | } 45 | 46 | func setCellConfig(cellType: CellType) { 47 | self.cellType = cellType 48 | 49 | let manager = ConfigManager.shared 50 | switch cellType { 51 | case .selectableCell: 52 | titleLabel.text = "Selectable" 53 | switchControl.isOn = manager.isSelectableCell 54 | case .cellAlignmentCenter: 55 | titleLabel.text = "Auto Cell Alignment Center" 56 | switchControl.isOn = manager.isCellAlignmentCenter 57 | case .backCellInteractionEnabled: 58 | titleLabel.text = "Back Cells Interaction Enabled" 59 | switchControl.isOn = manager.isBackCellInteractionEnabled 60 | case .onlyCellInteractionEnabled: 61 | titleLabel.text = "Only Cells Interaction Enabled" 62 | switchControl.isOn = manager.isOnlyCellInteractionEnabled 63 | case .none: 64 | break 65 | } 66 | } 67 | 68 | @objc private func switchControlChanged(_ switchControl: UISwitch) { 69 | 70 | let manager = ConfigManager.shared 71 | switch cellType { 72 | case .selectableCell: 73 | manager.isSelectableCell = switchControl.isOn 74 | case .cellAlignmentCenter: 75 | manager.isCellAlignmentCenter = switchControl.isOn 76 | case .backCellInteractionEnabled: 77 | manager.isBackCellInteractionEnabled = switchControl.isOn 78 | case .onlyCellInteractionEnabled: 79 | manager.isOnlyCellInteractionEnabled = switchControl.isOn 80 | case .none: 81 | break 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Example/Donut/View/SwitchTableViewCell.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'Donut_Example' do 4 | pod 'Donut', :path => '../' 5 | 6 | target 'Donut_Tests' do 7 | inherit! :search_paths 8 | 9 | 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Donut (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - Donut (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | Donut: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | Donut: c4743008cc52c409ae15c4f139375a898590dd61 13 | 14 | PODFILE CHECKSUM: dc9d9ab7ec146f48821bdfeac41e2fa604165b50 15 | 16 | COCOAPODS: 1.2.0 17 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/Donut.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Donut", 3 | "version": "1.0.0", 4 | "summary": "Donut is a library for arranging views circularly like a donut.", 5 | "description": "Donut is a library for arranging views circularly like a donut.\n\nYou can use it so easily, and it will be a wonderful experience for you.\n\nThis library is inspired by EMCarousel.", 6 | "homepage": "https://github.com/cokaholic/Donut", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "Keisuke Tatsumi": "nietzsche.god.is.dead@gmail.com" 13 | }, 14 | "source": { 15 | "git": "https://github.com/cokaholic/Donut.git", 16 | "tag": "1.0.0" 17 | }, 18 | "social_media_url": "https://twitter.com/TK_u_nya", 19 | "platforms": { 20 | "ios": "9.0" 21 | }, 22 | "source_files": "Donut/**/*" 23 | } 24 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Donut (1.0.0) 3 | 4 | DEPENDENCIES: 5 | - Donut (from `../`) 6 | 7 | EXTERNAL SOURCES: 8 | Donut: 9 | :path: ../ 10 | 11 | SPEC CHECKSUMS: 12 | Donut: c4743008cc52c409ae15c4f139375a898590dd61 13 | 14 | PODFILE CHECKSUM: dc9d9ab7ec146f48821bdfeac41e2fa604165b50 15 | 16 | COCOAPODS: 1.2.0 17 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 3308796AA9479829FAE2A0E70A1E3528 /* Donut-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FCF0A042E7033AEB127BD255B71D76FE /* Donut-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 383F636C039A97C662A32122E7E41702 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 12 | 6343D3A84052B2477E269DDAFFC61EEB /* Pods-Donut_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A251938589B7F63809842DE85CCCADB6 /* Pods-Donut_Tests-dummy.m */; }; 13 | 72C01F05CB05399599B7B79D044347E1 /* Pods-Donut_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 98FA45225BB47DBCEADAF9666BD94300 /* Pods-Donut_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 14 | 8D163A9CE9A78CBB07CC41F7431375A5 /* Donut-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6221FCBA357365D05550327B34D979F2 /* Donut-dummy.m */; }; 15 | A05FFD2517F0DE5E5ABEA72459C4DA6F /* UIViewAnimationOptionsExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B82BFEE3C7D1DDB095765CC42A4EC3F8 /* UIViewAnimationOptionsExtension.swift */; }; 16 | A7E5D3BB68F48F69244A8D06A6503649 /* Pods-Donut_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 06E43BAF96AA5DDD77D4CF941B1B4080 /* Pods-Donut_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | CD2F8F059A6E23A69B1DA13FE4B64036 /* Pods-Donut_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4F36164050337F27DE2D2A67F30888F0 /* Pods-Donut_Example-dummy.m */; }; 18 | ECFC279964686819463C3C1CEBA3F078 /* DonutViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CEB40F452086C2F5A493546B3EC2BF2 /* DonutViewCell.swift */; }; 19 | F2619F28FD5961C026BE8AA67DB766CA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 20 | F72D08B853FD5E4266D69AF8F9D391B0 /* DonutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54202AA6CBDCDF56E0FFDC4E95702B45 /* DonutView.swift */; }; 21 | FDDE6F50838DBA8E69B9B2E067587C21 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 22 | /* End PBXBuildFile section */ 23 | 24 | /* Begin PBXContainerItemProxy section */ 25 | 7D0D512829BAF1D4A72B81883C149A57 /* PBXContainerItemProxy */ = { 26 | isa = PBXContainerItemProxy; 27 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 28 | proxyType = 1; 29 | remoteGlobalIDString = 8AA6181D8636663B76DB342E107EEF33; 30 | remoteInfo = Donut; 31 | }; 32 | /* End PBXContainerItemProxy section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 008D9CFADAE335597C03908100807D22 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 36 | 0202E3BB514002CE255347DAA00401AB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 37 | 0610EC9340AA0FEC2B63F12BD50E4C51 /* Pods-Donut_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Donut_Tests-acknowledgements.markdown"; sourceTree = ""; }; 38 | 06E43BAF96AA5DDD77D4CF941B1B4080 /* Pods-Donut_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Donut_Tests-umbrella.h"; sourceTree = ""; }; 39 | 1640F6E37D6DAB3E3613CAD36E0F8D10 /* Pods_Donut_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Donut_Tests.framework; path = "Pods-Donut_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 1CEB40F452086C2F5A493546B3EC2BF2 /* DonutViewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DonutViewCell.swift; sourceTree = ""; }; 41 | 1FE496E4AFC074085092F912B7F3F00A /* Donut.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Donut.xcconfig; sourceTree = ""; }; 42 | 2820C912BACA905D38E0BAA297D4723E /* Pods-Donut_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Donut_Tests-acknowledgements.plist"; sourceTree = ""; }; 43 | 282FC36FD29D973CA52A4F880792EDCD /* Pods-Donut_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Donut_Tests.modulemap"; sourceTree = ""; }; 44 | 2C228F74010E906AF9111386AEC3C600 /* Pods-Donut_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Donut_Tests-frameworks.sh"; sourceTree = ""; }; 45 | 336E3019AACB78B21E7EF0C01B258C2C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 46 | 39E553176F13B87CF10659073EF4920A /* Pods-Donut_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Donut_Example.release.xcconfig"; sourceTree = ""; }; 47 | 3EE924DC1425D79FD77A3FB1D9CAB829 /* Pods-Donut_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Donut_Example-resources.sh"; sourceTree = ""; }; 48 | 4BA26B9155B3B43989D5447F6DB4E53C /* Pods_Donut_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_Donut_Example.framework; path = "Pods-Donut_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 4F36164050337F27DE2D2A67F30888F0 /* Pods-Donut_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Donut_Example-dummy.m"; sourceTree = ""; }; 50 | 54202AA6CBDCDF56E0FFDC4E95702B45 /* DonutView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = DonutView.swift; sourceTree = ""; }; 51 | 6221FCBA357365D05550327B34D979F2 /* Donut-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Donut-dummy.m"; sourceTree = ""; }; 52 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 53 | 67E851B98B392379C1D57EA48278F440 /* Pods-Donut_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Donut_Tests.debug.xcconfig"; sourceTree = ""; }; 54 | 6D5BC47DD29D643563948E2D408B1225 /* Pods-Donut_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Donut_Tests.release.xcconfig"; sourceTree = ""; }; 55 | 6E3F56162568F229ED109EA0BD85A84B /* Pods-Donut_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-Donut_Example-acknowledgements.plist"; sourceTree = ""; }; 56 | 7D5B34B7B6DAE98991A100E299F6623B /* Donut.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Donut.framework; path = Donut.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 7FC482E23E90104C7B529676CFC8E926 /* Pods-Donut_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Donut_Example-frameworks.sh"; sourceTree = ""; }; 58 | 7FD5B523C432406A528CEA5B69A9CFB2 /* Donut.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Donut.modulemap; sourceTree = ""; }; 59 | 8D4B367D34E26D2254464EE20B9EB79A /* Pods-Donut_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-Donut_Example.modulemap"; sourceTree = ""; }; 60 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 61 | 98FA45225BB47DBCEADAF9666BD94300 /* Pods-Donut_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-Donut_Example-umbrella.h"; sourceTree = ""; }; 62 | A17A9B547F91E3304489CA7C2425383C /* Donut-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Donut-prefix.pch"; sourceTree = ""; }; 63 | A251938589B7F63809842DE85CCCADB6 /* Pods-Donut_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-Donut_Tests-dummy.m"; sourceTree = ""; }; 64 | B82BFEE3C7D1DDB095765CC42A4EC3F8 /* UIViewAnimationOptionsExtension.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UIViewAnimationOptionsExtension.swift; sourceTree = ""; }; 65 | B902B810BF170D1F6A6CB2DF6CD74905 /* Pods-Donut_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-Donut_Example.debug.xcconfig"; sourceTree = ""; }; 66 | DCEED94EAE3A062201D9AE1AF879AAEC /* Pods-Donut_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-Donut_Tests-resources.sh"; sourceTree = ""; }; 67 | E621BF15DB3A77C1AADBD4833EA85FE8 /* Pods-Donut_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-Donut_Example-acknowledgements.markdown"; sourceTree = ""; }; 68 | FCF0A042E7033AEB127BD255B71D76FE /* Donut-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Donut-umbrella.h"; sourceTree = ""; }; 69 | /* End PBXFileReference section */ 70 | 71 | /* Begin PBXFrameworksBuildPhase section */ 72 | D5C754DE3EBFC5B084B34FC528D3C4C8 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | F2619F28FD5961C026BE8AA67DB766CA /* Foundation.framework in Frameworks */, 77 | ); 78 | runOnlyForDeploymentPostprocessing = 0; 79 | }; 80 | F52DD9FE5E0EA8CF6DDD59C698D48CB0 /* Frameworks */ = { 81 | isa = PBXFrameworksBuildPhase; 82 | buildActionMask = 2147483647; 83 | files = ( 84 | FDDE6F50838DBA8E69B9B2E067587C21 /* Foundation.framework in Frameworks */, 85 | ); 86 | runOnlyForDeploymentPostprocessing = 0; 87 | }; 88 | FFD4936C7550A59F13631C26D26E9BED /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | 383F636C039A97C662A32122E7E41702 /* Foundation.framework in Frameworks */, 93 | ); 94 | runOnlyForDeploymentPostprocessing = 0; 95 | }; 96 | /* End PBXFrameworksBuildPhase section */ 97 | 98 | /* Begin PBXGroup section */ 99 | 12E7A6DFB1E539EFE9C5C0C67AB7FE47 /* Support Files */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 7FD5B523C432406A528CEA5B69A9CFB2 /* Donut.modulemap */, 103 | 1FE496E4AFC074085092F912B7F3F00A /* Donut.xcconfig */, 104 | 6221FCBA357365D05550327B34D979F2 /* Donut-dummy.m */, 105 | A17A9B547F91E3304489CA7C2425383C /* Donut-prefix.pch */, 106 | FCF0A042E7033AEB127BD255B71D76FE /* Donut-umbrella.h */, 107 | 0202E3BB514002CE255347DAA00401AB /* Info.plist */, 108 | ); 109 | name = "Support Files"; 110 | path = "Example/Pods/Target Support Files/Donut"; 111 | sourceTree = ""; 112 | }; 113 | 33327EF8DBCFF159B2A5CA1F471BCF5A /* Donut */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 54202AA6CBDCDF56E0FFDC4E95702B45 /* DonutView.swift */, 117 | 1CEB40F452086C2F5A493546B3EC2BF2 /* DonutViewCell.swift */, 118 | B82BFEE3C7D1DDB095765CC42A4EC3F8 /* UIViewAnimationOptionsExtension.swift */, 119 | ); 120 | name = Donut; 121 | path = Donut; 122 | sourceTree = ""; 123 | }; 124 | 5B0D096251BBADF6BAF8ABE4343377DA /* Pods-Donut_Tests */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 008D9CFADAE335597C03908100807D22 /* Info.plist */, 128 | 282FC36FD29D973CA52A4F880792EDCD /* Pods-Donut_Tests.modulemap */, 129 | 0610EC9340AA0FEC2B63F12BD50E4C51 /* Pods-Donut_Tests-acknowledgements.markdown */, 130 | 2820C912BACA905D38E0BAA297D4723E /* Pods-Donut_Tests-acknowledgements.plist */, 131 | A251938589B7F63809842DE85CCCADB6 /* Pods-Donut_Tests-dummy.m */, 132 | 2C228F74010E906AF9111386AEC3C600 /* Pods-Donut_Tests-frameworks.sh */, 133 | DCEED94EAE3A062201D9AE1AF879AAEC /* Pods-Donut_Tests-resources.sh */, 134 | 06E43BAF96AA5DDD77D4CF941B1B4080 /* Pods-Donut_Tests-umbrella.h */, 135 | 67E851B98B392379C1D57EA48278F440 /* Pods-Donut_Tests.debug.xcconfig */, 136 | 6D5BC47DD29D643563948E2D408B1225 /* Pods-Donut_Tests.release.xcconfig */, 137 | ); 138 | name = "Pods-Donut_Tests"; 139 | path = "Target Support Files/Pods-Donut_Tests"; 140 | sourceTree = ""; 141 | }; 142 | 75A567B2459B886F7B43F36AB1E81498 /* Pods-Donut_Example */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 336E3019AACB78B21E7EF0C01B258C2C /* Info.plist */, 146 | 8D4B367D34E26D2254464EE20B9EB79A /* Pods-Donut_Example.modulemap */, 147 | E621BF15DB3A77C1AADBD4833EA85FE8 /* Pods-Donut_Example-acknowledgements.markdown */, 148 | 6E3F56162568F229ED109EA0BD85A84B /* Pods-Donut_Example-acknowledgements.plist */, 149 | 4F36164050337F27DE2D2A67F30888F0 /* Pods-Donut_Example-dummy.m */, 150 | 7FC482E23E90104C7B529676CFC8E926 /* Pods-Donut_Example-frameworks.sh */, 151 | 3EE924DC1425D79FD77A3FB1D9CAB829 /* Pods-Donut_Example-resources.sh */, 152 | 98FA45225BB47DBCEADAF9666BD94300 /* Pods-Donut_Example-umbrella.h */, 153 | B902B810BF170D1F6A6CB2DF6CD74905 /* Pods-Donut_Example.debug.xcconfig */, 154 | 39E553176F13B87CF10659073EF4920A /* Pods-Donut_Example.release.xcconfig */, 155 | ); 156 | name = "Pods-Donut_Example"; 157 | path = "Target Support Files/Pods-Donut_Example"; 158 | sourceTree = ""; 159 | }; 160 | 7DB346D0F39D3F0E887471402A8071AB = { 161 | isa = PBXGroup; 162 | children = ( 163 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 164 | DA02FFD3CBEFA5584D803E741D4D925E /* Development Pods */, 165 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 166 | FAEF4ECE36E4CCA406DF1528B9C54B18 /* Products */, 167 | 85ACD3ED1734C9BC8E0DADCF8509218E /* Targets Support Files */, 168 | ); 169 | sourceTree = ""; 170 | }; 171 | 85ACD3ED1734C9BC8E0DADCF8509218E /* Targets Support Files */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 75A567B2459B886F7B43F36AB1E81498 /* Pods-Donut_Example */, 175 | 5B0D096251BBADF6BAF8ABE4343377DA /* Pods-Donut_Tests */, 176 | ); 177 | name = "Targets Support Files"; 178 | sourceTree = ""; 179 | }; 180 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 184 | ); 185 | name = Frameworks; 186 | sourceTree = ""; 187 | }; 188 | C02A9868573FBF9F33E0946068398229 /* Donut */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | 33327EF8DBCFF159B2A5CA1F471BCF5A /* Donut */, 192 | 12E7A6DFB1E539EFE9C5C0C67AB7FE47 /* Support Files */, 193 | ); 194 | name = Donut; 195 | path = ../..; 196 | sourceTree = ""; 197 | }; 198 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 202 | ); 203 | name = iOS; 204 | sourceTree = ""; 205 | }; 206 | DA02FFD3CBEFA5584D803E741D4D925E /* Development Pods */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | C02A9868573FBF9F33E0946068398229 /* Donut */, 210 | ); 211 | name = "Development Pods"; 212 | sourceTree = ""; 213 | }; 214 | FAEF4ECE36E4CCA406DF1528B9C54B18 /* Products */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | 7D5B34B7B6DAE98991A100E299F6623B /* Donut.framework */, 218 | 4BA26B9155B3B43989D5447F6DB4E53C /* Pods_Donut_Example.framework */, 219 | 1640F6E37D6DAB3E3613CAD36E0F8D10 /* Pods_Donut_Tests.framework */, 220 | ); 221 | name = Products; 222 | sourceTree = ""; 223 | }; 224 | /* End PBXGroup section */ 225 | 226 | /* Begin PBXHeadersBuildPhase section */ 227 | 046742BAF1A4010FE1289C79263E9643 /* Headers */ = { 228 | isa = PBXHeadersBuildPhase; 229 | buildActionMask = 2147483647; 230 | files = ( 231 | 72C01F05CB05399599B7B79D044347E1 /* Pods-Donut_Example-umbrella.h in Headers */, 232 | ); 233 | runOnlyForDeploymentPostprocessing = 0; 234 | }; 235 | 4C3B0C612D44FD2058D668E3C2FCB62A /* Headers */ = { 236 | isa = PBXHeadersBuildPhase; 237 | buildActionMask = 2147483647; 238 | files = ( 239 | A7E5D3BB68F48F69244A8D06A6503649 /* Pods-Donut_Tests-umbrella.h in Headers */, 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | }; 243 | B1F7809CBF1A808DC6B09B68860CDD4C /* Headers */ = { 244 | isa = PBXHeadersBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | 3308796AA9479829FAE2A0E70A1E3528 /* Donut-umbrella.h in Headers */, 248 | ); 249 | runOnlyForDeploymentPostprocessing = 0; 250 | }; 251 | /* End PBXHeadersBuildPhase section */ 252 | 253 | /* Begin PBXNativeTarget section */ 254 | 8AA6181D8636663B76DB342E107EEF33 /* Donut */ = { 255 | isa = PBXNativeTarget; 256 | buildConfigurationList = 40BBCD9CE41A7326ADE83107BD61CE5B /* Build configuration list for PBXNativeTarget "Donut" */; 257 | buildPhases = ( 258 | 318CA36D8EEB5657188397FA926457E6 /* Sources */, 259 | D5C754DE3EBFC5B084B34FC528D3C4C8 /* Frameworks */, 260 | B1F7809CBF1A808DC6B09B68860CDD4C /* Headers */, 261 | ); 262 | buildRules = ( 263 | ); 264 | dependencies = ( 265 | ); 266 | name = Donut; 267 | productName = Donut; 268 | productReference = 7D5B34B7B6DAE98991A100E299F6623B /* Donut.framework */; 269 | productType = "com.apple.product-type.framework"; 270 | }; 271 | 8AE000EA17877977910B1FD3C24FC062 /* Pods-Donut_Example */ = { 272 | isa = PBXNativeTarget; 273 | buildConfigurationList = 1682BBF739D5CBD4EC2222A3D2FE5059 /* Build configuration list for PBXNativeTarget "Pods-Donut_Example" */; 274 | buildPhases = ( 275 | 565B153570FCC3060F6462E6752D0A63 /* Sources */, 276 | F52DD9FE5E0EA8CF6DDD59C698D48CB0 /* Frameworks */, 277 | 046742BAF1A4010FE1289C79263E9643 /* Headers */, 278 | ); 279 | buildRules = ( 280 | ); 281 | dependencies = ( 282 | 962BA3CA079C02D4C1087A6B6B57B0C4 /* PBXTargetDependency */, 283 | ); 284 | name = "Pods-Donut_Example"; 285 | productName = "Pods-Donut_Example"; 286 | productReference = 4BA26B9155B3B43989D5447F6DB4E53C /* Pods_Donut_Example.framework */; 287 | productType = "com.apple.product-type.framework"; 288 | }; 289 | 935BB86327469ED984402B4466EF6E3C /* Pods-Donut_Tests */ = { 290 | isa = PBXNativeTarget; 291 | buildConfigurationList = 00FA33489F77C127E7A3D4F7700E1229 /* Build configuration list for PBXNativeTarget "Pods-Donut_Tests" */; 292 | buildPhases = ( 293 | AF976576E85CBE7D9BAD020DAE5FD012 /* Sources */, 294 | FFD4936C7550A59F13631C26D26E9BED /* Frameworks */, 295 | 4C3B0C612D44FD2058D668E3C2FCB62A /* Headers */, 296 | ); 297 | buildRules = ( 298 | ); 299 | dependencies = ( 300 | ); 301 | name = "Pods-Donut_Tests"; 302 | productName = "Pods-Donut_Tests"; 303 | productReference = 1640F6E37D6DAB3E3613CAD36E0F8D10 /* Pods_Donut_Tests.framework */; 304 | productType = "com.apple.product-type.framework"; 305 | }; 306 | /* End PBXNativeTarget section */ 307 | 308 | /* Begin PBXProject section */ 309 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 310 | isa = PBXProject; 311 | attributes = { 312 | LastSwiftUpdateCheck = 0830; 313 | LastUpgradeCheck = 0700; 314 | }; 315 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 316 | compatibilityVersion = "Xcode 3.2"; 317 | developmentRegion = English; 318 | hasScannedForEncodings = 0; 319 | knownRegions = ( 320 | en, 321 | ); 322 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 323 | productRefGroup = FAEF4ECE36E4CCA406DF1528B9C54B18 /* Products */; 324 | projectDirPath = ""; 325 | projectRoot = ""; 326 | targets = ( 327 | 8AA6181D8636663B76DB342E107EEF33 /* Donut */, 328 | 8AE000EA17877977910B1FD3C24FC062 /* Pods-Donut_Example */, 329 | 935BB86327469ED984402B4466EF6E3C /* Pods-Donut_Tests */, 330 | ); 331 | }; 332 | /* End PBXProject section */ 333 | 334 | /* Begin PBXSourcesBuildPhase section */ 335 | 318CA36D8EEB5657188397FA926457E6 /* Sources */ = { 336 | isa = PBXSourcesBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | 8D163A9CE9A78CBB07CC41F7431375A5 /* Donut-dummy.m in Sources */, 340 | F72D08B853FD5E4266D69AF8F9D391B0 /* DonutView.swift in Sources */, 341 | ECFC279964686819463C3C1CEBA3F078 /* DonutViewCell.swift in Sources */, 342 | A05FFD2517F0DE5E5ABEA72459C4DA6F /* UIViewAnimationOptionsExtension.swift in Sources */, 343 | ); 344 | runOnlyForDeploymentPostprocessing = 0; 345 | }; 346 | 565B153570FCC3060F6462E6752D0A63 /* Sources */ = { 347 | isa = PBXSourcesBuildPhase; 348 | buildActionMask = 2147483647; 349 | files = ( 350 | CD2F8F059A6E23A69B1DA13FE4B64036 /* Pods-Donut_Example-dummy.m in Sources */, 351 | ); 352 | runOnlyForDeploymentPostprocessing = 0; 353 | }; 354 | AF976576E85CBE7D9BAD020DAE5FD012 /* Sources */ = { 355 | isa = PBXSourcesBuildPhase; 356 | buildActionMask = 2147483647; 357 | files = ( 358 | 6343D3A84052B2477E269DDAFFC61EEB /* Pods-Donut_Tests-dummy.m in Sources */, 359 | ); 360 | runOnlyForDeploymentPostprocessing = 0; 361 | }; 362 | /* End PBXSourcesBuildPhase section */ 363 | 364 | /* Begin PBXTargetDependency section */ 365 | 962BA3CA079C02D4C1087A6B6B57B0C4 /* PBXTargetDependency */ = { 366 | isa = PBXTargetDependency; 367 | name = Donut; 368 | target = 8AA6181D8636663B76DB342E107EEF33 /* Donut */; 369 | targetProxy = 7D0D512829BAF1D4A72B81883C149A57 /* PBXContainerItemProxy */; 370 | }; 371 | /* End PBXTargetDependency section */ 372 | 373 | /* Begin XCBuildConfiguration section */ 374 | 397FDF7C54590BAF59AC9BC2F32AB849 /* Release */ = { 375 | isa = XCBuildConfiguration; 376 | baseConfigurationReference = 1FE496E4AFC074085092F912B7F3F00A /* Donut.xcconfig */; 377 | buildSettings = { 378 | CODE_SIGN_IDENTITY = ""; 379 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 380 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 381 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 382 | CURRENT_PROJECT_VERSION = 1; 383 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 384 | DEFINES_MODULE = YES; 385 | DYLIB_COMPATIBILITY_VERSION = 1; 386 | DYLIB_CURRENT_VERSION = 1; 387 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 388 | ENABLE_STRICT_OBJC_MSGSEND = YES; 389 | GCC_NO_COMMON_BLOCKS = YES; 390 | GCC_PREFIX_HEADER = "Target Support Files/Donut/Donut-prefix.pch"; 391 | INFOPLIST_FILE = "Target Support Files/Donut/Info.plist"; 392 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 393 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 394 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 395 | MODULEMAP_FILE = "Target Support Files/Donut/Donut.modulemap"; 396 | MTL_ENABLE_DEBUG_INFO = NO; 397 | PRODUCT_NAME = Donut; 398 | SDKROOT = iphoneos; 399 | SKIP_INSTALL = YES; 400 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 401 | SWIFT_VERSION = 3.0; 402 | TARGETED_DEVICE_FAMILY = "1,2"; 403 | VERSIONING_SYSTEM = "apple-generic"; 404 | VERSION_INFO_PREFIX = ""; 405 | }; 406 | name = Release; 407 | }; 408 | 4E487F173E6C9664F4E9E26B9635D23C /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | buildSettings = { 411 | ALWAYS_SEARCH_USER_PATHS = NO; 412 | CLANG_ANALYZER_NONNULL = YES; 413 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 414 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 415 | CLANG_CXX_LIBRARY = "libc++"; 416 | CLANG_ENABLE_MODULES = YES; 417 | CLANG_ENABLE_OBJC_ARC = YES; 418 | CLANG_WARN_BOOL_CONVERSION = YES; 419 | CLANG_WARN_CONSTANT_CONVERSION = YES; 420 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 421 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 422 | CLANG_WARN_EMPTY_BODY = YES; 423 | CLANG_WARN_ENUM_CONVERSION = YES; 424 | CLANG_WARN_INFINITE_RECURSION = YES; 425 | CLANG_WARN_INT_CONVERSION = YES; 426 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 427 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 428 | CLANG_WARN_UNREACHABLE_CODE = YES; 429 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 430 | CODE_SIGNING_REQUIRED = NO; 431 | COPY_PHASE_STRIP = NO; 432 | ENABLE_TESTABILITY = YES; 433 | GCC_C_LANGUAGE_STANDARD = gnu99; 434 | GCC_DYNAMIC_NO_PIC = NO; 435 | GCC_OPTIMIZATION_LEVEL = 0; 436 | GCC_PREPROCESSOR_DEFINITIONS = ( 437 | "POD_CONFIGURATION_DEBUG=1", 438 | "DEBUG=1", 439 | "$(inherited)", 440 | ); 441 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 442 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 443 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 444 | GCC_WARN_UNDECLARED_SELECTOR = YES; 445 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 446 | GCC_WARN_UNUSED_FUNCTION = YES; 447 | GCC_WARN_UNUSED_VARIABLE = YES; 448 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 449 | ONLY_ACTIVE_ARCH = YES; 450 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 451 | STRIP_INSTALLED_PRODUCT = NO; 452 | SYMROOT = "${SRCROOT}/../build"; 453 | }; 454 | name = Debug; 455 | }; 456 | 6014D6A8A6C17EE6F198E25DF694EC96 /* Release */ = { 457 | isa = XCBuildConfiguration; 458 | baseConfigurationReference = 6D5BC47DD29D643563948E2D408B1225 /* Pods-Donut_Tests.release.xcconfig */; 459 | buildSettings = { 460 | CODE_SIGN_IDENTITY = ""; 461 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 462 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 463 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 464 | CURRENT_PROJECT_VERSION = 1; 465 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 466 | DEFINES_MODULE = YES; 467 | DYLIB_COMPATIBILITY_VERSION = 1; 468 | DYLIB_CURRENT_VERSION = 1; 469 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 470 | ENABLE_STRICT_OBJC_MSGSEND = YES; 471 | GCC_NO_COMMON_BLOCKS = YES; 472 | INFOPLIST_FILE = "Target Support Files/Pods-Donut_Tests/Info.plist"; 473 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 474 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 475 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 476 | MACH_O_TYPE = staticlib; 477 | MODULEMAP_FILE = "Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests.modulemap"; 478 | MTL_ENABLE_DEBUG_INFO = NO; 479 | OTHER_LDFLAGS = ""; 480 | OTHER_LIBTOOLFLAGS = ""; 481 | PODS_ROOT = "$(SRCROOT)"; 482 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 483 | PRODUCT_NAME = Pods_Donut_Tests; 484 | SDKROOT = iphoneos; 485 | SKIP_INSTALL = YES; 486 | TARGETED_DEVICE_FAMILY = "1,2"; 487 | VERSIONING_SYSTEM = "apple-generic"; 488 | VERSION_INFO_PREFIX = ""; 489 | }; 490 | name = Release; 491 | }; 492 | 7184BCD0E5A3725A7F2FC67977B8F122 /* Debug */ = { 493 | isa = XCBuildConfiguration; 494 | baseConfigurationReference = B902B810BF170D1F6A6CB2DF6CD74905 /* Pods-Donut_Example.debug.xcconfig */; 495 | buildSettings = { 496 | CODE_SIGN_IDENTITY = ""; 497 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 498 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 499 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 500 | CURRENT_PROJECT_VERSION = 1; 501 | DEBUG_INFORMATION_FORMAT = dwarf; 502 | DEFINES_MODULE = YES; 503 | DYLIB_COMPATIBILITY_VERSION = 1; 504 | DYLIB_CURRENT_VERSION = 1; 505 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 506 | ENABLE_STRICT_OBJC_MSGSEND = YES; 507 | GCC_NO_COMMON_BLOCKS = YES; 508 | INFOPLIST_FILE = "Target Support Files/Pods-Donut_Example/Info.plist"; 509 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 510 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 511 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 512 | MACH_O_TYPE = staticlib; 513 | MODULEMAP_FILE = "Target Support Files/Pods-Donut_Example/Pods-Donut_Example.modulemap"; 514 | MTL_ENABLE_DEBUG_INFO = YES; 515 | OTHER_LDFLAGS = ""; 516 | OTHER_LIBTOOLFLAGS = ""; 517 | PODS_ROOT = "$(SRCROOT)"; 518 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 519 | PRODUCT_NAME = Pods_Donut_Example; 520 | SDKROOT = iphoneos; 521 | SKIP_INSTALL = YES; 522 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 523 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 524 | SWIFT_VERSION = 3.0; 525 | TARGETED_DEVICE_FAMILY = "1,2"; 526 | VERSIONING_SYSTEM = "apple-generic"; 527 | VERSION_INFO_PREFIX = ""; 528 | }; 529 | name = Debug; 530 | }; 531 | A649C5D33044F3EF9FCB45CE629B81B9 /* Debug */ = { 532 | isa = XCBuildConfiguration; 533 | baseConfigurationReference = 67E851B98B392379C1D57EA48278F440 /* Pods-Donut_Tests.debug.xcconfig */; 534 | buildSettings = { 535 | CODE_SIGN_IDENTITY = ""; 536 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 537 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 538 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 539 | CURRENT_PROJECT_VERSION = 1; 540 | DEBUG_INFORMATION_FORMAT = dwarf; 541 | DEFINES_MODULE = YES; 542 | DYLIB_COMPATIBILITY_VERSION = 1; 543 | DYLIB_CURRENT_VERSION = 1; 544 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 545 | ENABLE_STRICT_OBJC_MSGSEND = YES; 546 | GCC_NO_COMMON_BLOCKS = YES; 547 | INFOPLIST_FILE = "Target Support Files/Pods-Donut_Tests/Info.plist"; 548 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 549 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 550 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 551 | MACH_O_TYPE = staticlib; 552 | MODULEMAP_FILE = "Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests.modulemap"; 553 | MTL_ENABLE_DEBUG_INFO = YES; 554 | OTHER_LDFLAGS = ""; 555 | OTHER_LIBTOOLFLAGS = ""; 556 | PODS_ROOT = "$(SRCROOT)"; 557 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 558 | PRODUCT_NAME = Pods_Donut_Tests; 559 | SDKROOT = iphoneos; 560 | SKIP_INSTALL = YES; 561 | TARGETED_DEVICE_FAMILY = "1,2"; 562 | VERSIONING_SYSTEM = "apple-generic"; 563 | VERSION_INFO_PREFIX = ""; 564 | }; 565 | name = Debug; 566 | }; 567 | BDD0139D6EB93FA375F887ABD62DAB2E /* Release */ = { 568 | isa = XCBuildConfiguration; 569 | buildSettings = { 570 | ALWAYS_SEARCH_USER_PATHS = NO; 571 | CLANG_ANALYZER_NONNULL = YES; 572 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 573 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 574 | CLANG_CXX_LIBRARY = "libc++"; 575 | CLANG_ENABLE_MODULES = YES; 576 | CLANG_ENABLE_OBJC_ARC = YES; 577 | CLANG_WARN_BOOL_CONVERSION = YES; 578 | CLANG_WARN_CONSTANT_CONVERSION = YES; 579 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 580 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 581 | CLANG_WARN_EMPTY_BODY = YES; 582 | CLANG_WARN_ENUM_CONVERSION = YES; 583 | CLANG_WARN_INFINITE_RECURSION = YES; 584 | CLANG_WARN_INT_CONVERSION = YES; 585 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 586 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 587 | CLANG_WARN_UNREACHABLE_CODE = YES; 588 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 589 | CODE_SIGNING_REQUIRED = NO; 590 | COPY_PHASE_STRIP = YES; 591 | ENABLE_NS_ASSERTIONS = NO; 592 | GCC_C_LANGUAGE_STANDARD = gnu99; 593 | GCC_PREPROCESSOR_DEFINITIONS = ( 594 | "POD_CONFIGURATION_RELEASE=1", 595 | "$(inherited)", 596 | ); 597 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 598 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 599 | GCC_WARN_UNDECLARED_SELECTOR = YES; 600 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 601 | GCC_WARN_UNUSED_FUNCTION = YES; 602 | GCC_WARN_UNUSED_VARIABLE = YES; 603 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 604 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 605 | STRIP_INSTALLED_PRODUCT = NO; 606 | SYMROOT = "${SRCROOT}/../build"; 607 | VALIDATE_PRODUCT = YES; 608 | }; 609 | name = Release; 610 | }; 611 | C5E8ECBF1EC1B7B0CEA14379B5066437 /* Release */ = { 612 | isa = XCBuildConfiguration; 613 | baseConfigurationReference = 39E553176F13B87CF10659073EF4920A /* Pods-Donut_Example.release.xcconfig */; 614 | buildSettings = { 615 | CODE_SIGN_IDENTITY = ""; 616 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 617 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 618 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 619 | CURRENT_PROJECT_VERSION = 1; 620 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 621 | DEFINES_MODULE = YES; 622 | DYLIB_COMPATIBILITY_VERSION = 1; 623 | DYLIB_CURRENT_VERSION = 1; 624 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 625 | ENABLE_STRICT_OBJC_MSGSEND = YES; 626 | GCC_NO_COMMON_BLOCKS = YES; 627 | INFOPLIST_FILE = "Target Support Files/Pods-Donut_Example/Info.plist"; 628 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 629 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 630 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 631 | MACH_O_TYPE = staticlib; 632 | MODULEMAP_FILE = "Target Support Files/Pods-Donut_Example/Pods-Donut_Example.modulemap"; 633 | MTL_ENABLE_DEBUG_INFO = NO; 634 | OTHER_LDFLAGS = ""; 635 | OTHER_LIBTOOLFLAGS = ""; 636 | PODS_ROOT = "$(SRCROOT)"; 637 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 638 | PRODUCT_NAME = Pods_Donut_Example; 639 | SDKROOT = iphoneos; 640 | SKIP_INSTALL = YES; 641 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 642 | SWIFT_VERSION = 3.0; 643 | TARGETED_DEVICE_FAMILY = "1,2"; 644 | VERSIONING_SYSTEM = "apple-generic"; 645 | VERSION_INFO_PREFIX = ""; 646 | }; 647 | name = Release; 648 | }; 649 | C9A55DE2049484C9981C3DDF09D8C315 /* Debug */ = { 650 | isa = XCBuildConfiguration; 651 | baseConfigurationReference = 1FE496E4AFC074085092F912B7F3F00A /* Donut.xcconfig */; 652 | buildSettings = { 653 | CODE_SIGN_IDENTITY = ""; 654 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 655 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 656 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 657 | CURRENT_PROJECT_VERSION = 1; 658 | DEBUG_INFORMATION_FORMAT = dwarf; 659 | DEFINES_MODULE = YES; 660 | DYLIB_COMPATIBILITY_VERSION = 1; 661 | DYLIB_CURRENT_VERSION = 1; 662 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 663 | ENABLE_STRICT_OBJC_MSGSEND = YES; 664 | GCC_NO_COMMON_BLOCKS = YES; 665 | GCC_PREFIX_HEADER = "Target Support Files/Donut/Donut-prefix.pch"; 666 | INFOPLIST_FILE = "Target Support Files/Donut/Info.plist"; 667 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 668 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 669 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 670 | MODULEMAP_FILE = "Target Support Files/Donut/Donut.modulemap"; 671 | MTL_ENABLE_DEBUG_INFO = YES; 672 | PRODUCT_NAME = Donut; 673 | SDKROOT = iphoneos; 674 | SKIP_INSTALL = YES; 675 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 676 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 677 | SWIFT_VERSION = 3.0; 678 | TARGETED_DEVICE_FAMILY = "1,2"; 679 | VERSIONING_SYSTEM = "apple-generic"; 680 | VERSION_INFO_PREFIX = ""; 681 | }; 682 | name = Debug; 683 | }; 684 | /* End XCBuildConfiguration section */ 685 | 686 | /* Begin XCConfigurationList section */ 687 | 00FA33489F77C127E7A3D4F7700E1229 /* Build configuration list for PBXNativeTarget "Pods-Donut_Tests" */ = { 688 | isa = XCConfigurationList; 689 | buildConfigurations = ( 690 | A649C5D33044F3EF9FCB45CE629B81B9 /* Debug */, 691 | 6014D6A8A6C17EE6F198E25DF694EC96 /* Release */, 692 | ); 693 | defaultConfigurationIsVisible = 0; 694 | defaultConfigurationName = Release; 695 | }; 696 | 1682BBF739D5CBD4EC2222A3D2FE5059 /* Build configuration list for PBXNativeTarget "Pods-Donut_Example" */ = { 697 | isa = XCConfigurationList; 698 | buildConfigurations = ( 699 | 7184BCD0E5A3725A7F2FC67977B8F122 /* Debug */, 700 | C5E8ECBF1EC1B7B0CEA14379B5066437 /* Release */, 701 | ); 702 | defaultConfigurationIsVisible = 0; 703 | defaultConfigurationName = Release; 704 | }; 705 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 706 | isa = XCConfigurationList; 707 | buildConfigurations = ( 708 | 4E487F173E6C9664F4E9E26B9635D23C /* Debug */, 709 | BDD0139D6EB93FA375F887ABD62DAB2E /* Release */, 710 | ); 711 | defaultConfigurationIsVisible = 0; 712 | defaultConfigurationName = Release; 713 | }; 714 | 40BBCD9CE41A7326ADE83107BD61CE5B /* Build configuration list for PBXNativeTarget "Donut" */ = { 715 | isa = XCConfigurationList; 716 | buildConfigurations = ( 717 | C9A55DE2049484C9981C3DDF09D8C315 /* Debug */, 718 | 397FDF7C54590BAF59AC9BC2F32AB849 /* Release */, 719 | ); 720 | defaultConfigurationIsVisible = 0; 721 | defaultConfigurationName = Release; 722 | }; 723 | /* End XCConfigurationList section */ 724 | }; 725 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 726 | } 727 | -------------------------------------------------------------------------------- /Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Donut.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 66 | 67 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Donut/Donut-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Donut : NSObject 3 | @end 4 | @implementation PodsDummy_Donut 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Donut/Donut-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Donut/Donut-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double DonutVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char DonutVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Donut/Donut.modulemap: -------------------------------------------------------------------------------- 1 | framework module Donut { 2 | umbrella header "Donut-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Donut/Donut.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Donut 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Donut/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## Donut 5 | 6 | Copyright (c) 2017 Keisuke Tatsumi 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2017 Keisuke Tatsumi 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | License 38 | MIT 39 | Title 40 | Donut 41 | Type 42 | PSGroupSpecifier 43 | 44 | 45 | FooterText 46 | Generated by CocoaPods - https://cocoapods.org 47 | Title 48 | 49 | Type 50 | PSGroupSpecifier 51 | 52 | 53 | StringsTable 54 | Acknowledgements 55 | Title 56 | Acknowledgements 57 | 58 | 59 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Donut_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Donut_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/Donut/Donut.framework" 93 | fi 94 | if [[ "$CONFIGURATION" == "Release" ]]; then 95 | install_framework "$BUILT_PRODUCTS_DIR/Donut/Donut.framework" 96 | fi 97 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 98 | wait 99 | fi 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | *) 25 | TARGET_DEVICE_ARGS="--target-device mac" 26 | ;; 27 | esac 28 | 29 | install_resource() 30 | { 31 | if [[ "$1" = /* ]] ; then 32 | RESOURCE_PATH="$1" 33 | else 34 | RESOURCE_PATH="${PODS_ROOT}/$1" 35 | fi 36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 37 | cat << EOM 38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 39 | EOM 40 | exit 1 41 | fi 42 | case $RESOURCE_PATH in 43 | *.storyboard) 44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 46 | ;; 47 | *.xib) 48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 50 | ;; 51 | *.framework) 52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | ;; 57 | *.xcdatamodel) 58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 60 | ;; 61 | *.xcdatamodeld) 62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 64 | ;; 65 | *.xcmappingmodel) 66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 68 | ;; 69 | *.xcassets) 70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 72 | ;; 73 | *) 74 | echo "$RESOURCE_PATH" 75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 76 | ;; 77 | esac 78 | } 79 | 80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | fi 86 | rm -f "$RESOURCES_TO_COPY" 87 | 88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 89 | then 90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 92 | while read line; do 93 | if [[ $line != "${PODS_ROOT}*" ]]; then 94 | XCASSET_FILES+=("$line") 95 | fi 96 | done <<<"$OTHER_XCASSETS" 97 | 98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | fi 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_Donut_ExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Donut_ExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Donut" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Donut/Donut.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Donut" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Donut_Example { 2 | umbrella header "Pods-Donut_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Example/Pods-Donut_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Donut" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Donut/Donut.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "Donut" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Donut_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Donut_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 91 | wait 92 | fi 93 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | *) 25 | TARGET_DEVICE_ARGS="--target-device mac" 26 | ;; 27 | esac 28 | 29 | install_resource() 30 | { 31 | if [[ "$1" = /* ]] ; then 32 | RESOURCE_PATH="$1" 33 | else 34 | RESOURCE_PATH="${PODS_ROOT}/$1" 35 | fi 36 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 37 | cat << EOM 38 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 39 | EOM 40 | exit 1 41 | fi 42 | case $RESOURCE_PATH in 43 | *.storyboard) 44 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 45 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 46 | ;; 47 | *.xib) 48 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 49 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 50 | ;; 51 | *.framework) 52 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 53 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 54 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 55 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | ;; 57 | *.xcdatamodel) 58 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 59 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 60 | ;; 61 | *.xcdatamodeld) 62 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 63 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 64 | ;; 65 | *.xcmappingmodel) 66 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 67 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 68 | ;; 69 | *.xcassets) 70 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 71 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 72 | ;; 73 | *) 74 | echo "$RESOURCE_PATH" 75 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 76 | ;; 77 | esac 78 | } 79 | 80 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 81 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 82 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 83 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | fi 86 | rm -f "$RESOURCES_TO_COPY" 87 | 88 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 89 | then 90 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 91 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 92 | while read line; do 93 | if [[ $line != "${PODS_ROOT}*" ]]; then 94 | XCASSET_FILES+=("$line") 95 | fi 96 | done <<<"$OTHER_XCASSETS" 97 | 98 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 99 | fi 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_Donut_TestsVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_Donut_TestsVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Donut" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Donut/Donut.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Donut_Tests { 2 | umbrella header "Pods-Donut_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-Donut_Tests/Pods-Donut_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Donut" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 4 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Donut/Donut.framework/Headers" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT}/Pods 8 | -------------------------------------------------------------------------------- /Example/Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Tests/Tests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | import Donut 4 | 5 | class Tests: XCTestCase { 6 | 7 | override func setUp() { 8 | super.setUp() 9 | // Put setup code here. This method is called before the invocation of each test method in the class. 10 | } 11 | 12 | override func tearDown() { 13 | // Put teardown code here. This method is called after the invocation of each test method in the class. 14 | super.tearDown() 15 | } 16 | 17 | func testExample() { 18 | // This is an example of a functional test case. 19 | XCTAssert(true, "Pass") 20 | } 21 | 22 | func testPerformanceExample() { 23 | // This is an example of a performance test case. 24 | self.measure() { 25 | // Put the code you want to measure the time of here. 26 | } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Keisuke Tatsumi 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | # Overview 6 |

7 | 8 |

9 | 10 |

11 | Donut is a library for arranging views circularly like a donut.

You can use it so easily, and it will be a wonderful experience for you.

This library is inspired by
EMCarousel. 12 |

13 | 14 | # Contents 15 | - [Features](#features) 16 | - [Usage](#usage) 17 | - [Requirements](#requirements) 18 | - [Installation](#installation) 19 | - [Author](#author) 20 | 21 | ## Features 22 | 23 | ![Platform](http://img.shields.io/badge/platform-ios-blue.svg?style=flat-square 24 | ) 25 | [![Cocoapods](https://img.shields.io/badge/Cocoapods-compatible-brightgreen.svg)](https://img.shields.io/badge/Cocoapods-compatible-brightgreen.svg?style=flat-square) 26 | [![Carthage compatible](https://img.shields.io/badge/Carthage-Compatible-brightgreen.svg?style=flat-square)](https://github.com/Carthage/Carthage) 27 | [![License](http://img.shields.io/badge/license-MIT-lightgrey.svg?style=flat-square 28 | )](http://mit-license.org) 29 | ![Swift](https://img.shields.io/badge/Swift-3.0-orange.svg?style=flat-square) 30 | ![pod](https://img.shields.io/badge/pod-v1.2.0-red.svg?style=flat-square) 31 | 32 | - [x] Animated item selection 33 | - [x] Add items with animation 34 | - [x] Support auto cell alignment center 35 | - [x] Support 3D inclination angle (x, z) 36 | - [x] Support animation curve (linear, easeInOut, easeIn, easeOut) 37 | - [x] Support Interface Builder 38 | - [x] Support `Swift3` 39 | - [x] And more... 40 | 41 | #### [Run example app in your browser](https://appetize.io/app/u8pqek1414r8degeq4u9ttegpg?device=iphone6s&scale=75&orientation=portrait&osVersion=11.0) 42 | 43 | ## Usage 44 | 45 | ### *1. Frame Size And Center Diff* 46 | It is better to set **frame of a UIViewController's view to frame of the donutView**. 47 | If you want to move center point of the donutView, please use `setCenterDiff(CGPoint(x: #X_Diff, y: #Y_Diff))`. 48 | 49 | ### *2. Set Configures* 50 | 51 | ### Inclinations 52 | If you want to change the inclinations of DonutView, please use `setCarouselInclination(angleX: #AngleX, angleZ: #AngleZ)`. 53 | You can change it about X and Z angles. 54 | 55 | | **#AngleX = -.pi / 8.0** | **#AngleZ = -.pi / 4.0** | 56 | |---|---| 57 | | ![x-pi_8](https://raw.githubusercontent.com/cokaholic/ImageAssets/master/Donut/x-pi_8.gif) | ![z-pi_4](https://raw.githubusercontent.com/cokaholic/ImageAssets/master/Donut/z-pi_4.gif) | 58 | 59 | ### Cells Alpha 60 | If you want to change the alpha of front or back DonutViewCells, please use `setFrontCellAlpha(#AlphaFront)` or `setBackCellAlpha(#AlphaBack)`. 61 | 62 | | **#AlphaFront = 1.0, #AlphaBack = 0.7** | **#AlphaFront = 0.7, #AlphaBack = 1.0** | 63 | |---|---| 64 | | ![f10_b07](https://raw.githubusercontent.com/cokaholic/ImageAssets/master/Donut/f10_b07.png) | ![f07_b10](https://raw.githubusercontent.com/cokaholic/ImageAssets/master/Donut/f07_b10.png) | 65 | 66 | ### Selectable 67 | You can set whether DonutView is selectable or not by `setSelectableCell(Bool)`. 68 | If the cells is selectable, the selected cell is scrolled to the center. 69 | 70 | ### Auto Cell Alignment Center 71 | You can set whether the alignment of DonutView is center or not by `setCellAlignmentCenter(Bool)`. 72 | 73 | | **true** | **false** | 74 | |---|---| 75 | | ![alignment_center_true](https://raw.githubusercontent.com/cokaholic/ImageAssets/master/Donut/alignment_center_true.gif) | ![alignment_center_false](https://raw.githubusercontent.com/cokaholic/ImageAssets/master/Donut/alignment_center_false.gif) | 76 | 77 | ### Back Cells Interaction Enabled 78 | You can set whether the interaction of DonutView's back cells is enable or not by `setBackCellInteractionEnabled(Bool)`. 79 | 80 | ### Only Cells Interaction Enabled 81 | You can set whether the interaction of DonutView is enable only cells or not by `setOnlyCellInteractionEnabled(Bool)`. 82 | 83 | ### Animation Curve 84 | If you want to change the animation curve of DonutView, please use `setAnimationCurve(UIViewAnimationCurve)`. 85 | You can set an animation curve from below list. 86 | 87 | ```swift 88 | public enum UIViewAnimationCurve : Int { 89 | 90 | case easeInOut // slow at beginning and end 91 | 92 | case easeIn // slow at beginning 93 | 94 | case easeOut // slow at end 95 | 96 | case linear 97 | } 98 | ``` 99 | 100 | ### *3. DonutViewDelegate (if you need)* 101 | If you want to know at changed center cell or selected cell, you can use below delegate methods. 102 | 103 | ```swift 104 | optional func donutView(_ donutView: DonutView, didChangeCenter cell: DonutViewCell) 105 | optional func donutView(_ donutView: DonutView, didSelect cell: DonutViewCell) 106 | ``` 107 | 108 | ### *4. Add Cells* 109 | You can add one or more cells inherited from DonutViewCell to DonutView. 110 | **Attention Please!: Before adding a cell, you need to set the frame size for the added cell!!!** 111 | If you want to add cell, please use `addCell(_ cell: DonutViewCell)` or `addCells(_ cells: [DonutViewCell])`. 112 | 113 | ```swift 114 | class ViewController: UIViewController, DonutViewDelegate { 115 | private let donutView = DonutView() 116 | 117 | override func viewDidLoad() { 118 | super.viewDidLoad() 119 | 120 | donutView.frame = view.bounds // It's better 121 | donutView.setCenterDiff(CGPoint(x: 0, y: 0)) // Set center diff 122 | donutView.setFrontCellAlpha(1.0) // Set front cells alpha 123 | donutView.setBackCellAlpha(0.7) // Set back cells alpha 124 | donutView.setSelectableCell(true) // Set selectable 125 | donutView.setCellAlignmentCenter(true) // Set auto cell alignment center 126 | donutView.setBackCellInteractionEnabled(false) // Set back cells interaction 127 | donutView.setOnlyCellInteractionEnabled(true) // Set only cells interaction 128 | donutView.setAnimationCurve(.linear) // Set animation curve 129 | donutView.addCells(getCardCells()) // Add cells 130 | 131 | donutView.delegate = self // Set delegate 132 | view.addSubview(donutView) 133 | } 134 | 135 | // MARK: - DonutViewDelegate 136 | 137 | func donutView(_ donutView: DonutView, didChangeCenter cell: DonutViewCell) { 138 | print("current center cell: \(cell)") 139 | } 140 | 141 | func donutView(_ donutView: DonutView, didSelect cell: DonutViewCell) { 142 | print("selected cell: \(cell)") 143 | } 144 | } 145 | ``` 146 | 147 | See [Example](https://github.com/cokaholic/Donut/tree/master/Example), for more details. 148 | 149 | ## Requirements 150 | 151 | - Xcode 8.0+ 152 | - Swift 3.0+ 153 | - iOS 9.0+ 154 | 155 | ## Installation 156 | 157 | ### CocoaPods 158 | 159 | Donut is available through [CocoaPods](http://cocoapods.org). 160 | To install 161 | it, simply add the following line to your Podfile: 162 | 163 | ```ruby 164 | pod "Donut" 165 | ``` 166 | 167 | ### Carthage 168 | 169 | Add the following line to your `Cartfile`: 170 | 171 | ```ruby 172 | github "cokaholic/Donut" 173 | ``` 174 | 175 | ### Manually 176 | 177 | Add the [Donut](./Donut) directory to your project. 178 | 179 | ## Author 180 | 181 | Keisuke Tatsumi 182 | 183 | - [GitHub](https://github.com/cokaholic) 184 | - [Facebook](https://www.facebook.com/keisuke.tatsumi.50) 185 | - [Twitter](https://twitter.com/TK_u_nya) 186 | - Gmail: nietzsche.god.is.dead@gmail.com 187 | 188 | ## License 189 | 190 | Donut is available under the MIT license. 191 | See the [LICENSE file](https://github.com/cokaholic/Donut/blob/master/LICENSE) for more info. 192 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------