├── .gitignore ├── Demo ├── AppDelegate.swift ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Demo Images │ ├── 01.jpeg │ ├── 02.jpeg │ ├── 03.jpeg │ ├── 04.jpeg │ ├── 05.jpeg │ ├── 06.jpeg │ ├── 07.jpeg │ ├── 08.jpeg │ ├── 09.jpeg │ ├── 10.jpeg │ ├── 11.jpeg │ ├── 12.jpeg │ ├── 13.jpeg │ ├── 14.jpeg │ ├── 15.jpeg │ └── 16.jpeg ├── DetailViewController.swift ├── ImageCollectionViewController │ ├── Cell │ │ └── ImageCollectionViewCell.swift │ ├── ImageCollectionModalTransitionViewController.swift │ ├── ImageCollectionPushTransitionViewController.swift │ └── ImageCollectionViewController.swift ├── ImageTableViewController │ ├── Cell │ │ └── ImageTableViewCell.swift │ ├── ImageTableModalTransitionViewController.swift │ ├── ImageTablePushTransitionViewController.swift │ └── ImageTableViewController.swift ├── Info.plist └── NavigationController.swift ├── LICENSE ├── README.md ├── RMPZoomTransitionAnimator-Swift.podspec ├── RMPZoomTransitionAnimator-Swift.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── RMPZoomTransitionAnimator-Swift.xcscheme ├── RMPZoomTransitionAnimator-Swift ├── Info.plist ├── RMPZoomTransitionAnimating.swift ├── RMPZoomTransitionAnimator.swift └── RMPZoomTransitionDelegate.swift └── doc ├── collectionview.gif └── tableview.gif /.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 | -------------------------------------------------------------------------------- /Demo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import UIKit 24 | 25 | @UIApplicationMain 26 | class AppDelegate: UIResponder, UIApplicationDelegate { 27 | 28 | var window: UIWindow? 29 | } 30 | 31 | -------------------------------------------------------------------------------- /Demo/Assets.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 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Demo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Demo/Base.lproj/LaunchScreen.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 | -------------------------------------------------------------------------------- /Demo/Base.lproj/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 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 382 | 383 | 384 | 385 | 386 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. 540 | 541 | 542 | 543 | 544 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | -------------------------------------------------------------------------------- /Demo/Demo Images/01.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/01.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/02.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/02.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/03.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/03.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/04.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/04.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/05.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/05.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/06.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/06.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/07.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/07.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/08.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/08.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/09.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/09.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/10.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/10.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/11.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/11.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/12.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/12.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/13.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/13.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/14.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/14.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/15.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/15.jpeg -------------------------------------------------------------------------------- /Demo/Demo Images/16.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/Demo/Demo Images/16.jpeg -------------------------------------------------------------------------------- /Demo/DetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | // How to setup 24 | // 25 | // 1. Import RMPZoomTransitionAnimator_Swift 26 | // 2. Adopt RMPZoomTransitionAnimating 27 | // 3. Implement RMPZoomTransitionAnimating protocol 28 | 29 | import UIKit 30 | import RMPZoomTransitionAnimator_Swift 31 | 32 | class DetailViewController: UIViewController { 33 | @IBOutlet weak var imageView: UIImageView! 34 | 35 | @IBAction func didTapClose(_ sender: UIButton) { 36 | dismiss(animated: true, completion: nil) 37 | } 38 | } 39 | 40 | extension DetailViewController: RMPZoomTransitionAnimating { 41 | var transitionSourceImageView: UIImageView { 42 | let imageView = UIImageView(image: self.imageView.image) 43 | imageView.contentMode = self.imageView.contentMode 44 | imageView.clipsToBounds = true 45 | imageView.isUserInteractionEnabled = false 46 | imageView.frame = self.imageView.frame 47 | return imageView; 48 | } 49 | 50 | var transitionSourceBackgroundColor: UIColor? { 51 | return view.backgroundColor 52 | } 53 | 54 | var transitionDestinationImageViewFrame: CGRect { 55 | let width = self.view.frame.width 56 | var frame = self.imageView.frame 57 | frame.size.width = width 58 | return frame 59 | } 60 | } 61 | 62 | extension DetailViewController: RMPZoomTransitionDelegate { 63 | func zoomTransitionAnimator(animator: RMPZoomTransitionAnimator, 64 | didCompleteTransition didComplete: Bool, 65 | animatingSourceImageView imageView: UIImageView) { 66 | self.imageView.image = imageView.image 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Demo/ImageCollectionViewController/Cell/ImageCollectionViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import UIKit 24 | 25 | class ImageCollectionViewCell: UICollectionViewCell { 26 | 27 | @IBOutlet weak var imageView: UIImageView! 28 | 29 | @IBOutlet weak var titleLabel: UILabel! 30 | } 31 | -------------------------------------------------------------------------------- /Demo/ImageCollectionViewController/ImageCollectionModalTransitionViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | // How to setup 24 | // 25 | // 1. Import RMPZoomTransitionAnimator_Swift 26 | // 2. Adopt RMPZoomTransitionAnimating 27 | // 3. Implement RMPZoomTransitionAnimating protocol 28 | 29 | import UIKit 30 | import RMPZoomTransitionAnimator_Swift 31 | 32 | class ImageCollectionModalTransitionViewController: ImageCollectionViewController { 33 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 34 | super.prepare(for: segue, sender: sender) 35 | segue.destination.transitioningDelegate = self 36 | } 37 | } 38 | 39 | // MARK: - RMPZoomTransitionAnimating 40 | 41 | extension ImageCollectionModalTransitionViewController: RMPZoomTransitionAnimating { 42 | var transitionSourceImageView: UIImageView { 43 | let selectedIndexPath = self.collectionView.indexPathsForSelectedItems!.first! 44 | let cell = self.collectionView.cellForItem(at: selectedIndexPath) as! ImageCollectionViewCell 45 | let imageView = UIImageView(image: cell.imageView.image) 46 | imageView.contentMode = cell.imageView.contentMode; 47 | imageView.clipsToBounds = true 48 | imageView.isUserInteractionEnabled = false 49 | imageView.frame = cell.imageView.convert(cell.imageView.frame, to: self.collectionView.superview) 50 | return imageView; 51 | } 52 | 53 | var transitionSourceBackgroundColor: UIColor? { 54 | return self.collectionView.backgroundColor 55 | } 56 | 57 | var transitionDestinationImageViewFrame: CGRect { 58 | let selectedIndexPath = self.collectionView.indexPathsForSelectedItems!.first! 59 | let cell = self.collectionView.cellForItem(at: selectedIndexPath) as! ImageCollectionViewCell 60 | let cellFrameInSuperview = cell.imageView.convert(cell.imageView.frame, to: self.collectionView.superview) 61 | return cellFrameInSuperview 62 | } 63 | } 64 | 65 | // MARK: - UIViewControllerTransitioningDelegate 66 | 67 | extension ImageCollectionModalTransitionViewController: UIViewControllerTransitioningDelegate { 68 | func animationController(forPresented presented: UIViewController, 69 | presenting: UIViewController, 70 | source: UIViewController) -> UIViewControllerAnimatedTransitioning? { 71 | guard let sourceTransition = source as? RMPZoomTransitionAnimating, 72 | let destinationTransition = presented as? RMPZoomTransitionable else { 73 | return nil 74 | } 75 | 76 | let animator = RMPZoomTransitionAnimator() 77 | animator.goingForward = true 78 | animator.sourceTransition = sourceTransition 79 | animator.destinationTransition = destinationTransition 80 | return animator; 81 | } 82 | 83 | func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { 84 | guard let sourceTransition = dismissed as? RMPZoomTransitionAnimating else { 85 | return nil 86 | } 87 | let destinationTransition = self 88 | 89 | let animator = RMPZoomTransitionAnimator() 90 | animator.goingForward = false 91 | animator.sourceTransition = sourceTransition 92 | animator.destinationTransition = destinationTransition 93 | return animator; 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /Demo/ImageCollectionViewController/ImageCollectionPushTransitionViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | // How to setup 24 | // 25 | // 1. Import RMPZoomTransitionAnimator_Swift 26 | // 2. Adopt RMPZoomTransitionAnimating 27 | // 3. Implement RMPZoomTransitionAnimating protocol 28 | 29 | import UIKit 30 | import RMPZoomTransitionAnimator_Swift 31 | 32 | class ImageCollectionPushTransitionViewController: ImageCollectionViewController { 33 | } 34 | 35 | // MARK: - RMPZoomTransitionAnimating 36 | 37 | extension ImageCollectionPushTransitionViewController: RMPZoomTransitionAnimating { 38 | var transitionSourceImageView: UIImageView { 39 | let selectedIndexPath = self.collectionView.indexPathsForSelectedItems!.first! 40 | let cell = self.collectionView.cellForItem(at: selectedIndexPath) as! ImageCollectionViewCell 41 | let imageView = UIImageView(image: cell.imageView.image) 42 | imageView.contentMode = cell.imageView.contentMode; 43 | imageView.clipsToBounds = true 44 | imageView.isUserInteractionEnabled = false 45 | imageView.frame = cell.imageView.convert(cell.imageView.frame, to: self.collectionView.superview) 46 | return imageView; 47 | } 48 | 49 | var transitionSourceBackgroundColor: UIColor? { 50 | return self.collectionView.backgroundColor 51 | } 52 | 53 | var transitionDestinationImageViewFrame: CGRect { 54 | let selectedIndexPath = self.collectionView.indexPathsForSelectedItems!.first! 55 | let cell = self.collectionView.cellForItem(at: selectedIndexPath) as! ImageCollectionViewCell 56 | let cellFrameInSuperview = cell.imageView.convert(cell.imageView.frame, to: self.collectionView.superview) 57 | return cellFrameInSuperview 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Demo/ImageCollectionViewController/ImageCollectionViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | // How to setup 24 | // 25 | // 1. Import RMPZoomTransitionAnimator_Swift 26 | // 2. Adopt RMPZoomTransitionAnimating 27 | // 3. Implement RMPZoomTransitionAnimating protocol 28 | 29 | import UIKit 30 | import RMPZoomTransitionAnimator_Swift 31 | 32 | class ImageCollectionViewController: UICollectionViewController, RMPZoomTransitionDelegate { 33 | 34 | private let cellMargin: CGFloat = 5 35 | private let reuseIdentifier = "Cell" 36 | 37 | private let items = ["01.jpeg", "02.jpeg", "03.jpeg", "04.jpeg", "05.jpeg", "06.jpeg", "07.jpeg", "08.jpeg", 38 | "09.jpeg", "10.jpeg", "11.jpeg", "12.jpeg", "13.jpeg", "14.jpeg", "15.jpeg", "16.jpeg"] 39 | 40 | override func viewDidLoad() { 41 | super.viewDidLoad() 42 | // Keep selection for back 43 | clearsSelectionOnViewWillAppear = false 44 | } 45 | 46 | // MARK: UICollectionViewDataSource 47 | 48 | override func numberOfSections(in collectionView: UICollectionView) -> Int { 49 | return 1 50 | } 51 | 52 | override func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 53 | return items.count 54 | } 55 | 56 | override func collectionView(_ collectionView: UICollectionView, 57 | cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 58 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath) 59 | guard let imageCollectionViewCell = cell as? ImageCollectionViewCell else { 60 | return cell 61 | } 62 | 63 | let fileName = items[indexPath.row] 64 | imageCollectionViewCell.imageView.image = UIImage(named: fileName) 65 | imageCollectionViewCell.titleLabel.text = fileName 66 | 67 | return imageCollectionViewCell 68 | } 69 | 70 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 71 | if let selected = self.collectionView.indexPathsForSelectedItems?.first?.row { 72 | segue.destination.title = items[selected] 73 | } 74 | } 75 | } 76 | 77 | // MARK: - UICollectionViewDelegateFlowLayout 78 | 79 | extension ImageCollectionViewController: UICollectionViewDelegateFlowLayout { 80 | func collectionView(_ collectionView: UICollectionView, 81 | layout collectionViewLayout: UICollectionViewLayout, 82 | sizeForItemAt indexPath: IndexPath) -> CGSize { 83 | let length = (self.view.frame.width / 2) - (cellMargin * 2) 84 | return CGSize(width: length, height: length) 85 | } 86 | 87 | func collectionView(_ collectionView: UICollectionView, 88 | layout collectionViewLayout: UICollectionViewLayout, 89 | insetForSectionAt section: Int) -> UIEdgeInsets { 90 | return UIEdgeInsets(top: 0, left: cellMargin, bottom: cellMargin, right: cellMargin) 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /Demo/ImageTableViewController/Cell/ImageTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import UIKit 24 | 25 | class ImageTableViewCell: UITableViewCell { 26 | 27 | @IBOutlet weak var mainImageView: UIImageView! 28 | 29 | @IBOutlet weak var titleLabel: UILabel! 30 | } 31 | -------------------------------------------------------------------------------- /Demo/ImageTableViewController/ImageTableModalTransitionViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | // How to setup 24 | // 25 | // 1. Import RMPZoomTransitionAnimator_Swift 26 | // 2. Adopt RMPZoomTransitionAnimating 27 | // 3. Implement RMPZoomTransitionAnimating protocol 28 | 29 | import UIKit 30 | import RMPZoomTransitionAnimator_Swift 31 | 32 | class ImageTableModalTransitionViewController: ImageTableViewController { 33 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 34 | super.prepare(for: segue, sender: sender) 35 | segue.destination.transitioningDelegate = self 36 | } 37 | } 38 | 39 | // MARK: - RMPZoomTransitionAnimating 40 | 41 | extension ImageTableModalTransitionViewController: RMPZoomTransitionAnimating { 42 | var transitionSourceImageView: UIImageView { 43 | let selectedIndexPath = self.tableView.indexPathForSelectedRow! 44 | let cell = self.tableView.cellForRow(at: selectedIndexPath) as! ImageTableViewCell 45 | let imageView = UIImageView(image: cell.mainImageView.image) 46 | imageView.contentMode = cell.mainImageView.contentMode; 47 | imageView.clipsToBounds = true 48 | imageView.isUserInteractionEnabled = false 49 | var frameInSuperview = cell.mainImageView.convert(cell.mainImageView.frame, to: self.tableView.superview) 50 | frameInSuperview.origin.x -= 8 // Left margin of ImageView from Cell 51 | frameInSuperview.origin.y -= 8 // Top margin of ImageView from Cell 52 | imageView.frame = frameInSuperview 53 | return imageView 54 | } 55 | 56 | var transitionSourceBackgroundColor: UIColor? { 57 | return self.tableView.backgroundColor 58 | } 59 | 60 | var transitionDestinationImageViewFrame: CGRect { 61 | let selectedIndexPath = self.tableView.indexPathForSelectedRow! 62 | let cell = self.tableView.cellForRow(at: selectedIndexPath) as! ImageTableViewCell 63 | var frameInSuperview = cell.mainImageView.convert(cell.mainImageView.frame, to: self.tableView.superview) 64 | frameInSuperview.origin.x -= 8 // Left margin of ImageView from Cell 65 | frameInSuperview.origin.y -= 8 // Top margin of ImageView from Cell 66 | return frameInSuperview 67 | } 68 | } 69 | 70 | // MARK: - UIViewControllerTransitioningDelegate 71 | 72 | extension ImageTableModalTransitionViewController: UIViewControllerTransitioningDelegate { 73 | func animationController(forPresented presented: UIViewController, 74 | presenting: UIViewController, 75 | source: UIViewController) -> UIViewControllerAnimatedTransitioning? { 76 | guard let sourceTransition = source as? RMPZoomTransitionAnimating, 77 | let destinationTransition = presented as? RMPZoomTransitionable else { 78 | return nil 79 | } 80 | 81 | let animator = RMPZoomTransitionAnimator() 82 | animator.goingForward = true 83 | animator.sourceTransition = sourceTransition 84 | animator.destinationTransition = destinationTransition 85 | return animator; 86 | } 87 | 88 | func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { 89 | guard let sourceTransition = dismissed as? RMPZoomTransitionable else { 90 | return nil 91 | } 92 | let destinationTransition = self 93 | 94 | let animator = RMPZoomTransitionAnimator() 95 | animator.goingForward = false 96 | animator.sourceTransition = sourceTransition 97 | animator.destinationTransition = destinationTransition 98 | return animator; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /Demo/ImageTableViewController/ImageTablePushTransitionViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | // How to setup 24 | // 25 | // 1. Import RMPZoomTransitionAnimator_Swift 26 | // 2. Adopt RMPZoomTransitionAnimating 27 | // 3. Implement RMPZoomTransitionAnimating protocol 28 | 29 | import UIKit 30 | import RMPZoomTransitionAnimator_Swift 31 | 32 | class ImageTablePushTransitionViewController: ImageTableViewController { 33 | } 34 | 35 | // MARK: - RMPZoomTransitionAnimating 36 | 37 | extension ImageTablePushTransitionViewController: RMPZoomTransitionAnimating { 38 | var transitionSourceImageView: UIImageView { 39 | let selectedIndexPath = self.tableView.indexPathForSelectedRow! 40 | let cell = self.tableView.cellForRow(at: selectedIndexPath) as! ImageTableViewCell 41 | let imageView = UIImageView(image: cell.mainImageView.image) 42 | imageView.contentMode = cell.mainImageView.contentMode; 43 | imageView.clipsToBounds = true 44 | imageView.isUserInteractionEnabled = false 45 | var frameInSuperview = cell.mainImageView.convert(cell.mainImageView.frame, to: self.tableView.superview) 46 | frameInSuperview.origin.x -= 8 // Left margin of ImageView from Cell 47 | frameInSuperview.origin.y -= 8 // Top margin of ImageView from Cell 48 | imageView.frame = frameInSuperview 49 | return imageView 50 | } 51 | 52 | var transitionSourceBackgroundColor: UIColor? { 53 | return self.tableView.backgroundColor 54 | } 55 | 56 | var transitionDestinationImageViewFrame: CGRect { 57 | let selectedIndexPath = self.tableView.indexPathForSelectedRow! 58 | let cell = self.tableView.cellForRow(at: selectedIndexPath) as! ImageTableViewCell 59 | var frameInSuperview = cell.mainImageView.convert(cell.mainImageView.frame, to: self.tableView.superview) 60 | frameInSuperview.origin.x -= 8 // Left margin of ImageView from Cell 61 | frameInSuperview.origin.y -= 8 // Top margin of ImageView from Cell 62 | return frameInSuperview 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Demo/ImageTableViewController/ImageTableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | // How to setup 24 | // 25 | // 1. Import RMPZoomTransitionAnimator_Swift 26 | // 2. Adopt RMPZoomTransitionAnimating 27 | // 3. Implement RMPZoomTransitionAnimating protocol 28 | 29 | import UIKit 30 | import RMPZoomTransitionAnimator_Swift 31 | 32 | class ImageTableViewController: UITableViewController, RMPZoomTransitionDelegate { 33 | 34 | private let reuseIdentifier = "Cell" 35 | 36 | private let items = ["01.jpeg", "02.jpeg", "03.jpeg", "04.jpeg", "05.jpeg", "06.jpeg", "07.jpeg", "08.jpeg", 37 | "09.jpeg", "10.jpeg", "11.jpeg", "12.jpeg", "13.jpeg", "14.jpeg", "15.jpeg", "16.jpeg"] 38 | 39 | override func viewDidLoad() { 40 | super.viewDidLoad() 41 | // Keep selection for back 42 | clearsSelectionOnViewWillAppear = false 43 | } 44 | 45 | override func prepare(for segue: UIStoryboardSegue, sender: Any?) { 46 | if let selected = self.tableView.indexPathForSelectedRow?.row { 47 | segue.destination.title = items[selected] 48 | } 49 | } 50 | 51 | // MARK: - Table view data source 52 | 53 | override func numberOfSections(in tableView: UITableView) -> Int { 54 | return 1 55 | } 56 | 57 | override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 58 | return items.count 59 | } 60 | 61 | override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 62 | let cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath) 63 | guard let imageTableViewCell = cell as? ImageTableViewCell else { 64 | return cell 65 | } 66 | 67 | let fileName = items[indexPath.row] 68 | imageTableViewCell.mainImageView.image = UIImage(named: fileName) 69 | imageTableViewCell.titleLabel.text = fileName 70 | 71 | return imageTableViewCell 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /Demo/NavigationController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import UIKit 24 | import RMPZoomTransitionAnimator_Swift 25 | 26 | class NavigationController: UINavigationController { 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | self.delegate = self 30 | } 31 | } 32 | 33 | extension NavigationController: UINavigationControllerDelegate { 34 | func navigationController(_ navigationController: UINavigationController, 35 | animationControllerFor operation: UINavigationController.Operation, 36 | from fromVC: UIViewController, 37 | to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { 38 | guard let sourceTransition = fromVC as? RMPZoomTransitionAnimating, 39 | let destinationTransition = toVC as? RMPZoomTransitionable else { 40 | return nil 41 | } 42 | 43 | let animator = RMPZoomTransitionAnimator() 44 | animator.goingForward = (operation == .push) 45 | animator.sourceTransition = sourceTransition 46 | animator.destinationTransition = destinationTransition 47 | return animator; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 4 | Copyright (c) 2018 Yuichi Hirano 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 9 | 10 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | RMPZoomTransitionAnimator-Swift 2 | == 3 | 4 | ![platforms](https://img.shields.io/badge/platforms-iOS-333333.svg) 5 | [![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](LICENSE) 6 | [![Language: Swift 4.0](https://img.shields.io/badge/swift-4.2-4BC51D.svg?style=flat)](https://developer.apple.com/swift) 7 | [![Version](https://img.shields.io/cocoapods/v/RMPZoomTransitionAnimator-Swift.svg?style=flat)](http://cocoadocs.org/docsets/RMPZoomTransitionAnimator-Swift) 8 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/hsylife/SwiftyPickerPopover) 9 | 10 | `RMPZoomTransitionAnimator-Swift` provide a custom transition zooming animation. 11 | 12 | Not only `UICollectionView`, this is possible to use any other `UIViewController` transition. 13 | 14 | This transition animation is like the "Pinterest" animation, but this is very simple and small library. 15 | 16 | ![Screen shot](doc/collectionview.gif) 17 | ![Screen shot](doc/tableview.gif) 18 | 19 | ## Installation 20 | 21 | ### CocoaPods 22 | 23 | Simply add the following line to your `Podfile`: 24 | 25 | ``` 26 | pod 'RMPZoomTransitionAnimator-Swift' 27 | ``` 28 | 29 | ### Cartage 30 | 31 | Simply add the following line to your `Cartfile`: 32 | 33 | ``` 34 | github "yhirano/RMPZoomTransitionAnimator-Swift" 35 | ``` 36 | 37 | ## Usage 38 | 39 | Setup is as below: 40 | 41 | ### Use for an UINavigationController push transition 42 | 43 | Refer to the example project for details. 44 | 45 | - Import `RMPZoomTransitionAnimator-Swift` 46 | - Adopt `RMPZoomTransitionAnimating` 47 | - Implement the `RMPZoomTransitionAnimating` protocol below, both source view controller and destination view controller 48 | 1. `var transitionSourceImageView: UIImageView { get }` 49 | 2. `var transitionSourceBackgroundColor: UIColor? { get }` 50 | 3. `var transitionDestinationImageViewFrame: CGRect { get }` 51 | - Returns RMPZoomTransitionAnimator instance in the UINavigationController delegate method 52 | 53 | ```swift 54 | // UINavigationControllerDelegate 55 | func navigationController(_ navigationController: UINavigationController, 56 | animationControllerFor operation: UINavigationController.Operation, 57 | from fromVC: UIViewController, 58 | to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? { 59 | guard let sourceTransition = fromVC as? RMPZoomTransitionAnimating, 60 | let destinationTransition = toVC as? RMPZoomTransitionable else { 61 | return nil 62 | } 63 | 64 | // minimum implementation for example 65 | let animator = RMPZoomTransitionAnimator() 66 | animator.goingForward = (operation == .push) 67 | animator.sourceTransition = sourceTransition 68 | animator.destinationTransition = destinationTransition 69 | return animator; 70 | } 71 | ``` 72 | 73 | ### Use for a modal transition 74 | 75 | Refer to the example project for details. 76 | 77 | - Import `RMPZoomTransitionAnimator-Swift` 78 | - Adopt `RMPZoomTransitionAnimating` 79 | - Implement `RMPZoomTransitionAnimating` protocol below, both source view controller and destination view controller 80 | 1. `var transitionSourceImageView: UIImageView { get }` 81 | 2. `var transitionSourceBackgroundColor: UIColor? { get }` 82 | 3. `var transitionDestinationImageViewFrame: CGRect { get }` 83 | - Set the transitioningDelegate in `prepare(for segue: UIStoryboardSegue, sender: Any?)` 84 | - Returns RMPZoomTransitionAnimator instance in the UIViewControllerTransitioningDelegate method 85 | 86 | ```swift 87 | // UIViewControllerTransitioningDelegate 88 | func animationController(forPresented presented: UIViewController, 89 | presenting: UIViewController, 90 | source: UIViewController) -> UIViewControllerAnimatedTransitioning? { 91 | guard let sourceTransition = source as? RMPZoomTransitionAnimating, 92 | let destinationTransition = presented as? RMPZoomTransitionable else { 93 | return nil 94 | } 95 | 96 | let animator = RMPZoomTransitionAnimator() 97 | animator.goingForward = true 98 | animator.sourceTransition = sourceTransition 99 | animator.destinationTransition = destinationTransition 100 | return animator; 101 | } 102 | 103 | func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? { 104 | guard let sourceTransition = dismissed as? RMPZoomTransitionable else { 105 | return nil 106 | } 107 | let destinationTransition = self 108 | 109 | // minimum implementation for example 110 | let animator = RMPZoomTransitionAnimator() 111 | animator.goingForward = false 112 | animator.sourceTransition = sourceTransition 113 | animator.destinationTransition = destinationTransition 114 | return animator; 115 | } 116 | ``` 117 | 118 | ## Requirements 119 | 120 | - iOS 10.0 or higher 121 | 122 | ## License 123 | 124 | RMPZoomTransitionAnimator-Swift is available under the MIT license. 125 | 126 | ## References 127 | 128 | [RMPZoomTransitionAnimator](https://github.com/recruit-mp/RMPZoomTransitionAnimator) 129 | -------------------------------------------------------------------------------- /RMPZoomTransitionAnimator-Swift.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "RMPZoomTransitionAnimator-Swift" 3 | s.version = "2.0" 4 | s.summary = "A custom zooming transition animation for UIViewController." 5 | s.homepage = "https://github.com/yhirano/RMPZoomTransitionAnimator-Swift/" 6 | s.license = { :type => "MIT", :file => "LICENSE" } 7 | s.author = { "Yuichi Hirano" => "chirano@uraroji.com" } 8 | s.platform = :ios, "10.0" 9 | s.source = { :git => "https://github.com/yhirano/RMPZoomTransitionAnimator-Swift.git", :tag => "#{s.version}" } 10 | s.source_files = "RMPZoomTransitionAnimator-Swift/*.swift" 11 | s.swift_version = "4.2" 12 | s.requires_arc = true 13 | end 14 | -------------------------------------------------------------------------------- /RMPZoomTransitionAnimator-Swift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8EECE95721C6719600A78DF9 /* RMPZoomTransitionAnimating.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE95621C6719600A78DF9 /* RMPZoomTransitionAnimating.swift */; }; 11 | 8EECE95921C6721200A78DF9 /* RMPZoomTransitionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE95821C6721200A78DF9 /* RMPZoomTransitionDelegate.swift */; }; 12 | 8EECE95B21C6734C00A78DF9 /* RMPZoomTransitionAnimator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE95A21C6734C00A78DF9 /* RMPZoomTransitionAnimator.swift */; }; 13 | 8EECE96321C6805600A78DF9 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE96221C6805600A78DF9 /* AppDelegate.swift */; }; 14 | 8EECE96521C6805600A78DF9 /* NavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE96421C6805600A78DF9 /* NavigationController.swift */; }; 15 | 8EECE96821C6805600A78DF9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE96621C6805600A78DF9 /* Main.storyboard */; }; 16 | 8EECE96A21C6805700A78DF9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE96921C6805700A78DF9 /* Assets.xcassets */; }; 17 | 8EECE96D21C6805700A78DF9 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE96B21C6805700A78DF9 /* LaunchScreen.storyboard */; }; 18 | 8EECE97B21C688C200A78DF9 /* RMPZoomTransitionAnimator_Swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8EECE94B21C6715200A78DF9 /* RMPZoomTransitionAnimator_Swift.framework */; }; 19 | 8EECE97D21C68CC900A78DF9 /* ImageCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE97C21C68CC900A78DF9 /* ImageCollectionViewController.swift */; }; 20 | 8EECE98021C68F0A00A78DF9 /* ImageCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE97F21C68F0A00A78DF9 /* ImageCollectionViewCell.swift */; }; 21 | 8EECE98221C696AF00A78DF9 /* ImageCollectionPushTransitionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE98121C696AF00A78DF9 /* ImageCollectionPushTransitionViewController.swift */; }; 22 | 8EECE9CA21C69CB100A78DF9 /* DetailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE9C921C69CB100A78DF9 /* DetailViewController.swift */; }; 23 | 8EECE9DC21C6A5B400A78DF9 /* 10.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9CC21C6A5B400A78DF9 /* 10.jpeg */; }; 24 | 8EECE9DD21C6A5B400A78DF9 /* 06.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9CD21C6A5B400A78DF9 /* 06.jpeg */; }; 25 | 8EECE9DE21C6A5B400A78DF9 /* 07.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9CE21C6A5B400A78DF9 /* 07.jpeg */; }; 26 | 8EECE9DF21C6A5B400A78DF9 /* 11.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9CF21C6A5B400A78DF9 /* 11.jpeg */; }; 27 | 8EECE9E021C6A5B400A78DF9 /* 16.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D021C6A5B400A78DF9 /* 16.jpeg */; }; 28 | 8EECE9E121C6A5B400A78DF9 /* 01.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D121C6A5B400A78DF9 /* 01.jpeg */; }; 29 | 8EECE9E221C6A5B400A78DF9 /* 02.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D221C6A5B400A78DF9 /* 02.jpeg */; }; 30 | 8EECE9E321C6A5B400A78DF9 /* 14.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D321C6A5B400A78DF9 /* 14.jpeg */; }; 31 | 8EECE9E421C6A5B400A78DF9 /* 15.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D421C6A5B400A78DF9 /* 15.jpeg */; }; 32 | 8EECE9E521C6A5B400A78DF9 /* 03.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D521C6A5B400A78DF9 /* 03.jpeg */; }; 33 | 8EECE9E621C6A5B400A78DF9 /* 04.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D621C6A5B400A78DF9 /* 04.jpeg */; }; 34 | 8EECE9E721C6A5B400A78DF9 /* 12.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D721C6A5B400A78DF9 /* 12.jpeg */; }; 35 | 8EECE9E821C6A5B400A78DF9 /* 08.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D821C6A5B400A78DF9 /* 08.jpeg */; }; 36 | 8EECE9E921C6A5B400A78DF9 /* 09.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9D921C6A5B400A78DF9 /* 09.jpeg */; }; 37 | 8EECE9EA21C6A5B400A78DF9 /* 13.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9DA21C6A5B400A78DF9 /* 13.jpeg */; }; 38 | 8EECE9EB21C6A5B400A78DF9 /* 05.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = 8EECE9DB21C6A5B400A78DF9 /* 05.jpeg */; }; 39 | 8EECE9ED21C6A5EB00A78DF9 /* ImageCollectionModalTransitionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE9EC21C6A5EB00A78DF9 /* ImageCollectionModalTransitionViewController.swift */; }; 40 | 8EECE9F121C6ACAB00A78DF9 /* ImageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE9F021C6ACAB00A78DF9 /* ImageTableViewCell.swift */; }; 41 | 8EECE9F321C6ADFD00A78DF9 /* ImageTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE9F221C6ADFD00A78DF9 /* ImageTableViewController.swift */; }; 42 | 8EECE9F521C6AF2300A78DF9 /* ImageTablePushTransitionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE9F421C6AF2300A78DF9 /* ImageTablePushTransitionViewController.swift */; }; 43 | 8EECE9F721C6B1FD00A78DF9 /* ImageTableModalTransitionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EECE9F621C6B1FD00A78DF9 /* ImageTableModalTransitionViewController.swift */; }; 44 | /* End PBXBuildFile section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 8EECE94B21C6715200A78DF9 /* RMPZoomTransitionAnimator_Swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RMPZoomTransitionAnimator_Swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 8EECE94F21C6715200A78DF9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | 8EECE95621C6719600A78DF9 /* RMPZoomTransitionAnimating.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RMPZoomTransitionAnimating.swift; sourceTree = ""; }; 50 | 8EECE95821C6721200A78DF9 /* RMPZoomTransitionDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RMPZoomTransitionDelegate.swift; sourceTree = ""; }; 51 | 8EECE95A21C6734C00A78DF9 /* RMPZoomTransitionAnimator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RMPZoomTransitionAnimator.swift; sourceTree = ""; }; 52 | 8EECE96021C6805600A78DF9 /* Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 8EECE96221C6805600A78DF9 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 54 | 8EECE96421C6805600A78DF9 /* NavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationController.swift; sourceTree = ""; }; 55 | 8EECE96721C6805600A78DF9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 8EECE96921C6805700A78DF9 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 8EECE96C21C6805700A78DF9 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 8EECE96E21C6805700A78DF9 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | 8EECE97C21C68CC900A78DF9 /* ImageCollectionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCollectionViewController.swift; sourceTree = ""; }; 60 | 8EECE97F21C68F0A00A78DF9 /* ImageCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCollectionViewCell.swift; sourceTree = ""; }; 61 | 8EECE98121C696AF00A78DF9 /* ImageCollectionPushTransitionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCollectionPushTransitionViewController.swift; sourceTree = ""; }; 62 | 8EECE9C921C69CB100A78DF9 /* DetailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DetailViewController.swift; sourceTree = ""; }; 63 | 8EECE9CC21C6A5B400A78DF9 /* 10.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 10.jpeg; sourceTree = ""; }; 64 | 8EECE9CD21C6A5B400A78DF9 /* 06.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 06.jpeg; sourceTree = ""; }; 65 | 8EECE9CE21C6A5B400A78DF9 /* 07.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 07.jpeg; sourceTree = ""; }; 66 | 8EECE9CF21C6A5B400A78DF9 /* 11.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 11.jpeg; sourceTree = ""; }; 67 | 8EECE9D021C6A5B400A78DF9 /* 16.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 16.jpeg; sourceTree = ""; }; 68 | 8EECE9D121C6A5B400A78DF9 /* 01.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 01.jpeg; sourceTree = ""; }; 69 | 8EECE9D221C6A5B400A78DF9 /* 02.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 02.jpeg; sourceTree = ""; }; 70 | 8EECE9D321C6A5B400A78DF9 /* 14.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 14.jpeg; sourceTree = ""; }; 71 | 8EECE9D421C6A5B400A78DF9 /* 15.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 15.jpeg; sourceTree = ""; }; 72 | 8EECE9D521C6A5B400A78DF9 /* 03.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 03.jpeg; sourceTree = ""; }; 73 | 8EECE9D621C6A5B400A78DF9 /* 04.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 04.jpeg; sourceTree = ""; }; 74 | 8EECE9D721C6A5B400A78DF9 /* 12.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 12.jpeg; sourceTree = ""; }; 75 | 8EECE9D821C6A5B400A78DF9 /* 08.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 08.jpeg; sourceTree = ""; }; 76 | 8EECE9D921C6A5B400A78DF9 /* 09.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 09.jpeg; sourceTree = ""; }; 77 | 8EECE9DA21C6A5B400A78DF9 /* 13.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 13.jpeg; sourceTree = ""; }; 78 | 8EECE9DB21C6A5B400A78DF9 /* 05.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = 05.jpeg; sourceTree = ""; }; 79 | 8EECE9EC21C6A5EB00A78DF9 /* ImageCollectionModalTransitionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCollectionModalTransitionViewController.swift; sourceTree = ""; }; 80 | 8EECE9F021C6ACAB00A78DF9 /* ImageTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageTableViewCell.swift; sourceTree = ""; }; 81 | 8EECE9F221C6ADFD00A78DF9 /* ImageTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageTableViewController.swift; sourceTree = ""; }; 82 | 8EECE9F421C6AF2300A78DF9 /* ImageTablePushTransitionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageTablePushTransitionViewController.swift; sourceTree = ""; }; 83 | 8EECE9F621C6B1FD00A78DF9 /* ImageTableModalTransitionViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageTableModalTransitionViewController.swift; sourceTree = ""; }; 84 | /* End PBXFileReference section */ 85 | 86 | /* Begin PBXFrameworksBuildPhase section */ 87 | 8EECE94821C6715200A78DF9 /* Frameworks */ = { 88 | isa = PBXFrameworksBuildPhase; 89 | buildActionMask = 2147483647; 90 | files = ( 91 | ); 92 | runOnlyForDeploymentPostprocessing = 0; 93 | }; 94 | 8EECE95D21C6805600A78DF9 /* Frameworks */ = { 95 | isa = PBXFrameworksBuildPhase; 96 | buildActionMask = 2147483647; 97 | files = ( 98 | 8EECE97B21C688C200A78DF9 /* RMPZoomTransitionAnimator_Swift.framework in Frameworks */, 99 | ); 100 | runOnlyForDeploymentPostprocessing = 0; 101 | }; 102 | /* End PBXFrameworksBuildPhase section */ 103 | 104 | /* Begin PBXGroup section */ 105 | 8EECE94121C6715200A78DF9 = { 106 | isa = PBXGroup; 107 | children = ( 108 | 8EECE94D21C6715200A78DF9 /* RMPZoomTransitionAnimator-Swift */, 109 | 8EECE96121C6805600A78DF9 /* Demo */, 110 | 8EECE94C21C6715200A78DF9 /* Products */, 111 | 8EECE97721C685FF00A78DF9 /* Frameworks */, 112 | ); 113 | sourceTree = ""; 114 | }; 115 | 8EECE94C21C6715200A78DF9 /* Products */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 8EECE94B21C6715200A78DF9 /* RMPZoomTransitionAnimator_Swift.framework */, 119 | 8EECE96021C6805600A78DF9 /* Demo.app */, 120 | ); 121 | name = Products; 122 | sourceTree = ""; 123 | }; 124 | 8EECE94D21C6715200A78DF9 /* RMPZoomTransitionAnimator-Swift */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 8EECE94F21C6715200A78DF9 /* Info.plist */, 128 | 8EECE95621C6719600A78DF9 /* RMPZoomTransitionAnimating.swift */, 129 | 8EECE95821C6721200A78DF9 /* RMPZoomTransitionDelegate.swift */, 130 | 8EECE95A21C6734C00A78DF9 /* RMPZoomTransitionAnimator.swift */, 131 | ); 132 | path = "RMPZoomTransitionAnimator-Swift"; 133 | sourceTree = ""; 134 | }; 135 | 8EECE96121C6805600A78DF9 /* Demo */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 8EECE96221C6805600A78DF9 /* AppDelegate.swift */, 139 | 8EECE96421C6805600A78DF9 /* NavigationController.swift */, 140 | 8EECE97E21C68EE500A78DF9 /* ImageCollectionViewController */, 141 | 8EECE9EE21C6AC8400A78DF9 /* ImageTableViewController */, 142 | 8EECE9C921C69CB100A78DF9 /* DetailViewController.swift */, 143 | 8EECE96621C6805600A78DF9 /* Main.storyboard */, 144 | 8EECE96B21C6805700A78DF9 /* LaunchScreen.storyboard */, 145 | 8EECE96921C6805700A78DF9 /* Assets.xcassets */, 146 | 8EECE9CB21C6A5B400A78DF9 /* Demo Images */, 147 | 8EECE96E21C6805700A78DF9 /* Info.plist */, 148 | ); 149 | path = Demo; 150 | sourceTree = ""; 151 | }; 152 | 8EECE97721C685FF00A78DF9 /* Frameworks */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | ); 156 | name = Frameworks; 157 | sourceTree = ""; 158 | }; 159 | 8EECE97E21C68EE500A78DF9 /* ImageCollectionViewController */ = { 160 | isa = PBXGroup; 161 | children = ( 162 | 8EECE98321C696B500A78DF9 /* Cell */, 163 | 8EECE97C21C68CC900A78DF9 /* ImageCollectionViewController.swift */, 164 | 8EECE98121C696AF00A78DF9 /* ImageCollectionPushTransitionViewController.swift */, 165 | 8EECE9EC21C6A5EB00A78DF9 /* ImageCollectionModalTransitionViewController.swift */, 166 | ); 167 | path = ImageCollectionViewController; 168 | sourceTree = ""; 169 | }; 170 | 8EECE98321C696B500A78DF9 /* Cell */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 8EECE97F21C68F0A00A78DF9 /* ImageCollectionViewCell.swift */, 174 | ); 175 | path = Cell; 176 | sourceTree = ""; 177 | }; 178 | 8EECE9CB21C6A5B400A78DF9 /* Demo Images */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 8EECE9CC21C6A5B400A78DF9 /* 10.jpeg */, 182 | 8EECE9CD21C6A5B400A78DF9 /* 06.jpeg */, 183 | 8EECE9CE21C6A5B400A78DF9 /* 07.jpeg */, 184 | 8EECE9CF21C6A5B400A78DF9 /* 11.jpeg */, 185 | 8EECE9D021C6A5B400A78DF9 /* 16.jpeg */, 186 | 8EECE9D121C6A5B400A78DF9 /* 01.jpeg */, 187 | 8EECE9D221C6A5B400A78DF9 /* 02.jpeg */, 188 | 8EECE9D321C6A5B400A78DF9 /* 14.jpeg */, 189 | 8EECE9D421C6A5B400A78DF9 /* 15.jpeg */, 190 | 8EECE9D521C6A5B400A78DF9 /* 03.jpeg */, 191 | 8EECE9D621C6A5B400A78DF9 /* 04.jpeg */, 192 | 8EECE9D721C6A5B400A78DF9 /* 12.jpeg */, 193 | 8EECE9D821C6A5B400A78DF9 /* 08.jpeg */, 194 | 8EECE9D921C6A5B400A78DF9 /* 09.jpeg */, 195 | 8EECE9DA21C6A5B400A78DF9 /* 13.jpeg */, 196 | 8EECE9DB21C6A5B400A78DF9 /* 05.jpeg */, 197 | ); 198 | path = "Demo Images"; 199 | sourceTree = ""; 200 | }; 201 | 8EECE9EE21C6AC8400A78DF9 /* ImageTableViewController */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | 8EECE9EF21C6AC9000A78DF9 /* Cell */, 205 | 8EECE9F221C6ADFD00A78DF9 /* ImageTableViewController.swift */, 206 | 8EECE9F421C6AF2300A78DF9 /* ImageTablePushTransitionViewController.swift */, 207 | 8EECE9F621C6B1FD00A78DF9 /* ImageTableModalTransitionViewController.swift */, 208 | ); 209 | path = ImageTableViewController; 210 | sourceTree = ""; 211 | }; 212 | 8EECE9EF21C6AC9000A78DF9 /* Cell */ = { 213 | isa = PBXGroup; 214 | children = ( 215 | 8EECE9F021C6ACAB00A78DF9 /* ImageTableViewCell.swift */, 216 | ); 217 | path = Cell; 218 | sourceTree = ""; 219 | }; 220 | /* End PBXGroup section */ 221 | 222 | /* Begin PBXHeadersBuildPhase section */ 223 | 8EECE94621C6715200A78DF9 /* Headers */ = { 224 | isa = PBXHeadersBuildPhase; 225 | buildActionMask = 2147483647; 226 | files = ( 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | /* End PBXHeadersBuildPhase section */ 231 | 232 | /* Begin PBXNativeTarget section */ 233 | 8EECE94A21C6715200A78DF9 /* RMPZoomTransitionAnimator-Swift */ = { 234 | isa = PBXNativeTarget; 235 | buildConfigurationList = 8EECE95321C6715200A78DF9 /* Build configuration list for PBXNativeTarget "RMPZoomTransitionAnimator-Swift" */; 236 | buildPhases = ( 237 | 8EECE94621C6715200A78DF9 /* Headers */, 238 | 8EECE94721C6715200A78DF9 /* Sources */, 239 | 8EECE94821C6715200A78DF9 /* Frameworks */, 240 | 8EECE94921C6715200A78DF9 /* Resources */, 241 | ); 242 | buildRules = ( 243 | ); 244 | dependencies = ( 245 | ); 246 | name = "RMPZoomTransitionAnimator-Swift"; 247 | productName = "RMPZoomTransitionAnimator-Swift"; 248 | productReference = 8EECE94B21C6715200A78DF9 /* RMPZoomTransitionAnimator_Swift.framework */; 249 | productType = "com.apple.product-type.framework"; 250 | }; 251 | 8EECE95F21C6805600A78DF9 /* Demo */ = { 252 | isa = PBXNativeTarget; 253 | buildConfigurationList = 8EECE96F21C6805700A78DF9 /* Build configuration list for PBXNativeTarget "Demo" */; 254 | buildPhases = ( 255 | 8EECE95C21C6805600A78DF9 /* Sources */, 256 | 8EECE95D21C6805600A78DF9 /* Frameworks */, 257 | 8EECE95E21C6805600A78DF9 /* Resources */, 258 | ); 259 | buildRules = ( 260 | ); 261 | dependencies = ( 262 | ); 263 | name = Demo; 264 | productName = Demo; 265 | productReference = 8EECE96021C6805600A78DF9 /* Demo.app */; 266 | productType = "com.apple.product-type.application"; 267 | }; 268 | /* End PBXNativeTarget section */ 269 | 270 | /* Begin PBXProject section */ 271 | 8EECE94221C6715200A78DF9 /* Project object */ = { 272 | isa = PBXProject; 273 | attributes = { 274 | LastSwiftUpdateCheck = 1010; 275 | LastUpgradeCheck = 1010; 276 | ORGANIZATIONNAME = "Recruit Marketing Partners Co.,Ltd."; 277 | TargetAttributes = { 278 | 8EECE94A21C6715200A78DF9 = { 279 | CreatedOnToolsVersion = 10.1; 280 | LastSwiftMigration = 1010; 281 | }; 282 | 8EECE95F21C6805600A78DF9 = { 283 | CreatedOnToolsVersion = 10.1; 284 | }; 285 | }; 286 | }; 287 | buildConfigurationList = 8EECE94521C6715200A78DF9 /* Build configuration list for PBXProject "RMPZoomTransitionAnimator-Swift" */; 288 | compatibilityVersion = "Xcode 9.3"; 289 | developmentRegion = en; 290 | hasScannedForEncodings = 0; 291 | knownRegions = ( 292 | en, 293 | Base, 294 | ); 295 | mainGroup = 8EECE94121C6715200A78DF9; 296 | productRefGroup = 8EECE94C21C6715200A78DF9 /* Products */; 297 | projectDirPath = ""; 298 | projectRoot = ""; 299 | targets = ( 300 | 8EECE94A21C6715200A78DF9 /* RMPZoomTransitionAnimator-Swift */, 301 | 8EECE95F21C6805600A78DF9 /* Demo */, 302 | ); 303 | }; 304 | /* End PBXProject section */ 305 | 306 | /* Begin PBXResourcesBuildPhase section */ 307 | 8EECE94921C6715200A78DF9 /* Resources */ = { 308 | isa = PBXResourcesBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | ); 312 | runOnlyForDeploymentPostprocessing = 0; 313 | }; 314 | 8EECE95E21C6805600A78DF9 /* Resources */ = { 315 | isa = PBXResourcesBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | 8EECE9DE21C6A5B400A78DF9 /* 07.jpeg in Resources */, 319 | 8EECE9E221C6A5B400A78DF9 /* 02.jpeg in Resources */, 320 | 8EECE9DC21C6A5B400A78DF9 /* 10.jpeg in Resources */, 321 | 8EECE9EA21C6A5B400A78DF9 /* 13.jpeg in Resources */, 322 | 8EECE9E821C6A5B400A78DF9 /* 08.jpeg in Resources */, 323 | 8EECE9EB21C6A5B400A78DF9 /* 05.jpeg in Resources */, 324 | 8EECE9E021C6A5B400A78DF9 /* 16.jpeg in Resources */, 325 | 8EECE96D21C6805700A78DF9 /* LaunchScreen.storyboard in Resources */, 326 | 8EECE96A21C6805700A78DF9 /* Assets.xcassets in Resources */, 327 | 8EECE9DF21C6A5B400A78DF9 /* 11.jpeg in Resources */, 328 | 8EECE9E621C6A5B400A78DF9 /* 04.jpeg in Resources */, 329 | 8EECE9E121C6A5B400A78DF9 /* 01.jpeg in Resources */, 330 | 8EECE9E321C6A5B400A78DF9 /* 14.jpeg in Resources */, 331 | 8EECE9E421C6A5B400A78DF9 /* 15.jpeg in Resources */, 332 | 8EECE9E521C6A5B400A78DF9 /* 03.jpeg in Resources */, 333 | 8EECE9E721C6A5B400A78DF9 /* 12.jpeg in Resources */, 334 | 8EECE9E921C6A5B400A78DF9 /* 09.jpeg in Resources */, 335 | 8EECE9DD21C6A5B400A78DF9 /* 06.jpeg in Resources */, 336 | 8EECE96821C6805600A78DF9 /* Main.storyboard in Resources */, 337 | ); 338 | runOnlyForDeploymentPostprocessing = 0; 339 | }; 340 | /* End PBXResourcesBuildPhase section */ 341 | 342 | /* Begin PBXSourcesBuildPhase section */ 343 | 8EECE94721C6715200A78DF9 /* Sources */ = { 344 | isa = PBXSourcesBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | 8EECE95921C6721200A78DF9 /* RMPZoomTransitionDelegate.swift in Sources */, 348 | 8EECE95721C6719600A78DF9 /* RMPZoomTransitionAnimating.swift in Sources */, 349 | 8EECE95B21C6734C00A78DF9 /* RMPZoomTransitionAnimator.swift in Sources */, 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | 8EECE95C21C6805600A78DF9 /* Sources */ = { 354 | isa = PBXSourcesBuildPhase; 355 | buildActionMask = 2147483647; 356 | files = ( 357 | 8EECE97D21C68CC900A78DF9 /* ImageCollectionViewController.swift in Sources */, 358 | 8EECE9F321C6ADFD00A78DF9 /* ImageTableViewController.swift in Sources */, 359 | 8EECE9F721C6B1FD00A78DF9 /* ImageTableModalTransitionViewController.swift in Sources */, 360 | 8EECE9F121C6ACAB00A78DF9 /* ImageTableViewCell.swift in Sources */, 361 | 8EECE96521C6805600A78DF9 /* NavigationController.swift in Sources */, 362 | 8EECE9F521C6AF2300A78DF9 /* ImageTablePushTransitionViewController.swift in Sources */, 363 | 8EECE9ED21C6A5EB00A78DF9 /* ImageCollectionModalTransitionViewController.swift in Sources */, 364 | 8EECE98021C68F0A00A78DF9 /* ImageCollectionViewCell.swift in Sources */, 365 | 8EECE9CA21C69CB100A78DF9 /* DetailViewController.swift in Sources */, 366 | 8EECE96321C6805600A78DF9 /* AppDelegate.swift in Sources */, 367 | 8EECE98221C696AF00A78DF9 /* ImageCollectionPushTransitionViewController.swift in Sources */, 368 | ); 369 | runOnlyForDeploymentPostprocessing = 0; 370 | }; 371 | /* End PBXSourcesBuildPhase section */ 372 | 373 | /* Begin PBXVariantGroup section */ 374 | 8EECE96621C6805600A78DF9 /* Main.storyboard */ = { 375 | isa = PBXVariantGroup; 376 | children = ( 377 | 8EECE96721C6805600A78DF9 /* Base */, 378 | ); 379 | name = Main.storyboard; 380 | sourceTree = ""; 381 | }; 382 | 8EECE96B21C6805700A78DF9 /* LaunchScreen.storyboard */ = { 383 | isa = PBXVariantGroup; 384 | children = ( 385 | 8EECE96C21C6805700A78DF9 /* Base */, 386 | ); 387 | name = LaunchScreen.storyboard; 388 | sourceTree = ""; 389 | }; 390 | /* End PBXVariantGroup section */ 391 | 392 | /* Begin XCBuildConfiguration section */ 393 | 8EECE95121C6715200A78DF9 /* Debug */ = { 394 | isa = XCBuildConfiguration; 395 | buildSettings = { 396 | ALWAYS_SEARCH_USER_PATHS = NO; 397 | CLANG_ANALYZER_NONNULL = YES; 398 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 399 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 400 | CLANG_CXX_LIBRARY = "libc++"; 401 | CLANG_ENABLE_MODULES = YES; 402 | CLANG_ENABLE_OBJC_ARC = YES; 403 | CLANG_ENABLE_OBJC_WEAK = YES; 404 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 405 | CLANG_WARN_BOOL_CONVERSION = YES; 406 | CLANG_WARN_COMMA = YES; 407 | CLANG_WARN_CONSTANT_CONVERSION = YES; 408 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 409 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 410 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 411 | CLANG_WARN_EMPTY_BODY = YES; 412 | CLANG_WARN_ENUM_CONVERSION = YES; 413 | CLANG_WARN_INFINITE_RECURSION = YES; 414 | CLANG_WARN_INT_CONVERSION = YES; 415 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 416 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 417 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 418 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 419 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 420 | CLANG_WARN_STRICT_PROTOTYPES = YES; 421 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 422 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 423 | CLANG_WARN_UNREACHABLE_CODE = YES; 424 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 425 | CODE_SIGN_IDENTITY = "iPhone Developer"; 426 | COPY_PHASE_STRIP = NO; 427 | CURRENT_PROJECT_VERSION = 1; 428 | DEBUG_INFORMATION_FORMAT = dwarf; 429 | ENABLE_STRICT_OBJC_MSGSEND = YES; 430 | ENABLE_TESTABILITY = YES; 431 | GCC_C_LANGUAGE_STANDARD = gnu11; 432 | GCC_DYNAMIC_NO_PIC = NO; 433 | GCC_NO_COMMON_BLOCKS = YES; 434 | GCC_OPTIMIZATION_LEVEL = 0; 435 | GCC_PREPROCESSOR_DEFINITIONS = ( 436 | "DEBUG=1", 437 | "$(inherited)", 438 | ); 439 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 440 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 441 | GCC_WARN_UNDECLARED_SELECTOR = YES; 442 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 443 | GCC_WARN_UNUSED_FUNCTION = YES; 444 | GCC_WARN_UNUSED_VARIABLE = YES; 445 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 446 | MTL_FAST_MATH = YES; 447 | ONLY_ACTIVE_ARCH = YES; 448 | SDKROOT = iphoneos; 449 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 450 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 451 | VERSIONING_SYSTEM = "apple-generic"; 452 | VERSION_INFO_PREFIX = ""; 453 | }; 454 | name = Debug; 455 | }; 456 | 8EECE95221C6715200A78DF9 /* Release */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | ALWAYS_SEARCH_USER_PATHS = NO; 460 | CLANG_ANALYZER_NONNULL = YES; 461 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 462 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 463 | CLANG_CXX_LIBRARY = "libc++"; 464 | CLANG_ENABLE_MODULES = YES; 465 | CLANG_ENABLE_OBJC_ARC = YES; 466 | CLANG_ENABLE_OBJC_WEAK = YES; 467 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 468 | CLANG_WARN_BOOL_CONVERSION = YES; 469 | CLANG_WARN_COMMA = YES; 470 | CLANG_WARN_CONSTANT_CONVERSION = YES; 471 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 472 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 473 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 474 | CLANG_WARN_EMPTY_BODY = YES; 475 | CLANG_WARN_ENUM_CONVERSION = YES; 476 | CLANG_WARN_INFINITE_RECURSION = YES; 477 | CLANG_WARN_INT_CONVERSION = YES; 478 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 479 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 480 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 481 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 482 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 483 | CLANG_WARN_STRICT_PROTOTYPES = YES; 484 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 485 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 486 | CLANG_WARN_UNREACHABLE_CODE = YES; 487 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 488 | CODE_SIGN_IDENTITY = "iPhone Developer"; 489 | COPY_PHASE_STRIP = NO; 490 | CURRENT_PROJECT_VERSION = 1; 491 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 492 | ENABLE_NS_ASSERTIONS = NO; 493 | ENABLE_STRICT_OBJC_MSGSEND = YES; 494 | GCC_C_LANGUAGE_STANDARD = gnu11; 495 | GCC_NO_COMMON_BLOCKS = YES; 496 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 497 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 498 | GCC_WARN_UNDECLARED_SELECTOR = YES; 499 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 500 | GCC_WARN_UNUSED_FUNCTION = YES; 501 | GCC_WARN_UNUSED_VARIABLE = YES; 502 | MTL_ENABLE_DEBUG_INFO = NO; 503 | MTL_FAST_MATH = YES; 504 | SDKROOT = iphoneos; 505 | SWIFT_COMPILATION_MODE = wholemodule; 506 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 507 | VALIDATE_PRODUCT = YES; 508 | VERSIONING_SYSTEM = "apple-generic"; 509 | VERSION_INFO_PREFIX = ""; 510 | }; 511 | name = Release; 512 | }; 513 | 8EECE95421C6715200A78DF9 /* Debug */ = { 514 | isa = XCBuildConfiguration; 515 | buildSettings = { 516 | CLANG_ENABLE_MODULES = YES; 517 | CODE_SIGN_IDENTITY = ""; 518 | CODE_SIGN_STYLE = Automatic; 519 | DEFINES_MODULE = YES; 520 | DYLIB_COMPATIBILITY_VERSION = 1; 521 | DYLIB_CURRENT_VERSION = 1; 522 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 523 | INFOPLIST_FILE = "RMPZoomTransitionAnimator-Swift/Info.plist"; 524 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 525 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 526 | LD_RUNPATH_SEARCH_PATHS = ( 527 | "$(inherited)", 528 | "@executable_path/Frameworks", 529 | "@loader_path/Frameworks", 530 | ); 531 | PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-mp.RMPZoomTransitionAnimator-Swift"; 532 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 533 | SKIP_INSTALL = YES; 534 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 535 | SWIFT_VERSION = 4.2; 536 | TARGETED_DEVICE_FAMILY = "1,2"; 537 | }; 538 | name = Debug; 539 | }; 540 | 8EECE95521C6715200A78DF9 /* Release */ = { 541 | isa = XCBuildConfiguration; 542 | buildSettings = { 543 | CLANG_ENABLE_MODULES = YES; 544 | CODE_SIGN_IDENTITY = ""; 545 | CODE_SIGN_STYLE = Automatic; 546 | DEFINES_MODULE = YES; 547 | DYLIB_COMPATIBILITY_VERSION = 1; 548 | DYLIB_CURRENT_VERSION = 1; 549 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 550 | INFOPLIST_FILE = "RMPZoomTransitionAnimator-Swift/Info.plist"; 551 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 552 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 553 | LD_RUNPATH_SEARCH_PATHS = ( 554 | "$(inherited)", 555 | "@executable_path/Frameworks", 556 | "@loader_path/Frameworks", 557 | ); 558 | PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-mp.RMPZoomTransitionAnimator-Swift"; 559 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 560 | SKIP_INSTALL = YES; 561 | SWIFT_VERSION = 4.2; 562 | TARGETED_DEVICE_FAMILY = "1,2"; 563 | }; 564 | name = Release; 565 | }; 566 | 8EECE97021C6805700A78DF9 /* Debug */ = { 567 | isa = XCBuildConfiguration; 568 | buildSettings = { 569 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 570 | CODE_SIGN_STYLE = Automatic; 571 | INFOPLIST_FILE = Demo/Info.plist; 572 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 573 | LD_RUNPATH_SEARCH_PATHS = ( 574 | "$(inherited)", 575 | "@executable_path/Frameworks", 576 | ); 577 | PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-mp.RMPZoomTransitionAnimator-Swift-Demo"; 578 | PRODUCT_NAME = "$(TARGET_NAME)"; 579 | SWIFT_VERSION = 4.2; 580 | TARGETED_DEVICE_FAMILY = "1,2"; 581 | }; 582 | name = Debug; 583 | }; 584 | 8EECE97121C6805700A78DF9 /* Release */ = { 585 | isa = XCBuildConfiguration; 586 | buildSettings = { 587 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 588 | CODE_SIGN_STYLE = Automatic; 589 | INFOPLIST_FILE = Demo/Info.plist; 590 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 591 | LD_RUNPATH_SEARCH_PATHS = ( 592 | "$(inherited)", 593 | "@executable_path/Frameworks", 594 | ); 595 | PRODUCT_BUNDLE_IDENTIFIER = "jp.co.recruit-mp.RMPZoomTransitionAnimator-Swift-Demo"; 596 | PRODUCT_NAME = "$(TARGET_NAME)"; 597 | SWIFT_VERSION = 4.2; 598 | TARGETED_DEVICE_FAMILY = "1,2"; 599 | }; 600 | name = Release; 601 | }; 602 | /* End XCBuildConfiguration section */ 603 | 604 | /* Begin XCConfigurationList section */ 605 | 8EECE94521C6715200A78DF9 /* Build configuration list for PBXProject "RMPZoomTransitionAnimator-Swift" */ = { 606 | isa = XCConfigurationList; 607 | buildConfigurations = ( 608 | 8EECE95121C6715200A78DF9 /* Debug */, 609 | 8EECE95221C6715200A78DF9 /* Release */, 610 | ); 611 | defaultConfigurationIsVisible = 0; 612 | defaultConfigurationName = Release; 613 | }; 614 | 8EECE95321C6715200A78DF9 /* Build configuration list for PBXNativeTarget "RMPZoomTransitionAnimator-Swift" */ = { 615 | isa = XCConfigurationList; 616 | buildConfigurations = ( 617 | 8EECE95421C6715200A78DF9 /* Debug */, 618 | 8EECE95521C6715200A78DF9 /* Release */, 619 | ); 620 | defaultConfigurationIsVisible = 0; 621 | defaultConfigurationName = Release; 622 | }; 623 | 8EECE96F21C6805700A78DF9 /* Build configuration list for PBXNativeTarget "Demo" */ = { 624 | isa = XCConfigurationList; 625 | buildConfigurations = ( 626 | 8EECE97021C6805700A78DF9 /* Debug */, 627 | 8EECE97121C6805700A78DF9 /* Release */, 628 | ); 629 | defaultConfigurationIsVisible = 0; 630 | defaultConfigurationName = Release; 631 | }; 632 | /* End XCConfigurationList section */ 633 | }; 634 | rootObject = 8EECE94221C6715200A78DF9 /* Project object */; 635 | } 636 | -------------------------------------------------------------------------------- /RMPZoomTransitionAnimator-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /RMPZoomTransitionAnimator-Swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /RMPZoomTransitionAnimator-Swift.xcodeproj/xcshareddata/xcschemes/RMPZoomTransitionAnimator-Swift.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 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /RMPZoomTransitionAnimator-Swift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | 2.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /RMPZoomTransitionAnimator-Swift/RMPZoomTransitionAnimating.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import UIKit 24 | 25 | public protocol RMPZoomTransitionAnimating: class { 26 | var transitionSourceImageView: UIImageView { get } 27 | var transitionSourceBackgroundColor: UIColor? { get } 28 | var transitionDestinationImageViewFrame: CGRect { get } 29 | } 30 | -------------------------------------------------------------------------------- /RMPZoomTransitionAnimator-Swift/RMPZoomTransitionAnimator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import UIKit 24 | 25 | public typealias RMPZoomTransitionable = RMPZoomTransitionAnimating & RMPZoomTransitionDelegate 26 | 27 | open class RMPZoomTransitionAnimator: NSObject { 28 | 29 | open var goingForward: Bool = false 30 | open weak var sourceTransition: RMPZoomTransitionAnimating? 31 | open weak var destinationTransition: RMPZoomTransitionable? 32 | 33 | private let forwardAnimationDuration: TimeInterval 34 | private let forwardCompleteAnimationDuration: TimeInterval 35 | private let backwardAnimationDuration: TimeInterval 36 | private let backwardCompleteAnimationDuration: TimeInterval 37 | 38 | public init(forward: TimeInterval = 0.3, 39 | forwardComplete: TimeInterval = 0.2, 40 | backward: TimeInterval = 0.25, 41 | backwardComplete: TimeInterval = 0.18) { 42 | forwardAnimationDuration = forward 43 | forwardCompleteAnimationDuration = forwardComplete 44 | backwardAnimationDuration = backward 45 | backwardCompleteAnimationDuration = backwardComplete 46 | } 47 | } 48 | 49 | // MARK: - UIViewControllerAnimatedTransitioning 50 | 51 | extension RMPZoomTransitionAnimator: UIViewControllerAnimatedTransitioning { 52 | public func transitionDuration(using transitionContext: UIViewControllerContextTransitioning?) -> TimeInterval { 53 | if self.goingForward { 54 | return forwardAnimationDuration + forwardCompleteAnimationDuration 55 | } else { 56 | return backwardAnimationDuration + backwardCompleteAnimationDuration 57 | } 58 | } 59 | 60 | public func animateTransition(using transitionContext: UIViewControllerContextTransitioning) { 61 | // Setup for animation transition 62 | guard let fromVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.from), 63 | let toVC = transitionContext.viewController(forKey: UITransitionContextViewControllerKey.to) else { 64 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 65 | return 66 | } 67 | let containerView = transitionContext.containerView 68 | containerView.addSubview(fromVC.view) 69 | containerView.addSubview(toVC.view) 70 | 71 | guard let sourceTransition = self.sourceTransition, 72 | let destinationTransition = self.destinationTransition else { 73 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 74 | return 75 | } 76 | 77 | // Add a alphaView To be overexposed, so background becomes dark in animation 78 | let alphaView = UIView(frame: transitionContext.finalFrame(for: toVC)) 79 | alphaView.backgroundColor = sourceTransition.transitionSourceBackgroundColor 80 | containerView.addSubview(alphaView) 81 | 82 | // Transition source of image to move me to add to the last 83 | let sourceImageView = sourceTransition.transitionSourceImageView 84 | containerView.addSubview(sourceImageView) 85 | 86 | if self.goingForward { 87 | fromVC.beginAppearanceTransition(false, animated: true) 88 | UIView.animate(withDuration: forwardAnimationDuration, delay: 0, options: .curveEaseOut, animations: { 89 | sourceImageView.frame = destinationTransition.transitionDestinationImageViewFrame 90 | sourceImageView.transform = CGAffineTransform(scaleX: 1.02, y: 1.02) 91 | alphaView.alpha = 0.9 92 | }, completion: { finished in 93 | UIView.animate(withDuration: self.forwardCompleteAnimationDuration, delay: 0, options: .curveEaseOut, animations: { 94 | alphaView.alpha = 0 95 | sourceImageView.transform = CGAffineTransform.identity 96 | }, completion: { finished in 97 | sourceImageView.alpha = 0 98 | destinationTransition.zoomTransitionAnimator?(animator: self, 99 | didCompleteTransition: !transitionContext.transitionWasCancelled, 100 | animatingSourceImageView: sourceImageView) 101 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 102 | // Remove the views from superviews to release the references 103 | alphaView.removeFromSuperview() 104 | sourceImageView.removeFromSuperview() 105 | 106 | fromVC.endAppearanceTransition() 107 | }) 108 | }) 109 | } else { 110 | UIView.animate(withDuration: backwardAnimationDuration, delay: 0, options: .curveEaseOut, animations: { 111 | sourceImageView.frame = destinationTransition.transitionDestinationImageViewFrame 112 | alphaView.alpha = 0 113 | }, completion: { finished in 114 | UIView.animate(withDuration: self.backwardCompleteAnimationDuration, delay: 0, options: .curveEaseOut, animations: { 115 | sourceImageView.alpha = 0 116 | }, completion: { finished in 117 | destinationTransition.zoomTransitionAnimator?(animator: self, 118 | didCompleteTransition: !transitionContext.transitionWasCancelled, 119 | animatingSourceImageView: sourceImageView) 120 | transitionContext.completeTransition(!transitionContext.transitionWasCancelled) 121 | 122 | // Comment out becaue fix hidden Navigation bar after back. 123 | // if let keyWindow = UIApplication.shared.keyWindow, !keyWindow.subviews.contains(toVC.view) { 124 | // keyWindow.addSubview(toVC.view) 125 | // } 126 | 127 | // Remove the views from superviews to release the references 128 | alphaView.removeFromSuperview() 129 | sourceImageView.removeFromSuperview() 130 | }) 131 | }) 132 | } 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /RMPZoomTransitionAnimator-Swift/RMPZoomTransitionDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2015 Recruit Marketing Partners Co.,Ltd. All rights reserved. 3 | // Copyright (c) 2018 Yuichi Hirano 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | import UIKit 24 | 25 | @objc public protocol RMPZoomTransitionDelegate: class { 26 | @objc optional func zoomTransitionAnimator(animator: RMPZoomTransitionAnimator, 27 | didCompleteTransition didComplete: Bool, 28 | animatingSourceImageView imageView: UIImageView) 29 | } 30 | -------------------------------------------------------------------------------- /doc/collectionview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/doc/collectionview.gif -------------------------------------------------------------------------------- /doc/tableview.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yhirano/RMPZoomTransitionAnimator-Swift/245e5a720d9b99625f7384708f3b4e8f560f9409/doc/tableview.gif --------------------------------------------------------------------------------