From 75a8139a0e8fc62b2c2f5bb426c1f5423d6d0be9 Mon Sep 17 00:00:00 2001 From: EyreFree Date: Wed, 16 Jan 2019 12:07:44 +0800 Subject: [PATCH 1/4] Swift4.2 --- WRNavigationBar/WRNavigationBar.swift | 16 +- WRNavigationBar_swift/Podfile | 3 - WRNavigationBar_swift/Podfile.lock | 13 +- WRNavigationBar_swift/Pods/Kingfisher/LICENSE | 22 - .../Pods/Kingfisher/README.md | 114 -- WRNavigationBar_swift/Pods/Manifest.lock | 13 +- .../Pods/Pods.xcodeproj/project.pbxproj | 514 ++------- .../Kingfisher/Info.plist | 26 - .../Kingfisher/Kingfisher-dummy.m | 5 - .../Kingfisher/Kingfisher-prefix.pch | 12 - .../Kingfisher/Kingfisher-umbrella.h | 17 - .../Kingfisher/Kingfisher.modulemap | 6 - .../Kingfisher/Kingfisher.xcconfig | 12 - ...igationBar_swift-acknowledgements.markdown | 26 - ...NavigationBar_swift-acknowledgements.plist | 32 - .../Pods-WRNavigationBar_swift-frameworks.sh | 64 +- .../Pods-WRNavigationBar_swift-resources.sh | 18 +- .../Pods-WRNavigationBar_swift.debug.xcconfig | 9 +- ...ods-WRNavigationBar_swift.release.xcconfig | 9 +- .../project.pbxproj | 228 ++-- .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../WRNavigationBar_swift/AppDelegate.swift | 2 +- .../Demos/AllTransparent.swift | 4 +- .../Demos/AntForestController.swift | 4 +- .../Demos/BaseNavigationController.swift | 2 +- .../Demos/BaseViewController.swift | 2 +- .../Demos/CustomNavBarController.swift | 2 +- .../Demos/ImageNavController.swift | 4 +- .../Demos/MillcolorGradController.swift | 4 +- .../Demos/QQAppController.swift | 4 +- .../Demos/QQMineController.swift | 2 +- .../Demos/QQZoneController.swift | 4 +- .../Demos/SecondViewController.swift | 2 +- .../Demos/SixthViewController.swift | 2 +- .../Demos/WeiBoMineController.swift | 4 +- .../Demos/ZhiHuController.swift | 2 +- .../Kingfisher}/AnimatedImageView.swift | 6 +- .../Kingfisher}/Box.swift | 0 .../Kingfisher}/CacheSerializer.swift | 0 .../Kingfisher}/Filter.swift | 0 .../FormatIndicatedCacheSerializer.swift | 0 .../Kingfisher}/Image.swift | 6 +- .../Kingfisher}/ImageCache.swift | 8 +- .../Kingfisher}/ImageDownloader.swift | 0 .../Kingfisher}/ImagePrefetcher.swift | 0 .../Kingfisher}/ImageProcessor.swift | 0 .../Kingfisher}/ImageTransition.swift | 4 +- .../Kingfisher}/ImageView+Kingfisher.swift | 0 .../Kingfisher}/Indicator.swift | 4 +- .../Kingfisher}/Kingfisher.h | 0 .../Kingfisher}/Kingfisher.swift | 0 .../Kingfisher}/KingfisherManager.swift | 0 .../Kingfisher}/KingfisherOptionsInfo.swift | 0 .../Kingfisher}/Placeholder.swift | 0 .../Kingfisher}/RequestModifier.swift | 0 .../Kingfisher}/Resource.swift | 0 .../Kingfisher}/String+MD5.swift | 0 .../Kingfisher}/ThreadHelper.swift | 0 .../Kingfisher}/UIButton+Kingfisher.swift | 12 +- .../WRCycleScrollView => }/WRCycleCell.swift | 3 +- .../WRCycleScrollView.swift | 2 +- .../WRCustomNavigationBar.swift | 301 ----- .../WRNavigationBar/WRNavigationBar.swift | 1004 ----------------- .../WRCycleScrollView => }/WRProxy.swift | 0 65 files changed, 409 insertions(+), 2160 deletions(-) delete mode 100644 WRNavigationBar_swift/Pods/Kingfisher/LICENSE delete mode 100644 WRNavigationBar_swift/Pods/Kingfisher/README.md delete mode 100644 WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Info.plist delete mode 100644 WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-dummy.m delete mode 100644 WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-prefix.pch delete mode 100644 WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-umbrella.h delete mode 100644 WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher.modulemap delete mode 100644 WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher.xcconfig create mode 100644 WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 WRNavigationBar_swift/WRNavigationBar_swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/AnimatedImageView.swift (98%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/Box.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/CacheSerializer.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/Filter.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/FormatIndicatedCacheSerializer.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/Image.swift (99%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/ImageCache.swift (98%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/ImageDownloader.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/ImagePrefetcher.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/ImageProcessor.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/ImageTransition.swift (97%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/ImageView+Kingfisher.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/Indicator.swift (97%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/Kingfisher.h (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/Kingfisher.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/KingfisherManager.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/KingfisherOptionsInfo.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/Placeholder.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/RequestModifier.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/Resource.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/String+MD5.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/ThreadHelper.swift (100%) rename WRNavigationBar_swift/{Pods/Kingfisher/Sources => WRNavigationBar_swift/Kingfisher}/UIButton+Kingfisher.swift (97%) rename WRNavigationBar_swift/WRNavigationBar_swift/{WRNavigationBar/WRCycleScrollView => }/WRCycleCell.swift (98%) rename WRNavigationBar_swift/WRNavigationBar_swift/{WRNavigationBar/WRCycleScrollView => }/WRCycleScrollView.swift (99%) delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCustomNavigationBar.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRNavigationBar.swift rename WRNavigationBar_swift/WRNavigationBar_swift/{WRNavigationBar/WRCycleScrollView => }/WRProxy.swift (100%) diff --git a/WRNavigationBar/WRNavigationBar.swift b/WRNavigationBar/WRNavigationBar.swift index 1322e4c..f53c884 100644 --- a/WRNavigationBar/WRNavigationBar.swift +++ b/WRNavigationBar/WRNavigationBar.swift @@ -183,7 +183,7 @@ extension UINavigationBar:WRAwakeProtocol var titleColor:UIColor? for attribute in originTitleTextAttributes { - if attribute.key == NSAttributedStringKey.foregroundColor { + if attribute.key == NSAttributedString.Key.foregroundColor { titleColor = attribute.value as? UIColor break } @@ -194,8 +194,8 @@ extension UINavigationBar:WRAwakeProtocol return } - if attributes[NSAttributedStringKey.foregroundColor.rawValue] == nil { - attributes.updateValue(originTitleColor, forKey: NSAttributedStringKey.foregroundColor.rawValue) + if attributes[NSAttributedString.Key.foregroundColor.rawValue] == nil { + attributes.updateValue(originTitleColor, forKey: NSAttributedString.Key.foregroundColor.rawValue) } wr_setTitleTextAttributes(attributes) } @@ -237,12 +237,12 @@ extension UINavigationController: WRFatherAwakeProtocol fileprivate func setNeedsNavigationBarUpdate(titleColor: UIColor) { guard let titleTextAttributes = navigationBar.titleTextAttributes else { - navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor:titleColor] + navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor:titleColor] return } var newTitleTextAttributes = titleTextAttributes - newTitleTextAttributes.updateValue(titleColor, forKey: NSAttributedStringKey.foregroundColor) + newTitleTextAttributes.updateValue(titleColor, forKey: NSAttributedString.Key.foregroundColor) navigationBar.titleTextAttributes = newTitleTextAttributes } @@ -317,7 +317,7 @@ extension UINavigationController: WRFatherAwakeProtocol var displayLink:CADisplayLink? = CADisplayLink(target: self, selector: #selector(popNeedDisplay)) // UITrackingRunLoopMode: 界面跟踪 Mode,用于 ScrollView 追踪触摸滑动,保证界面滑动时不受其他 Mode 影响 // NSRunLoopCommonModes contains kCFRunLoopDefaultMode and UITrackingRunLoopMode - displayLink?.add(to: RunLoop.main, forMode: .commonModes) + displayLink?.add(to: RunLoop.main, forMode: RunLoop.Mode.common) CATransaction.setCompletionBlock { displayLink?.invalidate() displayLink = nil @@ -334,7 +334,7 @@ extension UINavigationController: WRFatherAwakeProtocol @objc func wr_popToRootViewControllerAnimated(_ animated: Bool) -> [UIViewController]? { var displayLink:CADisplayLink? = CADisplayLink(target: self, selector: #selector(popNeedDisplay)) - displayLink?.add(to: RunLoop.main, forMode: .commonModes) + displayLink?.add(to: RunLoop.main, forMode: RunLoop.Mode.common) CATransaction.setCompletionBlock { displayLink?.invalidate() displayLink = nil @@ -381,7 +381,7 @@ extension UINavigationController: WRFatherAwakeProtocol @objc func wr_pushViewController(_ viewController: UIViewController, animated: Bool) { var displayLink:CADisplayLink? = CADisplayLink(target: self, selector: #selector(pushNeedDisplay)) - displayLink?.add(to: RunLoop.main, forMode: .commonModes) + displayLink?.add(to: RunLoop.main, forMode: RunLoop.Mode.common) CATransaction.setCompletionBlock { displayLink?.invalidate() displayLink = nil diff --git a/WRNavigationBar_swift/Podfile b/WRNavigationBar_swift/Podfile index 81b4c14..b6bf957 100644 --- a/WRNavigationBar_swift/Podfile +++ b/WRNavigationBar_swift/Podfile @@ -8,7 +8,4 @@ use_frameworks! target ‘WRNavigationBar_swift’ do - #swift - pod 'Kingfisher' - end diff --git a/WRNavigationBar_swift/Podfile.lock b/WRNavigationBar_swift/Podfile.lock index c6c2166..81bd7bf 100644 --- a/WRNavigationBar_swift/Podfile.lock +++ b/WRNavigationBar_swift/Podfile.lock @@ -1,12 +1,3 @@ -PODS: - - Kingfisher (4.3.1) +PODFILE CHECKSUM: f271f06bc2e6c032fbdc2389d1ab0d2f2eecd650 -DEPENDENCIES: - - Kingfisher - -SPEC CHECKSUMS: - Kingfisher: 75541c4b62f02e1fde6f9772303de3d9ebe8f5b3 - -PODFILE CHECKSUM: eedd5593b4e862f4a6b0ebf6fd6f3f022a9f6b1d - -COCOAPODS: 1.3.1 +COCOAPODS: 1.5.3 diff --git a/WRNavigationBar_swift/Pods/Kingfisher/LICENSE b/WRNavigationBar_swift/Pods/Kingfisher/LICENSE deleted file mode 100644 index 79da75d..0000000 --- a/WRNavigationBar_swift/Pods/Kingfisher/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2017 Wei Wang - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. - diff --git a/WRNavigationBar_swift/Pods/Kingfisher/README.md b/WRNavigationBar_swift/Pods/Kingfisher/README.md deleted file mode 100644 index b696677..0000000 --- a/WRNavigationBar_swift/Pods/Kingfisher/README.md +++ /dev/null @@ -1,114 +0,0 @@ -

- -Kingfisher - -

- -

- - - - - -codebeat badge - - -

- -Kingfisher is a lightweight, pure-Swift library for downloading and caching images from the web. This project is heavily inspired by the popular [SDWebImage](https://github.com/rs/SDWebImage). It provides you a chance to use a pure-Swift alternative in your next app. - -## Features - -- [x] Asynchronous image downloading and caching. -- [x] `URLSession`-based networking. Basic image processors and filters supplied. -- [x] Multiple-layer cache for both memory and disk. -- [x] Cancelable downloading and processing tasks to improve performance. -- [x] Independent components. Use the downloader or caching system separately as you need. -- [x] Prefetching images and showing them from cache later when necessary. -- [x] Extensions for `UIImageView`, `NSImage` and `UIButton` to directly set an image from a URL. -- [x] Built-in transition animation when setting images. -- [x] Customizable placeholder while loading images. -- [x] Extensible image processing and image format support. - -The simplest use-case is setting an image to an image view with the `UIImageView` extension: - -```swift -let url = URL(string: "url_of_your_image") -imageView.kf.setImage(with: url) -``` - -Kingfisher will download the image from `url`, send it to both the memory cache and the disk cache, and display it in `imageView`. When you use the same code later, the image will be retrieved from cache and shown immediately. - -## Requirements - -- iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+ -- Swift 4 (Kingfisher 4.x), Swift 3 (Kingfisher 3.x) - -Main development of Kingfisher is based on Swift 4. Only critical bug fixes will be applied to Kingfisher 3.x. - -- Kingfisher 4.0 Migration - Kingfisher 3.x should be source compatible to Kingfisher 4. The reason for a major update is that we need to specify the Swift version explicitly for Xcode. All deprecated methods in Kingfisher 3 has been removed, so please ensure you have no warning left before you migrate from Kingfisher 3 to Kingfisher 4. If you have any trouble in migrating, please open an issue to discuss. -- [Kingfisher 3.0 Migration Guide](https://github.com/onevcat/Kingfisher/wiki/Kingfisher-3.0-Migration-Guide) - If you are upgrading to Kingfisher 3.x from an earlier version, please read this for more information. - -## Next Steps - -We prepared a [wiki page](https://github.com/onevcat/Kingfisher/wiki). You can find tons of useful things there. - -* [Installation Guide](https://github.com/onevcat/Kingfisher/wiki/Installation-Guide) - Follow it to integrate Kingfisher into your project. -* [Cheat Sheet](https://github.com/onevcat/Kingfisher/wiki/Cheat-Sheet)- Curious about what Kingfisher could do and how would it look like when used in your project? See this page for useful code snippets. If you are already familiar with Kingfisher, you could also learn new tricks to improve the way you use Kingfisher! -* [API Reference](http://onevcat.github.io/Kingfisher/) - Lastly, please remember to read the full whenever you may need a more detailed reference. - -## Other - -### Future of Kingfisher - -I want to keep Kingfisher lightweight. This framework will focus on providing a simple solution for downloading and caching images. This doesn’t mean the framework can’t be improved. Kingfisher is far from perfect, so necessary and useful updates will be made to make it better. - -### Developments and Tests - -Any contributing and pull requests are warmly welcome. However, before you plan to implement some features or try to fix an uncertain issue, it is recommended to open a discussion first. - -The test images are contained in another project to keep this project repo fast and slim. You could run `./setup.sh` in the root folder of Kingfisher to clone the test images when you need to run the tests target. It would be appreciated if your pull requests could build and with all tests green. :) - -### About the logo - -The logo of Kingfisher is inspired by [Tangram (七巧板)](http://en.wikipedia.org/wiki/Tangram), a dissection puzzle consisting of seven flat shapes from China. I believe she's a kingfisher bird instead of a swift, but someone insists that she is a pigeon. I guess I should give her a name. Hi, guys, do you have any suggestions? - -### Contact - -Follow and contact me on [Twitter](http://twitter.com/onevcat) or [Sina Weibo](http://weibo.com/onevcat). If you find an issue, just [open a ticket](https://github.com/onevcat/Kingfisher/issues/new). Pull requests are warmly welcome as well. - -## Contributors - -This project exists thanks to all the people who contribute. [[Contribute]](https://github.com/onevcat/Kingfisher/blob/master/CONTRIBUTING.md). - - - -## Backers - -Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Kingfisher#backer)] - - - - -## Sponsors - -Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Kingfisher#sponsor)] - - - - - - - - - - - - - - -### License - -Kingfisher is released under the MIT license. See LICENSE for details. - - diff --git a/WRNavigationBar_swift/Pods/Manifest.lock b/WRNavigationBar_swift/Pods/Manifest.lock index c6c2166..81bd7bf 100644 --- a/WRNavigationBar_swift/Pods/Manifest.lock +++ b/WRNavigationBar_swift/Pods/Manifest.lock @@ -1,12 +1,3 @@ -PODS: - - Kingfisher (4.3.1) +PODFILE CHECKSUM: f271f06bc2e6c032fbdc2389d1ab0d2f2eecd650 -DEPENDENCIES: - - Kingfisher - -SPEC CHECKSUMS: - Kingfisher: 75541c4b62f02e1fde6f9772303de3d9ebe8f5b3 - -PODFILE CHECKSUM: eedd5593b4e862f4a6b0ebf6fd6f3f022a9f6b1d - -COCOAPODS: 1.3.1 +COCOAPODS: 1.5.3 diff --git a/WRNavigationBar_swift/Pods/Pods.xcodeproj/project.pbxproj b/WRNavigationBar_swift/Pods/Pods.xcodeproj/project.pbxproj index dcc6904..e280427 100644 --- a/WRNavigationBar_swift/Pods/Pods.xcodeproj/project.pbxproj +++ b/WRNavigationBar_swift/Pods/Pods.xcodeproj/project.pbxproj @@ -7,289 +7,128 @@ objects = { /* Begin PBXBuildFile section */ - 07432E8DEA8B25795C7C545AA67A0187 /* ImageTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88C862B0902EAF74B609F90285CFB7C6 /* ImageTransition.swift */; }; - 0CA6357476373C221D44C498AA1D65FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72913984B3E4B2AD01F71E405D688036 /* Foundation.framework */; }; - 10AD5E70FDD53228153032C58FBF4D52 /* String+MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D9580FED9E6FCE2C7845BC03E63D50A /* String+MD5.swift */; }; - 1827E7D94F3A12CA0C58EF33AE4B026D /* KingfisherOptionsInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB8A9E00B1031B5EEF4FADC65A407A6 /* KingfisherOptionsInfo.swift */; }; - 1DAF3BB88351664576507F774FEB051C /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADB697E25B5800CAEFBC6A13A1DCBA9 /* Filter.swift */; }; - 1FCC0970C8435F10768CA84C2025A177 /* Resource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 835802EEFCA95C3BECB444475FEB53AD /* Resource.swift */; }; - 2082EB4AA16440FFD5479FAFC0181066 /* Indicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1791E48E319018D19A4085F3A0308EC /* Indicator.swift */; }; - 282E6F0E67F3799B0ABCB9ED96B666A9 /* RequestModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 835C82F8B413C5FC71B973BC63C7530C /* RequestModifier.swift */; }; - 2F288ED3641B2B4775884C462AE377E6 /* Kingfisher-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F1DA91233A58A2FDA9DBACE4D8B923A8 /* Kingfisher-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 383C9A8DB84B83233633C3A00A2C1608 /* KingfisherManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 023C24331AF069FFB31BE4575FF92A66 /* KingfisherManager.swift */; }; - 40765AAA791D6DFC0022639E348F0E6A /* FormatIndicatedCacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DC875D6BCDEC1D273EDD95695790E7B /* FormatIndicatedCacheSerializer.swift */; }; - 413C2A3759ABEC870AAE61F28C258C31 /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA951D80476B7B25AF48029C77615E15 /* ImageDownloader.swift */; }; - 48EC78A50C61424D4DFDC33A325CAA72 /* ThreadHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = A4C9AE39E7B57A63ADA77C5411A94EBA /* ThreadHelper.swift */; }; - 52416A6AC7387ECACCC45596498D96AD /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F46EFC5CDAF57A92A7B136FFD3525675 /* CFNetwork.framework */; }; - 5B5D8AE167BD8E304CE474A9B8DBA2B4 /* Kingfisher.h in Headers */ = {isa = PBXBuildFile; fileRef = C82DCFCD04A890F33F6873466BB8F21E /* Kingfisher.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5D03025A98024CDF4F5DC9AC69A6D838 /* Pods-WRNavigationBar_swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7CECED3FD3EA864979CAFC7D2E34BD93 /* Pods-WRNavigationBar_swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 5D83206A9A4656F11D511158EC8E0784 /* CacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DFCC4FC32F83B831601673C6818F019 /* CacheSerializer.swift */; }; - 873BA68C2E24D634D38E4A8BCB74B08D /* Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81AE08F84342F7AB3680E0E6F7574A5A /* Kingfisher.swift */; }; - 8D7D42C25F9430F572E14200C399D57B /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = C98A82CA32E1D54EA4FB0140C87A0D5F /* ImageCache.swift */; }; - 93D444FC9D79520E14FB8EF178F0B76E /* ImageProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5B32513990923B73428F091F7DE8A5B /* ImageProcessor.swift */; }; - 950D8E334E011B13CC5786595E6AE615 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9B28D20BE64B86A107267022F1E7064 /* Image.swift */; }; - A7EC09EC6EFAB3778E0A0341E7DC9CE3 /* AnimatedImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9295207D7CEECE2F5BDCD8CD84920ABE /* AnimatedImageView.swift */; }; - B0033530A0EAABBB31CD46CA2899F3BD /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F0AEF804C3FF811567DCF8CBD32A1D5 /* Box.swift */; }; - C1C52534BAF0801C90F6B3DDF3A59896 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72913984B3E4B2AD01F71E405D688036 /* Foundation.framework */; }; - CB4222BC34D92C2E06A5BCF730FEFE71 /* Kingfisher-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E62FDCDEE52FFBAACE80CC15C761D7C6 /* Kingfisher-dummy.m */; }; - CB8DF027448816C623E9B02A3685A59F /* ImageView+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF8738D6ED045E7C089A8AE94F21A0A0 /* ImageView+Kingfisher.swift */; }; - D5B9985DA680B07E486A07969DA20D79 /* Pods-WRNavigationBar_swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F8219BF94193F7436659F916DA2353FE /* Pods-WRNavigationBar_swift-dummy.m */; }; - E710FF1F4EB4B125F9C5DBDFE3B9320F /* Placeholder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 685A4E99CB4F94AC0F404F519C7AC866 /* Placeholder.swift */; }; - F99792883819ADBD16123F91F6A9F3F8 /* ImagePrefetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 308FC14D7DDFBB406C2E4ED7415C8D7B /* ImagePrefetcher.swift */; }; - FAC3C67720C7E6EF51CCAE58F62645BC /* UIButton+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1AF856B3D835339E6E446917C5312B6 /* UIButton+Kingfisher.swift */; }; + 03E4263133608CEB338591B4B7E12544 /* Pods-WRNavigationBar_swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 44078BAAD6BC63EA1206D6F36ECE9C08 /* Pods-WRNavigationBar_swift-dummy.m */; }; + 2B51C9B1416204B8AA1EAC455C2AF1FD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; + B53B927794BDA4466883230633A594F4 /* Pods-WRNavigationBar_swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E724B79A4530AE615B85746D3787943 /* Pods-WRNavigationBar_swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 39ED95EEBDF3F99D9600C1827FE92AF7 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6F712943B3C5592E82604940D11CE08A; - remoteInfo = Kingfisher; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ - 023C24331AF069FFB31BE4575FF92A66 /* KingfisherManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KingfisherManager.swift; path = Sources/KingfisherManager.swift; sourceTree = ""; }; - 077D151C882C36797498299FA868DD45 /* Pods-WRNavigationBar_swift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift.release.xcconfig"; sourceTree = ""; }; - 0F7DF0BCFC0710953CC5FF9972BE0B04 /* Kingfisher-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Kingfisher-prefix.pch"; sourceTree = ""; }; - 2DFCC4FC32F83B831601673C6818F019 /* CacheSerializer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CacheSerializer.swift; path = Sources/CacheSerializer.swift; sourceTree = ""; }; - 2E03BC01661E426D39F6C97D69CBD5DA /* Pods-WRNavigationBar_swift-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift-resources.sh"; sourceTree = ""; }; - 308FC14D7DDFBB406C2E4ED7415C8D7B /* ImagePrefetcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImagePrefetcher.swift; path = Sources/ImagePrefetcher.swift; sourceTree = ""; }; - 3CE01395EF504C101EFDBC103EC6E461 /* Pods-WRNavigationBar_swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-WRNavigationBar_swift.modulemap"; sourceTree = ""; }; - 52DC30D7E6C1223D54467216A97B0B7D /* Kingfisher.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Kingfisher.xcconfig; sourceTree = ""; }; - 5B49DEB9DF25D6EA7B6693213B7B90B3 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 638E15C347D7A409389BE9A0476CC59F /* Kingfisher.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Kingfisher.framework; path = Kingfisher.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 685A4E99CB4F94AC0F404F519C7AC866 /* Placeholder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Placeholder.swift; path = Sources/Placeholder.swift; sourceTree = ""; }; - 72913984B3E4B2AD01F71E405D688036 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 75E959B193E767DED64E98D2D01CDA5F /* Pods_WRNavigationBar_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_WRNavigationBar_swift.framework; path = "Pods-WRNavigationBar_swift.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 7CECED3FD3EA864979CAFC7D2E34BD93 /* Pods-WRNavigationBar_swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-WRNavigationBar_swift-umbrella.h"; sourceTree = ""; }; - 7FA6100B5CDA0A51737954E7E2D1DE2D /* Kingfisher.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Kingfisher.modulemap; sourceTree = ""; }; - 81AE08F84342F7AB3680E0E6F7574A5A /* Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Kingfisher.swift; path = Sources/Kingfisher.swift; sourceTree = ""; }; - 835802EEFCA95C3BECB444475FEB53AD /* Resource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Resource.swift; path = Sources/Resource.swift; sourceTree = ""; }; - 835C82F8B413C5FC71B973BC63C7530C /* RequestModifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RequestModifier.swift; path = Sources/RequestModifier.swift; sourceTree = ""; }; - 854A8362EFD3CAC49FA4502B9F0FCB96 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 88C862B0902EAF74B609F90285CFB7C6 /* ImageTransition.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageTransition.swift; path = Sources/ImageTransition.swift; sourceTree = ""; }; - 8D9580FED9E6FCE2C7845BC03E63D50A /* String+MD5.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+MD5.swift"; path = "Sources/String+MD5.swift"; sourceTree = ""; }; - 8DC875D6BCDEC1D273EDD95695790E7B /* FormatIndicatedCacheSerializer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FormatIndicatedCacheSerializer.swift; path = Sources/FormatIndicatedCacheSerializer.swift; sourceTree = ""; }; - 9295207D7CEECE2F5BDCD8CD84920ABE /* AnimatedImageView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AnimatedImageView.swift; path = Sources/AnimatedImageView.swift; sourceTree = ""; }; + 05AF6C1F6A272D9B15B76E6B81CA14AB /* Pods-WRNavigationBar_swift-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift-frameworks.sh"; sourceTree = ""; }; + 080F16858EF8AC9C388A533BDBA3E17C /* Pods-WRNavigationBar_swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-WRNavigationBar_swift.modulemap"; sourceTree = ""; }; + 44078BAAD6BC63EA1206D6F36ECE9C08 /* Pods-WRNavigationBar_swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-WRNavigationBar_swift-dummy.m"; sourceTree = ""; }; + 5F776BF658F33F76A7D080C9CD1DA223 /* Pods-WRNavigationBar_swift-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-WRNavigationBar_swift-acknowledgements.markdown"; sourceTree = ""; }; + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 707AE4E06D73FD6317D2AB48594A4644 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 70D946765B50E9281043BEBBCF598B78 /* Pods_WRNavigationBar_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_WRNavigationBar_swift.framework; path = "Pods-WRNavigationBar_swift.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 815520D44A7A3F4B79088084773638CA /* Pods-WRNavigationBar_swift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift.debug.xcconfig"; sourceTree = ""; }; + 8E724B79A4530AE615B85746D3787943 /* Pods-WRNavigationBar_swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-WRNavigationBar_swift-umbrella.h"; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9F0AEF804C3FF811567DCF8CBD32A1D5 /* Box.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Sources/Box.swift; sourceTree = ""; }; - A1791E48E319018D19A4085F3A0308EC /* Indicator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Indicator.swift; path = Sources/Indicator.swift; sourceTree = ""; }; - A4C9AE39E7B57A63ADA77C5411A94EBA /* ThreadHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThreadHelper.swift; path = Sources/ThreadHelper.swift; sourceTree = ""; }; - A5B32513990923B73428F091F7DE8A5B /* ImageProcessor.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageProcessor.swift; path = Sources/ImageProcessor.swift; sourceTree = ""; }; - A9B28D20BE64B86A107267022F1E7064 /* Image.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Sources/Image.swift; sourceTree = ""; }; - AE66F7EA3A06D631F5729F90A9F79406 /* Pods-WRNavigationBar_swift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift.debug.xcconfig"; sourceTree = ""; }; - BA4CB1BACA72306DD38BD93DB7EDC37F /* Pods-WRNavigationBar_swift-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-WRNavigationBar_swift-acknowledgements.plist"; sourceTree = ""; }; - C1AF856B3D835339E6E446917C5312B6 /* UIButton+Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIButton+Kingfisher.swift"; path = "Sources/UIButton+Kingfisher.swift"; sourceTree = ""; }; - C82DCFCD04A890F33F6873466BB8F21E /* Kingfisher.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Kingfisher.h; path = Sources/Kingfisher.h; sourceTree = ""; }; - C98A82CA32E1D54EA4FB0140C87A0D5F /* ImageCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageCache.swift; path = Sources/ImageCache.swift; sourceTree = ""; }; - CA951D80476B7B25AF48029C77615E15 /* ImageDownloader.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ImageDownloader.swift; path = Sources/ImageDownloader.swift; sourceTree = ""; }; - DF8738D6ED045E7C089A8AE94F21A0A0 /* ImageView+Kingfisher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "ImageView+Kingfisher.swift"; path = "Sources/ImageView+Kingfisher.swift"; sourceTree = ""; }; - E62FDCDEE52FFBAACE80CC15C761D7C6 /* Kingfisher-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Kingfisher-dummy.m"; sourceTree = ""; }; - EADB697E25B5800CAEFBC6A13A1DCBA9 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Filter.swift; sourceTree = ""; }; - ECB8A9E00B1031B5EEF4FADC65A407A6 /* KingfisherOptionsInfo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KingfisherOptionsInfo.swift; path = Sources/KingfisherOptionsInfo.swift; sourceTree = ""; }; - F108F08B8C9ACDA3F91D31E82E22633F /* Pods-WRNavigationBar_swift-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-WRNavigationBar_swift-acknowledgements.markdown"; sourceTree = ""; }; - F1DA91233A58A2FDA9DBACE4D8B923A8 /* Kingfisher-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Kingfisher-umbrella.h"; sourceTree = ""; }; - F3572B8CC9A94DF04AEAD640C7F3B46F /* Pods-WRNavigationBar_swift-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift-frameworks.sh"; sourceTree = ""; }; - F46EFC5CDAF57A92A7B136FFD3525675 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/CFNetwork.framework; sourceTree = DEVELOPER_DIR; }; - F8219BF94193F7436659F916DA2353FE /* Pods-WRNavigationBar_swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-WRNavigationBar_swift-dummy.m"; sourceTree = ""; }; + 9453666D7596D3911A788C6766C0FD9C /* Pods-WRNavigationBar_swift-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-WRNavigationBar_swift-acknowledgements.plist"; sourceTree = ""; }; + BBDE598CC03445EF6BE66726132F3BF0 /* Pods-WRNavigationBar_swift-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift-resources.sh"; sourceTree = ""; }; + EA7917D52F58C3D7F600454E26ABEAA4 /* Pods-WRNavigationBar_swift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 1E9938AFCEAD1D190C671C902B3A903E /* Frameworks */ = { + 397FE0E4835A351E0B7700CF1C792C2F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C1C52534BAF0801C90F6B3DDF3A59896 /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - C0B9722E352CF90C920286E6F029D3C0 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 52416A6AC7387ECACCC45596498D96AD /* CFNetwork.framework in Frameworks */, - 0CA6357476373C221D44C498AA1D65FE /* Foundation.framework in Frameworks */, + 2B51C9B1416204B8AA1EAC455C2AF1FD /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0DEE2A01FA885B4899312B6F6826FDBF /* Support Files */ = { - isa = PBXGroup; - children = ( - 854A8362EFD3CAC49FA4502B9F0FCB96 /* Info.plist */, - 7FA6100B5CDA0A51737954E7E2D1DE2D /* Kingfisher.modulemap */, - 52DC30D7E6C1223D54467216A97B0B7D /* Kingfisher.xcconfig */, - E62FDCDEE52FFBAACE80CC15C761D7C6 /* Kingfisher-dummy.m */, - 0F7DF0BCFC0710953CC5FF9972BE0B04 /* Kingfisher-prefix.pch */, - F1DA91233A58A2FDA9DBACE4D8B923A8 /* Kingfisher-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Kingfisher"; - sourceTree = ""; - }; 1BF2B0C737CAAE286BA4320319120121 /* Targets Support Files */ = { isa = PBXGroup; children = ( - 23618875B099A0BC3CE8E15469468F3C /* Pods-WRNavigationBar_swift */, + 4F281C6F18F2900595F12EBD5F2C9E90 /* Pods-WRNavigationBar_swift */, ); name = "Targets Support Files"; sourceTree = ""; }; - 23618875B099A0BC3CE8E15469468F3C /* Pods-WRNavigationBar_swift */ = { + 4F281C6F18F2900595F12EBD5F2C9E90 /* Pods-WRNavigationBar_swift */ = { isa = PBXGroup; children = ( - 5B49DEB9DF25D6EA7B6693213B7B90B3 /* Info.plist */, - 3CE01395EF504C101EFDBC103EC6E461 /* Pods-WRNavigationBar_swift.modulemap */, - F108F08B8C9ACDA3F91D31E82E22633F /* Pods-WRNavigationBar_swift-acknowledgements.markdown */, - BA4CB1BACA72306DD38BD93DB7EDC37F /* Pods-WRNavigationBar_swift-acknowledgements.plist */, - F8219BF94193F7436659F916DA2353FE /* Pods-WRNavigationBar_swift-dummy.m */, - F3572B8CC9A94DF04AEAD640C7F3B46F /* Pods-WRNavigationBar_swift-frameworks.sh */, - 2E03BC01661E426D39F6C97D69CBD5DA /* Pods-WRNavigationBar_swift-resources.sh */, - 7CECED3FD3EA864979CAFC7D2E34BD93 /* Pods-WRNavigationBar_swift-umbrella.h */, - AE66F7EA3A06D631F5729F90A9F79406 /* Pods-WRNavigationBar_swift.debug.xcconfig */, - 077D151C882C36797498299FA868DD45 /* Pods-WRNavigationBar_swift.release.xcconfig */, + 707AE4E06D73FD6317D2AB48594A4644 /* Info.plist */, + 080F16858EF8AC9C388A533BDBA3E17C /* Pods-WRNavigationBar_swift.modulemap */, + 5F776BF658F33F76A7D080C9CD1DA223 /* Pods-WRNavigationBar_swift-acknowledgements.markdown */, + 9453666D7596D3911A788C6766C0FD9C /* Pods-WRNavigationBar_swift-acknowledgements.plist */, + 44078BAAD6BC63EA1206D6F36ECE9C08 /* Pods-WRNavigationBar_swift-dummy.m */, + 05AF6C1F6A272D9B15B76E6B81CA14AB /* Pods-WRNavigationBar_swift-frameworks.sh */, + BBDE598CC03445EF6BE66726132F3BF0 /* Pods-WRNavigationBar_swift-resources.sh */, + 8E724B79A4530AE615B85746D3787943 /* Pods-WRNavigationBar_swift-umbrella.h */, + 815520D44A7A3F4B79088084773638CA /* Pods-WRNavigationBar_swift.debug.xcconfig */, + EA7917D52F58C3D7F600454E26ABEAA4 /* Pods-WRNavigationBar_swift.release.xcconfig */, ); name = "Pods-WRNavigationBar_swift"; path = "Target Support Files/Pods-WRNavigationBar_swift"; sourceTree = ""; }; - 33668159F3B925188A23B48976230B79 /* Products */ = { - isa = PBXGroup; - children = ( - 638E15C347D7A409389BE9A0476CC59F /* Kingfisher.framework */, - 75E959B193E767DED64E98D2D01CDA5F /* Pods_WRNavigationBar_swift.framework */, - ); - name = Products; - sourceTree = ""; - }; - 3B1085458B794CEAF49F0B0EE79A1FBD /* Kingfisher */ = { + 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( - 9295207D7CEECE2F5BDCD8CD84920ABE /* AnimatedImageView.swift */, - 9F0AEF804C3FF811567DCF8CBD32A1D5 /* Box.swift */, - 2DFCC4FC32F83B831601673C6818F019 /* CacheSerializer.swift */, - EADB697E25B5800CAEFBC6A13A1DCBA9 /* Filter.swift */, - 8DC875D6BCDEC1D273EDD95695790E7B /* FormatIndicatedCacheSerializer.swift */, - A9B28D20BE64B86A107267022F1E7064 /* Image.swift */, - C98A82CA32E1D54EA4FB0140C87A0D5F /* ImageCache.swift */, - CA951D80476B7B25AF48029C77615E15 /* ImageDownloader.swift */, - 308FC14D7DDFBB406C2E4ED7415C8D7B /* ImagePrefetcher.swift */, - A5B32513990923B73428F091F7DE8A5B /* ImageProcessor.swift */, - 88C862B0902EAF74B609F90285CFB7C6 /* ImageTransition.swift */, - DF8738D6ED045E7C089A8AE94F21A0A0 /* ImageView+Kingfisher.swift */, - A1791E48E319018D19A4085F3A0308EC /* Indicator.swift */, - C82DCFCD04A890F33F6873466BB8F21E /* Kingfisher.h */, - 81AE08F84342F7AB3680E0E6F7574A5A /* Kingfisher.swift */, - 023C24331AF069FFB31BE4575FF92A66 /* KingfisherManager.swift */, - ECB8A9E00B1031B5EEF4FADC65A407A6 /* KingfisherOptionsInfo.swift */, - 685A4E99CB4F94AC0F404F519C7AC866 /* Placeholder.swift */, - 835C82F8B413C5FC71B973BC63C7530C /* RequestModifier.swift */, - 835802EEFCA95C3BECB444475FEB53AD /* Resource.swift */, - 8D9580FED9E6FCE2C7845BC03E63D50A /* String+MD5.swift */, - A4C9AE39E7B57A63ADA77C5411A94EBA /* ThreadHelper.swift */, - C1AF856B3D835339E6E446917C5312B6 /* UIButton+Kingfisher.swift */, - 0DEE2A01FA885B4899312B6F6826FDBF /* Support Files */, + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, + A17D75D9BF2CC92635CC487475FCF2C9 /* Products */, + 1BF2B0C737CAAE286BA4320319120121 /* Targets Support Files */, ); - name = Kingfisher; - path = Kingfisher; sourceTree = ""; }; - 3DC75C8869B42AB93D04871325A0707E /* iOS */ = { + A17D75D9BF2CC92635CC487475FCF2C9 /* Products */ = { isa = PBXGroup; children = ( - F46EFC5CDAF57A92A7B136FFD3525675 /* CFNetwork.framework */, - 72913984B3E4B2AD01F71E405D688036 /* Foundation.framework */, + 70D946765B50E9281043BEBBCF598B78 /* Pods_WRNavigationBar_swift.framework */, ); - name = iOS; + name = Products; sourceTree = ""; }; - 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { isa = PBXGroup; children = ( - 3DC75C8869B42AB93D04871325A0707E /* iOS */, + D35AF013A5F0BAD4F32504907A52519E /* iOS */, ); name = Frameworks; sourceTree = ""; }; - 7DB346D0F39D3F0E887471402A8071AB = { + D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { isa = PBXGroup; children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, - 9469D748404B6E4D4F3E90E0B84F53A3 /* Pods */, - 33668159F3B925188A23B48976230B79 /* Products */, - 1BF2B0C737CAAE286BA4320319120121 /* Targets Support Files */, - ); - sourceTree = ""; - }; - 9469D748404B6E4D4F3E90E0B84F53A3 /* Pods */ = { - isa = PBXGroup; - children = ( - 3B1085458B794CEAF49F0B0EE79A1FBD /* Kingfisher */, + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, ); - name = Pods; + name = iOS; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 05C013F10E4A08DCD31F044A7072C25E /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 5D03025A98024CDF4F5DC9AC69A6D838 /* Pods-WRNavigationBar_swift-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 84676F7D46FF521291CDEB2AB04A454C /* Headers */ = { + 1D95B65CF45BAC3CC54856F59E179D87 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2F288ED3641B2B4775884C462AE377E6 /* Kingfisher-umbrella.h in Headers */, - 5B5D8AE167BD8E304CE474A9B8DBA2B4 /* Kingfisher.h in Headers */, + B53B927794BDA4466883230633A594F4 /* Pods-WRNavigationBar_swift-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 6F712943B3C5592E82604940D11CE08A /* Kingfisher */ = { - isa = PBXNativeTarget; - buildConfigurationList = 8C1E4CEFB2390CBE75E70BAC20F44BBF /* Build configuration list for PBXNativeTarget "Kingfisher" */; - buildPhases = ( - FD12B015E1FDA3498428EF09C91D1F17 /* Sources */, - C0B9722E352CF90C920286E6F029D3C0 /* Frameworks */, - 84676F7D46FF521291CDEB2AB04A454C /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Kingfisher; - productName = Kingfisher; - productReference = 638E15C347D7A409389BE9A0476CC59F /* Kingfisher.framework */; - productType = "com.apple.product-type.framework"; - }; - B4F69341F1BC6A4E6AA3F83A92D32FFB /* Pods-WRNavigationBar_swift */ = { + ECDA4F93CF6D0F58ED5B8B903A7DD81A /* Pods-WRNavigationBar_swift */ = { isa = PBXNativeTarget; - buildConfigurationList = 3BC883AEA3BFFB398C35E6F6E3F9689C /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift" */; + buildConfigurationList = 18CF4BFB493512A8B136FC8E62C093D6 /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift" */; buildPhases = ( - 19F926DB586A9A35FDF12C265BB83504 /* Sources */, - 1E9938AFCEAD1D190C671C902B3A903E /* Frameworks */, - 05C013F10E4A08DCD31F044A7072C25E /* Headers */, + EDB8FDEB55244786ED419BCB0CBF5E5E /* Sources */, + 397FE0E4835A351E0B7700CF1C792C2F /* Frameworks */, + 1D95B65CF45BAC3CC54856F59E179D87 /* Headers */, ); buildRules = ( ); dependencies = ( - 570F164AD107B6339FFB8826978C5EF4 /* PBXTargetDependency */, ); name = "Pods-WRNavigationBar_swift"; productName = "Pods-WRNavigationBar_swift"; - productReference = 75E959B193E767DED64E98D2D01CDA5F /* Pods_WRNavigationBar_swift.framework */; + productReference = 70D946765B50E9281043BEBBCF598B78 /* Pods_WRNavigationBar_swift.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -298,8 +137,8 @@ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0830; - LastUpgradeCheck = 0700; + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -309,133 +148,28 @@ en, ); mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 33668159F3B925188A23B48976230B79 /* Products */; + productRefGroup = A17D75D9BF2CC92635CC487475FCF2C9 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 6F712943B3C5592E82604940D11CE08A /* Kingfisher */, - B4F69341F1BC6A4E6AA3F83A92D32FFB /* Pods-WRNavigationBar_swift */, + ECDA4F93CF6D0F58ED5B8B903A7DD81A /* Pods-WRNavigationBar_swift */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 19F926DB586A9A35FDF12C265BB83504 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - D5B9985DA680B07E486A07969DA20D79 /* Pods-WRNavigationBar_swift-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - FD12B015E1FDA3498428EF09C91D1F17 /* Sources */ = { + EDB8FDEB55244786ED419BCB0CBF5E5E /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - A7EC09EC6EFAB3778E0A0341E7DC9CE3 /* AnimatedImageView.swift in Sources */, - B0033530A0EAABBB31CD46CA2899F3BD /* Box.swift in Sources */, - 5D83206A9A4656F11D511158EC8E0784 /* CacheSerializer.swift in Sources */, - 1DAF3BB88351664576507F774FEB051C /* Filter.swift in Sources */, - 40765AAA791D6DFC0022639E348F0E6A /* FormatIndicatedCacheSerializer.swift in Sources */, - 950D8E334E011B13CC5786595E6AE615 /* Image.swift in Sources */, - 8D7D42C25F9430F572E14200C399D57B /* ImageCache.swift in Sources */, - 413C2A3759ABEC870AAE61F28C258C31 /* ImageDownloader.swift in Sources */, - F99792883819ADBD16123F91F6A9F3F8 /* ImagePrefetcher.swift in Sources */, - 93D444FC9D79520E14FB8EF178F0B76E /* ImageProcessor.swift in Sources */, - 07432E8DEA8B25795C7C545AA67A0187 /* ImageTransition.swift in Sources */, - CB8DF027448816C623E9B02A3685A59F /* ImageView+Kingfisher.swift in Sources */, - 2082EB4AA16440FFD5479FAFC0181066 /* Indicator.swift in Sources */, - CB4222BC34D92C2E06A5BCF730FEFE71 /* Kingfisher-dummy.m in Sources */, - 873BA68C2E24D634D38E4A8BCB74B08D /* Kingfisher.swift in Sources */, - 383C9A8DB84B83233633C3A00A2C1608 /* KingfisherManager.swift in Sources */, - 1827E7D94F3A12CA0C58EF33AE4B026D /* KingfisherOptionsInfo.swift in Sources */, - E710FF1F4EB4B125F9C5DBDFE3B9320F /* Placeholder.swift in Sources */, - 282E6F0E67F3799B0ABCB9ED96B666A9 /* RequestModifier.swift in Sources */, - 1FCC0970C8435F10768CA84C2025A177 /* Resource.swift in Sources */, - 10AD5E70FDD53228153032C58FBF4D52 /* String+MD5.swift in Sources */, - 48EC78A50C61424D4DFDC33A325CAA72 /* ThreadHelper.swift in Sources */, - FAC3C67720C7E6EF51CCAE58F62645BC /* UIButton+Kingfisher.swift in Sources */, + 03E4263133608CEB338591B4B7E12544 /* Pods-WRNavigationBar_swift-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ -/* Begin PBXTargetDependency section */ - 570F164AD107B6339FFB8826978C5EF4 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Kingfisher; - target = 6F712943B3C5592E82604940D11CE08A /* Kingfisher */; - targetProxy = 39ED95EEBDF3F99D9600C1827FE92AF7 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - /* Begin XCBuildConfiguration section */ - 576C583E88A92DC2279EB3BFC2CA8A6C /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 52DC30D7E6C1223D54467216A97B0B7D /* Kingfisher.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Kingfisher/Kingfisher-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Kingfisher/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Kingfisher/Kingfisher.modulemap"; - PRODUCT_NAME = Kingfisher; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 961384A12D2CE6B1C90AD0CABD2F3B67 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 077D151C882C36797498299FA868DD45 /* Pods-WRNavigationBar_swift.release.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_WRNavigationBar_swift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - B254DAA6CF0CE39F4A3D11B90A7E059A /* Release */ = { + 1EE19F5DD95931924296F637BF18BD8F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -445,10 +179,12 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -456,6 +192,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -464,15 +201,19 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; + DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -482,18 +223,54 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SYMROOT = "${SRCROOT}/../build"; }; + name = Debug; + }; + 39E8CDEE298765A16A439BFFB55BB7AC /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EA7917D52F58C3D7F600454E26ABEAA4 /* Pods-WRNavigationBar_swift.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; name = Release; }; - B44E7915DC09BA8049ACD6E6966BF9CC /* Debug */ = { + A4AF4DD1E206C0526E366D66A0CB70B5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AE66F7EA3A06D631F5729F90A9F79406 /* Pods-WRNavigationBar_swift.debug.xcconfig */; + baseConfigurationReference = 815520D44A7A3F4B79088084773638CA /* Pods-WRNavigationBar_swift.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -513,18 +290,16 @@ OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_WRNavigationBar_swift; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - E4B68EE12B21C47CB798D9B1ECA6D7A7 /* Debug */ = { + F4568DEE257655D290C2B9CEAB37C934 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -534,10 +309,12 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -545,6 +322,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -553,18 +331,16 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", + "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -574,74 +350,30 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; + MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = "$(TARGET_NAME)"; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SYMROOT = "${SRCROOT}/../build"; }; - name = Debug; - }; - E8652F35BF322A3957D0F62338910B79 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 52DC30D7E6C1223D54467216A97B0B7D /* Kingfisher.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Kingfisher/Kingfisher-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Kingfisher/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Kingfisher/Kingfisher.modulemap"; - PRODUCT_NAME = Kingfisher; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - E4B68EE12B21C47CB798D9B1ECA6D7A7 /* Debug */, - B254DAA6CF0CE39F4A3D11B90A7E059A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3BC883AEA3BFFB398C35E6F6E3F9689C /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift" */ = { + 18CF4BFB493512A8B136FC8E62C093D6 /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift" */ = { isa = XCConfigurationList; buildConfigurations = ( - B44E7915DC09BA8049ACD6E6966BF9CC /* Debug */, - 961384A12D2CE6B1C90AD0CABD2F3B67 /* Release */, + A4AF4DD1E206C0526E366D66A0CB70B5 /* Debug */, + 39E8CDEE298765A16A439BFFB55BB7AC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 8C1E4CEFB2390CBE75E70BAC20F44BBF /* Build configuration list for PBXNativeTarget "Kingfisher" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 576C583E88A92DC2279EB3BFC2CA8A6C /* Debug */, - E8652F35BF322A3957D0F62338910B79 /* Release */, + 1EE19F5DD95931924296F637BF18BD8F /* Debug */, + F4568DEE257655D290C2B9CEAB37C934 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Info.plist b/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Info.plist deleted file mode 100644 index 33563de..0000000 --- a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Info.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - ${PRODUCT_BUNDLE_IDENTIFIER} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - FMWK - CFBundleShortVersionString - 4.3.1 - CFBundleSignature - ???? - CFBundleVersion - ${CURRENT_PROJECT_VERSION} - NSPrincipalClass - - - diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-dummy.m b/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-dummy.m deleted file mode 100644 index 1b89d0e..0000000 --- a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Kingfisher : NSObject -@end -@implementation PodsDummy_Kingfisher -@end diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-prefix.pch b/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-prefix.pch deleted file mode 100644 index beb2a24..0000000 --- a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-prefix.pch +++ /dev/null @@ -1,12 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-umbrella.h b/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-umbrella.h deleted file mode 100644 index 89b88ac..0000000 --- a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher-umbrella.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - -#import "Kingfisher.h" - -FOUNDATION_EXPORT double KingfisherVersionNumber; -FOUNDATION_EXPORT const unsigned char KingfisherVersionString[]; - diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher.modulemap b/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher.modulemap deleted file mode 100644 index 2a20d91..0000000 --- a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Kingfisher { - umbrella header "Kingfisher-umbrella.h" - - export * - module * { export * } -} diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher.xcconfig b/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher.xcconfig deleted file mode 100644 index e05e95c..0000000 --- a/WRNavigationBar_swift/Pods/Target Support Files/Kingfisher/Kingfisher.xcconfig +++ /dev/null @@ -1,12 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Kingfisher -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_LDFLAGS = -framework "CFNetwork" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PODS_TARGET_SRCROOT = ${PODS_ROOT}/Kingfisher -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES -SWIFT_VERSION = 4.0 diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.markdown b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.markdown index 0d6265a..102af75 100644 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.markdown +++ b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.markdown @@ -1,29 +1,3 @@ # Acknowledgements This application makes use of the following third party libraries: - -## Kingfisher - -The MIT License (MIT) - -Copyright (c) 2017 Wei Wang - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. - - Generated by CocoaPods - https://cocoapods.org diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.plist b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.plist index 49c755a..7acbad1 100644 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.plist +++ b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.plist @@ -12,38 +12,6 @@ Type PSGroupSpecifier - - FooterText - The MIT License (MIT) - -Copyright (c) 2017 Wei Wang - -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: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -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. - - - License - MIT - Title - Kingfisher - Type - PSGroupSpecifier - FooterText Generated by CocoaPods - https://cocoapods.org diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-frameworks.sh b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-frameworks.sh index 82bcb19..08e3eaa 100755 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-frameworks.sh +++ b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-frameworks.sh @@ -1,15 +1,28 @@ #!/bin/sh set -e +set -u +set -o pipefail + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + # This protects against multiple targets copying the same framework dependency at the same time. The solution # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") +# Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -58,21 +71,40 @@ install_framework() fi } -# Copies the dSYM of a vendored framework +# Copies and strips a vendored dSYM install_dsym() { local source="$1" if [ -r "$source" ]; then - echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DWARF_DSYM_FOLDER_PATH}\"" - rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DWARF_DSYM_FOLDER_PATH}" + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi fi } # Signs a framework with the provided identity code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then code_sign_cmd="$code_sign_cmd &" @@ -85,10 +117,18 @@ code_sign_if_enabled() { # Strip invalid architectures strip_invalid_archs() { binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi stripped="" - for arch in $archs; do + for arch in $binary_archs; do if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 @@ -98,15 +138,9 @@ strip_invalid_archs() { if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi + STRIP_BINARY_RETVAL=1 } - -if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework" -fi -if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework" -fi if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then wait fi diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-resources.sh b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-resources.sh index a7df440..345301f 100755 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-resources.sh +++ b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-resources.sh @@ -1,5 +1,13 @@ #!/bin/sh set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" @@ -12,7 +20,7 @@ XCASSET_FILES=() # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") -case "${TARGETED_DEVICE_FAMILY}" in +case "${TARGETED_DEVICE_FAMILY:-}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" ;; @@ -92,7 +100,7 @@ if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then fi rm -f "$RESOURCES_TO_COPY" -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] then # Find all other xcassets (this unfortunately includes those of path pods and other targets). OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) @@ -102,5 +110,9 @@ then fi done <<<"$OTHER_XCASSETS" - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi fi diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig index 4336f8f..566aa02 100644 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig +++ b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig @@ -1,11 +1,6 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Kingfisher" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Kingfisher/Kingfisher.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Kingfisher" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig index 4336f8f..566aa02 100644 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig +++ b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig @@ -1,11 +1,6 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/Kingfisher" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Kingfisher/Kingfisher.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Kingfisher" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.pbxproj b/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.pbxproj index f37db52..3ffc505 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.pbxproj +++ b/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.pbxproj @@ -7,7 +7,33 @@ objects = { /* Begin PBXBuildFile section */ - 1A05B4741F07FA9C001D7B64 /* WRNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A05B4731F07FA9C001D7B64 /* WRNavigationBar.swift */; }; + 12CE35BA21EEE1DD00F43FC1 /* WRCycleScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35B721EEE1DD00F43FC1 /* WRCycleScrollView.swift */; }; + 12CE35BB21EEE1DD00F43FC1 /* WRCycleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35B821EEE1DD00F43FC1 /* WRCycleCell.swift */; }; + 12CE35BC21EEE1DD00F43FC1 /* WRProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35B921EEE1DD00F43FC1 /* WRProxy.swift */; }; + 12CE35C121EEE2EC00F43FC1 /* WRNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35BF21EEE2EC00F43FC1 /* WRNavigationBar.swift */; }; + 12CE35C221EEE2EC00F43FC1 /* WRCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35C021EEE2EC00F43FC1 /* WRCustomNavigationBar.swift */; }; + 12CE360921EEE37C00F43FC1 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F221EEE37B00F43FC1 /* Image.swift */; }; + 12CE360A21EEE37C00F43FC1 /* KingfisherManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F321EEE37B00F43FC1 /* KingfisherManager.swift */; }; + 12CE360B21EEE37C00F43FC1 /* Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F421EEE37B00F43FC1 /* Kingfisher.swift */; }; + 12CE360C21EEE37C00F43FC1 /* CacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F521EEE37B00F43FC1 /* CacheSerializer.swift */; }; + 12CE360D21EEE37C00F43FC1 /* String+MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F621EEE37B00F43FC1 /* String+MD5.swift */; }; + 12CE360E21EEE37C00F43FC1 /* KingfisherOptionsInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F721EEE37B00F43FC1 /* KingfisherOptionsInfo.swift */; }; + 12CE360F21EEE37C00F43FC1 /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F821EEE37B00F43FC1 /* ImageDownloader.swift */; }; + 12CE361021EEE37C00F43FC1 /* Resource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F921EEE37B00F43FC1 /* Resource.swift */; }; + 12CE361121EEE37C00F43FC1 /* AnimatedImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FA21EEE37B00F43FC1 /* AnimatedImageView.swift */; }; + 12CE361221EEE37C00F43FC1 /* ImageTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FC21EEE37B00F43FC1 /* ImageTransition.swift */; }; + 12CE361321EEE37C00F43FC1 /* ImagePrefetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FD21EEE37B00F43FC1 /* ImagePrefetcher.swift */; }; + 12CE361421EEE37C00F43FC1 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FE21EEE37B00F43FC1 /* Box.swift */; }; + 12CE361521EEE37C00F43FC1 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FF21EEE37B00F43FC1 /* Filter.swift */; }; + 12CE361621EEE37C00F43FC1 /* Placeholder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360021EEE37B00F43FC1 /* Placeholder.swift */; }; + 12CE361721EEE37C00F43FC1 /* RequestModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360121EEE37B00F43FC1 /* RequestModifier.swift */; }; + 12CE361821EEE37C00F43FC1 /* ImageProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360221EEE37B00F43FC1 /* ImageProcessor.swift */; }; + 12CE361921EEE37C00F43FC1 /* ThreadHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360321EEE37B00F43FC1 /* ThreadHelper.swift */; }; + 12CE361A21EEE37C00F43FC1 /* UIButton+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360421EEE37B00F43FC1 /* UIButton+Kingfisher.swift */; }; + 12CE361B21EEE37C00F43FC1 /* ImageView+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360521EEE37B00F43FC1 /* ImageView+Kingfisher.swift */; }; + 12CE361C21EEE37C00F43FC1 /* FormatIndicatedCacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360621EEE37B00F43FC1 /* FormatIndicatedCacheSerializer.swift */; }; + 12CE361D21EEE37C00F43FC1 /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360721EEE37B00F43FC1 /* ImageCache.swift */; }; + 12CE361E21EEE37C00F43FC1 /* Indicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360821EEE37B00F43FC1 /* Indicator.swift */; }; 1A05B4761F07FAB4001D7B64 /* NormalListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A05B4751F07FAB4001D7B64 /* NormalListController.swift */; }; 1A05B4781F07FAD7001D7B64 /* ImageNavController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A05B4771F07FAD7001D7B64 /* ImageNavController.swift */; }; 1A05B47A1F080D0B001D7B64 /* MillcolorGradController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A05B4791F080D0B001D7B64 /* MillcolorGradController.swift */; }; @@ -29,11 +55,7 @@ 1AB7026A1EA9AC7A006DBA79 /* QQAppController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB702691EA9AC7A006DBA79 /* QQAppController.swift */; }; 1AB7026C1EA9B753006DBA79 /* QQZoneController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB7026B1EA9B753006DBA79 /* QQZoneController.swift */; }; 1AD0140A1EDBFB4500A6893C /* ZhiHuController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AD014091EDBFB4500A6893C /* ZhiHuController.swift */; }; - 1AD0140F1EDBFEAC00A6893C /* WRCycleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AD0140C1EDBFEAC00A6893C /* WRCycleCell.swift */; }; - 1AD014101EDBFEAC00A6893C /* WRCycleScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AD0140D1EDBFEAC00A6893C /* WRCycleScrollView.swift */; }; - 1AD014111EDBFEAC00A6893C /* WRProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AD0140E1EDBFEAC00A6893C /* WRProxy.swift */; }; 1AD014131EDC091F00A6893C /* QQMineController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AD014121EDC091F00A6893C /* QQMineController.swift */; }; - 34A093CA1FC941B0009119BF /* WRCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34A093C91FC941B0009119BF /* WRCustomNavigationBar.swift */; }; BA823A4F29CFCD6EEC3B52B9 /* Pods_WRNavigationBar_swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C8A182323696F064D8660C /* Pods_WRNavigationBar_swift.framework */; }; /* End PBXBuildFile section */ @@ -48,7 +70,34 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 1A05B4731F07FA9C001D7B64 /* WRNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WRNavigationBar.swift; sourceTree = ""; }; + 12CE35B721EEE1DD00F43FC1 /* WRCycleScrollView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRCycleScrollView.swift; path = WRNavigationBar_swift/WRCycleScrollView.swift; sourceTree = SOURCE_ROOT; }; + 12CE35B821EEE1DD00F43FC1 /* WRCycleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRCycleCell.swift; path = WRNavigationBar_swift/WRCycleCell.swift; sourceTree = SOURCE_ROOT; }; + 12CE35B921EEE1DD00F43FC1 /* WRProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRProxy.swift; path = WRNavigationBar_swift/WRProxy.swift; sourceTree = SOURCE_ROOT; }; + 12CE35BF21EEE2EC00F43FC1 /* WRNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRNavigationBar.swift; path = ../../WRNavigationBar/WRNavigationBar.swift; sourceTree = ""; }; + 12CE35C021EEE2EC00F43FC1 /* WRCustomNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRCustomNavigationBar.swift; path = ../../WRNavigationBar/WRCustomNavigationBar.swift; sourceTree = ""; }; + 12CE35F221EEE37B00F43FC1 /* Image.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Kingfisher/Image.swift; sourceTree = ""; }; + 12CE35F321EEE37B00F43FC1 /* KingfisherManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = KingfisherManager.swift; path = Kingfisher/KingfisherManager.swift; sourceTree = ""; }; + 12CE35F421EEE37B00F43FC1 /* Kingfisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Kingfisher.swift; path = Kingfisher/Kingfisher.swift; sourceTree = ""; }; + 12CE35F521EEE37B00F43FC1 /* CacheSerializer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CacheSerializer.swift; path = Kingfisher/CacheSerializer.swift; sourceTree = ""; }; + 12CE35F621EEE37B00F43FC1 /* String+MD5.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "String+MD5.swift"; path = "Kingfisher/String+MD5.swift"; sourceTree = ""; }; + 12CE35F721EEE37B00F43FC1 /* KingfisherOptionsInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = KingfisherOptionsInfo.swift; path = Kingfisher/KingfisherOptionsInfo.swift; sourceTree = ""; }; + 12CE35F821EEE37B00F43FC1 /* ImageDownloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageDownloader.swift; path = Kingfisher/ImageDownloader.swift; sourceTree = ""; }; + 12CE35F921EEE37B00F43FC1 /* Resource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Resource.swift; path = Kingfisher/Resource.swift; sourceTree = ""; }; + 12CE35FA21EEE37B00F43FC1 /* AnimatedImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AnimatedImageView.swift; path = Kingfisher/AnimatedImageView.swift; sourceTree = ""; }; + 12CE35FB21EEE37B00F43FC1 /* Kingfisher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Kingfisher.h; path = Kingfisher/Kingfisher.h; sourceTree = ""; }; + 12CE35FC21EEE37B00F43FC1 /* ImageTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageTransition.swift; path = Kingfisher/ImageTransition.swift; sourceTree = ""; }; + 12CE35FD21EEE37B00F43FC1 /* ImagePrefetcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImagePrefetcher.swift; path = Kingfisher/ImagePrefetcher.swift; sourceTree = ""; }; + 12CE35FE21EEE37B00F43FC1 /* Box.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Kingfisher/Box.swift; sourceTree = ""; }; + 12CE35FF21EEE37B00F43FC1 /* Filter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Kingfisher/Filter.swift; sourceTree = ""; }; + 12CE360021EEE37B00F43FC1 /* Placeholder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Placeholder.swift; path = Kingfisher/Placeholder.swift; sourceTree = ""; }; + 12CE360121EEE37B00F43FC1 /* RequestModifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RequestModifier.swift; path = Kingfisher/RequestModifier.swift; sourceTree = ""; }; + 12CE360221EEE37B00F43FC1 /* ImageProcessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageProcessor.swift; path = Kingfisher/ImageProcessor.swift; sourceTree = ""; }; + 12CE360321EEE37B00F43FC1 /* ThreadHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ThreadHelper.swift; path = Kingfisher/ThreadHelper.swift; sourceTree = ""; }; + 12CE360421EEE37B00F43FC1 /* UIButton+Kingfisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIButton+Kingfisher.swift"; path = "Kingfisher/UIButton+Kingfisher.swift"; sourceTree = ""; }; + 12CE360521EEE37B00F43FC1 /* ImageView+Kingfisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "ImageView+Kingfisher.swift"; path = "Kingfisher/ImageView+Kingfisher.swift"; sourceTree = ""; }; + 12CE360621EEE37B00F43FC1 /* FormatIndicatedCacheSerializer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FormatIndicatedCacheSerializer.swift; path = Kingfisher/FormatIndicatedCacheSerializer.swift; sourceTree = ""; }; + 12CE360721EEE37B00F43FC1 /* ImageCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageCache.swift; path = Kingfisher/ImageCache.swift; sourceTree = ""; }; + 12CE360821EEE37B00F43FC1 /* Indicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Indicator.swift; path = Kingfisher/Indicator.swift; sourceTree = ""; }; 1A05B4751F07FAB4001D7B64 /* NormalListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NormalListController.swift; sourceTree = ""; }; 1A05B4771F07FAD7001D7B64 /* ImageNavController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageNavController.swift; sourceTree = ""; }; 1A05B4791F080D0B001D7B64 /* MillcolorGradController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MillcolorGradController.swift; sourceTree = ""; }; @@ -74,12 +123,8 @@ 1AB702691EA9AC7A006DBA79 /* QQAppController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QQAppController.swift; sourceTree = ""; }; 1AB7026B1EA9B753006DBA79 /* QQZoneController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QQZoneController.swift; sourceTree = ""; }; 1AD014091EDBFB4500A6893C /* ZhiHuController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZhiHuController.swift; sourceTree = ""; }; - 1AD0140C1EDBFEAC00A6893C /* WRCycleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WRCycleCell.swift; sourceTree = ""; }; - 1AD0140D1EDBFEAC00A6893C /* WRCycleScrollView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WRCycleScrollView.swift; sourceTree = ""; }; - 1AD0140E1EDBFEAC00A6893C /* WRProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WRProxy.swift; sourceTree = ""; }; 1AD014121EDC091F00A6893C /* QQMineController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QQMineController.swift; sourceTree = ""; }; 272C2A7862DC39DA91D57781 /* Pods-WRNavigationBar_swift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift.release.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig"; sourceTree = ""; }; - 34A093C91FC941B0009119BF /* WRCustomNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WRCustomNavigationBar.swift; sourceTree = ""; }; 63C8A182323696F064D8660C /* Pods_WRNavigationBar_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WRNavigationBar_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; D76868588A082EB7E7777210 /* Pods-WRNavigationBar_swift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -103,6 +148,55 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 12CE35BD21EEE2CD00F43FC1 /* WRCycleScrollView */ = { + isa = PBXGroup; + children = ( + 12CE35B821EEE1DD00F43FC1 /* WRCycleCell.swift */, + 12CE35B721EEE1DD00F43FC1 /* WRCycleScrollView.swift */, + 12CE35B921EEE1DD00F43FC1 /* WRProxy.swift */, + ); + name = WRCycleScrollView; + sourceTree = ""; + }; + 12CE35BE21EEE2D800F43FC1 /* WRNavigationBar */ = { + isa = PBXGroup; + children = ( + 12CE35C021EEE2EC00F43FC1 /* WRCustomNavigationBar.swift */, + 12CE35BF21EEE2EC00F43FC1 /* WRNavigationBar.swift */, + ); + name = WRNavigationBar; + sourceTree = ""; + }; + 12CE35F121EEE36A00F43FC1 /* Kingfisher */ = { + isa = PBXGroup; + children = ( + 12CE35FA21EEE37B00F43FC1 /* AnimatedImageView.swift */, + 12CE35FE21EEE37B00F43FC1 /* Box.swift */, + 12CE35F521EEE37B00F43FC1 /* CacheSerializer.swift */, + 12CE35FF21EEE37B00F43FC1 /* Filter.swift */, + 12CE360621EEE37B00F43FC1 /* FormatIndicatedCacheSerializer.swift */, + 12CE35F221EEE37B00F43FC1 /* Image.swift */, + 12CE360721EEE37B00F43FC1 /* ImageCache.swift */, + 12CE35F821EEE37B00F43FC1 /* ImageDownloader.swift */, + 12CE35FD21EEE37B00F43FC1 /* ImagePrefetcher.swift */, + 12CE360221EEE37B00F43FC1 /* ImageProcessor.swift */, + 12CE35FC21EEE37B00F43FC1 /* ImageTransition.swift */, + 12CE360521EEE37B00F43FC1 /* ImageView+Kingfisher.swift */, + 12CE360821EEE37B00F43FC1 /* Indicator.swift */, + 12CE35FB21EEE37B00F43FC1 /* Kingfisher.h */, + 12CE35F421EEE37B00F43FC1 /* Kingfisher.swift */, + 12CE35F321EEE37B00F43FC1 /* KingfisherManager.swift */, + 12CE35F721EEE37B00F43FC1 /* KingfisherOptionsInfo.swift */, + 12CE360021EEE37B00F43FC1 /* Placeholder.swift */, + 12CE360121EEE37B00F43FC1 /* RequestModifier.swift */, + 12CE35F921EEE37B00F43FC1 /* Resource.swift */, + 12CE35F621EEE37B00F43FC1 /* String+MD5.swift */, + 12CE360321EEE37B00F43FC1 /* ThreadHelper.swift */, + 12CE360421EEE37B00F43FC1 /* UIButton+Kingfisher.swift */, + ); + name = Kingfisher; + sourceTree = ""; + }; 1A0DF76E1EA7176500191349 = { isa = PBXGroup; children = ( @@ -126,10 +220,11 @@ 1A0DF7791EA7176500191349 /* WRNavigationBar_swift */ = { isa = PBXGroup; children = ( + 12CE35F121EEE36A00F43FC1 /* Kingfisher */, + 12CE35BE21EEE2D800F43FC1 /* WRNavigationBar */, + 12CE35BD21EEE2CD00F43FC1 /* WRCycleScrollView */, 1A0DF77A1EA7176500191349 /* AppDelegate.swift */, 1A0DF7B81EA7521C00191349 /* BaseNavigationController.swift */, - 1AD0140B1EDBFEAC00A6893C /* WRCycleScrollView */, - 1A0DF79A1EA7179500191349 /* WRNavigationBar */, 1A0DF7B11EA7370000191349 /* 普通 */, 1A6FB6F51ED023EE0098622A /* 自定义导航栏 */, 1A96559A1ED6B5AB00A89E30 /* 移动导航栏 */, @@ -150,15 +245,6 @@ path = WRNavigationBar_swiftTests; sourceTree = ""; }; - 1A0DF79A1EA7179500191349 /* WRNavigationBar */ = { - isa = PBXGroup; - children = ( - 1A05B4731F07FA9C001D7B64 /* WRNavigationBar.swift */, - 34A093C91FC941B0009119BF /* WRCustomNavigationBar.swift */, - ); - path = WRNavigationBar; - sourceTree = ""; - }; 1A0DF7B11EA7370000191349 /* 普通 */ = { isa = PBXGroup; children = ( @@ -199,17 +285,6 @@ path = Demos; sourceTree = ""; }; - 1AD0140B1EDBFEAC00A6893C /* WRCycleScrollView */ = { - isa = PBXGroup; - children = ( - 1AD0140C1EDBFEAC00A6893C /* WRCycleCell.swift */, - 1AD0140D1EDBFEAC00A6893C /* WRCycleScrollView.swift */, - 1AD0140E1EDBFEAC00A6893C /* WRProxy.swift */, - ); - name = WRCycleScrollView; - path = WRNavigationBar/WRCycleScrollView; - sourceTree = ""; - }; 3DD6CC0BB5CD77C87CA6E111 /* Pods */ = { isa = PBXGroup; children = ( @@ -238,8 +313,6 @@ 1A0DF7731EA7176500191349 /* Sources */, 1A0DF7741EA7176500191349 /* Frameworks */, 1A0DF7751EA7176500191349 /* Resources */, - D52EBFEB66FB9C860C432F23 /* [CP] Embed Pods Frameworks */, - 4D703F4092429718B46E9B6D /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -280,13 +353,13 @@ TargetAttributes = { 1A0DF7761EA7176500191349 = { CreatedOnToolsVersion = 8.1; - DevelopmentTeam = 652U6LDTX4; + DevelopmentTeam = P3X2725LYY; LastSwiftMigration = 0900; ProvisioningStyle = Automatic; }; 1A0DF78A1EA7176500191349 = { CreatedOnToolsVersion = 8.1; - DevelopmentTeam = 652U6LDTX4; + DevelopmentTeam = P3X2725LYY; LastSwiftMigration = 0900; ProvisioningStyle = Automatic; TestTargetID = 1A0DF7761EA7176500191349; @@ -333,21 +406,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 4D703F4092429718B46E9B6D /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 8B07B81DC9245E9840A20E2B /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -366,24 +424,6 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - D52EBFEB66FB9C860C432F23 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-frameworks.sh", - "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Kingfisher.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -391,28 +431,50 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 12CE35BA21EEE1DD00F43FC1 /* WRCycleScrollView.swift in Sources */, + 12CE360921EEE37C00F43FC1 /* Image.swift in Sources */, 1A869EDF1ECAA36B006D96F8 /* CustomNavBarController.swift in Sources */, + 12CE361621EEE37C00F43FC1 /* Placeholder.swift in Sources */, + 12CE361821EEE37C00F43FC1 /* ImageProcessor.swift in Sources */, + 12CE361921EEE37C00F43FC1 /* ThreadHelper.swift in Sources */, + 12CE361321EEE37C00F43FC1 /* ImagePrefetcher.swift in Sources */, + 12CE360A21EEE37C00F43FC1 /* KingfisherManager.swift in Sources */, + 12CE360C21EEE37C00F43FC1 /* CacheSerializer.swift in Sources */, + 12CE35C121EEE2EC00F43FC1 /* WRNavigationBar.swift in Sources */, 1AD014131EDC091F00A6893C /* QQMineController.swift in Sources */, 1AB7026C1EA9B753006DBA79 /* QQZoneController.swift in Sources */, 1A05B47A1F080D0B001D7B64 /* MillcolorGradController.swift in Sources */, + 12CE35BB21EEE1DD00F43FC1 /* WRCycleCell.swift in Sources */, + 12CE361721EEE37C00F43FC1 /* RequestModifier.swift in Sources */, + 12CE361021EEE37C00F43FC1 /* Resource.swift in Sources */, 1A05B4781F07FAD7001D7B64 /* ImageNavController.swift in Sources */, + 12CE361A21EEE37C00F43FC1 /* UIButton+Kingfisher.swift in Sources */, 1A96559E1ED6B8C600A89E30 /* MoveListController.swift in Sources */, - 1AD014111EDBFEAC00A6893C /* WRProxy.swift in Sources */, + 12CE361221EEE37C00F43FC1 /* ImageTransition.swift in Sources */, + 12CE361C21EEE37C00F43FC1 /* FormatIndicatedCacheSerializer.swift in Sources */, + 12CE360B21EEE37C00F43FC1 /* Kingfisher.swift in Sources */, + 12CE361D21EEE37C00F43FC1 /* ImageCache.swift in Sources */, + 12CE35C221EEE2EC00F43FC1 /* WRCustomNavigationBar.swift in Sources */, + 12CE360E21EEE37C00F43FC1 /* KingfisherOptionsInfo.swift in Sources */, 1AD0140A1EDBFB4500A6893C /* ZhiHuController.swift in Sources */, - 1AD0140F1EDBFEAC00A6893C /* WRCycleCell.swift in Sources */, - 34A093CA1FC941B0009119BF /* WRCustomNavigationBar.swift in Sources */, + 12CE360F21EEE37C00F43FC1 /* ImageDownloader.swift in Sources */, 1A869EDD1ECAA0C1006D96F8 /* BaseViewController.swift in Sources */, + 12CE361121EEE37C00F43FC1 /* AnimatedImageView.swift in Sources */, 1A05B4761F07FAB4001D7B64 /* NormalListController.swift in Sources */, - 1A05B4741F07FA9C001D7B64 /* WRNavigationBar.swift in Sources */, - 1AD014101EDBFEAC00A6893C /* WRCycleScrollView.swift in Sources */, 1A0DF7B51EA7380600191349 /* SixthViewController.swift in Sources */, 1AB7026A1EA9AC7A006DBA79 /* QQAppController.swift in Sources */, + 12CE361521EEE37C00F43FC1 /* Filter.swift in Sources */, 1A0DF77B1EA7176500191349 /* AppDelegate.swift in Sources */, + 12CE361B21EEE37C00F43FC1 /* ImageView+Kingfisher.swift in Sources */, 1A966E8D1EE048F60045FCB8 /* AntForestController.swift in Sources */, 1A96559C1ED6B64F00A89E30 /* CustomListController.swift in Sources */, 1AB702661EA9A43C006DBA79 /* SecondViewController.swift in Sources */, + 12CE361421EEE37C00F43FC1 /* Box.swift in Sources */, + 12CE360D21EEE37C00F43FC1 /* String+MD5.swift in Sources */, 1A0DF7B91EA7521C00191349 /* BaseNavigationController.swift in Sources */, 1AADC3941F23088600BB73D9 /* AllTransparent.swift in Sources */, + 12CE35BC21EEE1DD00F43FC1 /* WRProxy.swift in Sources */, + 12CE361E21EEE37C00F43FC1 /* Indicator.swift in Sources */, 1A0DF7B71EA7471B00191349 /* WeiBoMineController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -508,6 +570,7 @@ SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -557,6 +620,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -567,14 +631,14 @@ baseConfigurationReference = D76868588A082EB7E7777210 /* Pods-WRNavigationBar_swift.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 652U6LDTX4; + DEVELOPMENT_TEAM = P3X2725LYY; INFOPLIST_FILE = WRNavigationBar_swift/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = video.com.wangrui; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = 1; }; name = Debug; @@ -584,14 +648,14 @@ baseConfigurationReference = 272C2A7862DC39DA91D57781 /* Pods-WRNavigationBar_swift.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 652U6LDTX4; + DEVELOPMENT_TEAM = P3X2725LYY; INFOPLIST_FILE = WRNavigationBar_swift/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = video.com.wangrui; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = 1; }; name = Release; @@ -601,13 +665,13 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = 652U6LDTX4; + DEVELOPMENT_TEAM = P3X2725LYY; INFOPLIST_FILE = WRNavigationBar_swiftTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "video.wangrui.com.WRNavigationBar-swiftTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WRNavigationBar_swift.app/WRNavigationBar_swift"; }; name = Debug; @@ -617,13 +681,13 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = 652U6LDTX4; + DEVELOPMENT_TEAM = P3X2725LYY; INFOPLIST_FILE = WRNavigationBar_swiftTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "video.wangrui.com.WRNavigationBar-swiftTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 4.2; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WRNavigationBar_swift.app/WRNavigationBar_swift"; }; name = Release; diff --git a/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/WRNavigationBar_swift/WRNavigationBar_swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/WRNavigationBar_swift/WRNavigationBar_swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/WRNavigationBar_swift/WRNavigationBar_swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/AppDelegate.swift b/WRNavigationBar_swift/WRNavigationBar_swift/AppDelegate.swift index 3928939..e2cb050 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/AppDelegate.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/AppDelegate.swift @@ -20,7 +20,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { window = UIWindow.init(frame: UIScreen.main.bounds) window?.backgroundColor = UIColor.white diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AllTransparent.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AllTransparent.swift index bb73ab7..ca0d792 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AllTransparent.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AllTransparent.swift @@ -16,7 +16,7 @@ class AllTransparent: UIViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) - table.contentInset = UIEdgeInsetsMake(-CGFloat(kNavBarBottom), 0, 0, 0); + table.contentInset = UIEdgeInsets(top: -CGFloat(kNavBarBottom), left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table @@ -24,7 +24,7 @@ class AllTransparent: UIViewController lazy var topView:UIImageView = { let imgView = UIImageView(image: UIImage(named: "wbBg")) imgView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: IMAGE_HEIGHT) - imgView.contentMode = UIViewContentMode.scaleAspectFill + imgView.contentMode = UIView.ContentMode.scaleAspectFill imgView.clipsToBounds = true return imgView }() diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AntForestController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AntForestController.swift index 0299261..2a40de2 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AntForestController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AntForestController.swift @@ -18,14 +18,14 @@ class AntForestController: UIViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) - table.contentInset = UIEdgeInsetsMake(IMAGE_HEIGHT-CGFloat(kNavBarBottom), 0, 0, 0); + table.contentInset = UIEdgeInsets(top: IMAGE_HEIGHT-CGFloat(kNavBarBottom), left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table }() lazy var imageView:UIImageView = { let imgView = UIImageView(frame: CGRect(x: 0, y: -IMAGE_HEIGHT, width: kScreenWidth, height: IMAGE_HEIGHT)) - imgView.contentMode = UIViewContentMode.scaleAspectFill + imgView.contentMode = UIView.ContentMode.scaleAspectFill imgView.clipsToBounds = true imgView.image = UIImage(named: "mysl") return imgView diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseNavigationController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseNavigationController.swift index c3cdc12..d838d57 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseNavigationController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseNavigationController.swift @@ -20,7 +20,7 @@ extension BaseNavigationController { override func pushViewController(_ viewController: UIViewController, animated: Bool) { - if childViewControllers.count > 0 { + if children.count > 0 { viewController.hidesBottomBarWhenPushed = true } super.pushViewController(viewController, animated: animated) diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseViewController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseViewController.swift index d00029b..cfb885d 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseViewController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseViewController.swift @@ -39,7 +39,7 @@ class BaseViewController: UIViewController // 设置自定义导航栏左右按钮字体颜色 navBar.wr_setTintColor(color: .white) - if self.navigationController?.childViewControllers.count != 1 { + if self.navigationController?.children.count != 1 { navBar.wr_setLeftButton(title: "<<", titleColor: UIColor.white) } } diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/CustomNavBarController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/CustomNavBarController.swift index 2cc35e5..bebd319 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/CustomNavBarController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/CustomNavBarController.swift @@ -17,7 +17,7 @@ class CustomNavBarController: BaseViewController lazy var tableView:UITableView = { let frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height) let table:UITableView = UITableView(frame: frame, style: .plain) - table.contentInset = UIEdgeInsetsMake(0, 0, 0, 0); + table.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ImageNavController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ImageNavController.swift index 8843a5f..5d35895 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ImageNavController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ImageNavController.swift @@ -16,7 +16,7 @@ class ImageNavController: BaseViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) - table.contentInset = UIEdgeInsetsMake(0, 0, 0, 0); + table.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table @@ -24,7 +24,7 @@ class ImageNavController: BaseViewController lazy var topView:UIImageView = { let imgView = UIImageView(image: UIImage(named: "image7")) imgView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: IMAGE_HEIGHT) - imgView.contentMode = UIViewContentMode.scaleAspectFill + imgView.contentMode = UIView.ContentMode.scaleAspectFill imgView.clipsToBounds = true return imgView }() diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/MillcolorGradController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/MillcolorGradController.swift index e956dab..6a19c68 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/MillcolorGradController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/MillcolorGradController.swift @@ -16,7 +16,7 @@ class MillcolorGradController: BaseViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) - table.contentInset = UIEdgeInsetsMake(0, 0, 0, 0); + table.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table @@ -24,7 +24,7 @@ class MillcolorGradController: BaseViewController lazy var topView:UIImageView = { let imgView = UIImageView(image: UIImage(named: "image8")) imgView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: IMAGE_HEIGHT) - imgView.contentMode = UIViewContentMode.scaleAspectFill + imgView.contentMode = UIView.ContentMode.scaleAspectFill imgView.clipsToBounds = true return imgView }() diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQAppController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQAppController.swift index ac53622..3300f2a 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQAppController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQAppController.swift @@ -18,14 +18,14 @@ class QQAppController: UIViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) - table.contentInset = UIEdgeInsetsMake(IMAGE_HEIGHT-CGFloat(kNavBarBottom), 0, 0, 0); + table.contentInset = UIEdgeInsets(top: IMAGE_HEIGHT-CGFloat(kNavBarBottom), left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table }() lazy var imageView:UIImageView = { let imgView = UIImageView(frame: CGRect(x: 0, y: -IMAGE_HEIGHT, width: kScreenWidth, height: IMAGE_HEIGHT)) - imgView.contentMode = UIViewContentMode.scaleAspectFill + imgView.contentMode = UIView.ContentMode.scaleAspectFill imgView.clipsToBounds = true imgView.image = self.imageScaledToSize(image: UIImage(named: "image3")!, newSize: CGSize(width: kScreenWidth, height: IMAGE_HEIGHT+SCROLL_DOWN_LIMIT)) return imgView diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQMineController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQMineController.swift index 84c0e8d..e06d33a 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQMineController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQMineController.swift @@ -17,7 +17,7 @@ class QQMineController: UIViewController lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) table.backgroundColor = UIColor.clear - table.contentInset = UIEdgeInsetsMake(-CGFloat(kNavBarBottom), 0, 0, 0); + table.contentInset = UIEdgeInsets(top: -CGFloat(kNavBarBottom), left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQZoneController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQZoneController.swift index 78e5560..c212e08 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQZoneController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQZoneController.swift @@ -18,14 +18,14 @@ class QQZoneController: UIViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) - table.contentInset = UIEdgeInsetsMake(IMAGE_HEIGHT-CGFloat(kNavBarBottom), 0, 0, 0); + table.contentInset = UIEdgeInsets(top: IMAGE_HEIGHT-CGFloat(kNavBarBottom), left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table }() lazy var imageView:UIImageView = { let imgView = UIImageView(frame: CGRect(x: 0, y: -IMAGE_HEIGHT, width: kScreenWidth, height: IMAGE_HEIGHT)) - imgView.contentMode = UIViewContentMode.scaleAspectFill + imgView.contentMode = UIView.ContentMode.scaleAspectFill imgView.clipsToBounds = true imgView.image = self.imageScaledToSize(image: UIImage(named: "image6")!, newSize: CGSize(width: kScreenWidth, height: IMAGE_HEIGHT+SCROLL_DOWN_LIMIT)) return imgView diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SecondViewController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SecondViewController.swift index 366008d..0fea077 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SecondViewController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SecondViewController.swift @@ -15,7 +15,7 @@ class SecondViewController: UIViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) - table.contentInset = UIEdgeInsetsMake(-CGFloat(kNavBarBottom), 0, 0, 0); + table.contentInset = UIEdgeInsets(top: -CGFloat(kNavBarBottom), left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SixthViewController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SixthViewController.swift index afb67a7..03bae10 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SixthViewController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SixthViewController.swift @@ -15,7 +15,7 @@ class SixthViewController: UIViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) - table.contentInset = UIEdgeInsetsMake(-CGFloat(kNavBarBottom), 0, 0, 0); + table.contentInset = UIEdgeInsets(top: -CGFloat(kNavBarBottom), left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/WeiBoMineController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/WeiBoMineController.swift index d121f1a..6413838 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/WeiBoMineController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/WeiBoMineController.swift @@ -16,7 +16,7 @@ class WeiBoMineController: UIViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: kScreenWidth, height: self.view.bounds.height), style: .plain) - table.contentInset = UIEdgeInsetsMake(-CGFloat(kNavBarBottom), 0, 0, 0); + table.contentInset = UIEdgeInsets(top: -CGFloat(kNavBarBottom), left: 0, bottom: 0, right: 0); table.delegate = self table.dataSource = self return table @@ -60,7 +60,7 @@ class WeiBoMineController: UIViewController lazy var topView:UIImageView = { let imgView = UIImageView(image: UIImage(named: "wbBg")) imgView.frame = CGRect(x: 0, y: 0, width: kScreenWidth, height: IMAGE_HEIGHT) - imgView.contentMode = UIViewContentMode.scaleAspectFill + imgView.contentMode = UIView.ContentMode.scaleAspectFill imgView.clipsToBounds = true return imgView }() diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ZhiHuController.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ZhiHuController.swift index ffb14af..406fcf3 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ZhiHuController.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ZhiHuController.swift @@ -18,7 +18,7 @@ class ZhiHuController: UIViewController { lazy var tableView:UITableView = { let table:UITableView = UITableView(frame: CGRect.init(x: 0, y: 0, width: Int(kScreenWidth), height: Int(self.view.bounds.height)), style: .plain) - table.contentInset = UIEdgeInsetsMake(IMAGE_HEIGHT-CGFloat(kNavBarBottom), 0, 0, 0); + table.contentInset = UIEdgeInsets(top: IMAGE_HEIGHT-CGFloat(kNavBarBottom), left: 0, bottom: 0, right: 0); table.showsVerticalScrollIndicator = false table.delegate = self table.dataSource = self diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/AnimatedImageView.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/AnimatedImageView.swift similarity index 98% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/AnimatedImageView.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/AnimatedImageView.swift index df65bff..e952889 100755 --- a/WRNavigationBar_swift/Pods/Kingfisher/Sources/AnimatedImageView.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/AnimatedImageView.swift @@ -61,7 +61,7 @@ open class AnimatedImageView: UIImageView { public var needsPrescaling = true /// The animation timer's run loop mode. Default is `NSRunLoopCommonModes`. Set this property to `NSDefaultRunLoopMode` will make the animation pause during UIScrollView scrolling. - public var runLoopMode = RunLoopMode.commonModes { + public var runLoopMode = RunLoop.Mode.common { willSet { if runLoopMode == newValue { return @@ -233,7 +233,7 @@ class Animator { return frame(at: currentFrameIndex) } - var contentMode = UIViewContentMode.scaleToFill + var contentMode = UIView.ContentMode.scaleToFill private lazy var preloadQueue: DispatchQueue = { return DispatchQueue(label: "com.onevcat.Kingfisher.Animator.preloadQueue") @@ -249,7 +249,7 @@ class Animator { - returns: The animator object. */ - init(imageSource source: CGImageSource, contentMode mode: UIViewContentMode, size: CGSize, framePreloadCount count: Int) { + init(imageSource source: CGImageSource, contentMode mode: UIView.ContentMode, size: CGSize, framePreloadCount count: Int) { self.imageSource = source self.contentMode = mode self.size = size diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Box.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Box.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/Box.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Box.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/CacheSerializer.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/CacheSerializer.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/CacheSerializer.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/CacheSerializer.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Filter.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Filter.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/Filter.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Filter.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/FormatIndicatedCacheSerializer.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/FormatIndicatedCacheSerializer.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/FormatIndicatedCacheSerializer.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/FormatIndicatedCacheSerializer.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Image.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Image.swift similarity index 99% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/Image.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Image.swift index 5e0aaf4..b29039b 100755 --- a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Image.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Image.swift @@ -181,7 +181,7 @@ extension Kingfisher where Base: Image { let rep = NSBitmapImageRep(cgImage: cgimage) return rep.representation(using: .png, properties: [:]) #else - return UIImagePNGRepresentation(base) + return base.pngData() #endif } @@ -194,7 +194,7 @@ extension Kingfisher where Base: Image { let rep = NSBitmapImageRep(cgImage: cgImage) return rep.representation(using:.jpeg, properties: [.compressionFactor: compressionQuality]) #else - return UIImageJPEGRepresentation(base, compressionQuality) + return base.jpegData(compressionQuality: compressionQuality) #endif } @@ -394,7 +394,7 @@ extension Kingfisher where Base: Image { } #if os(iOS) || os(tvOS) - func resize(to size: CGSize, for contentMode: UIViewContentMode) -> Image { + func resize(to size: CGSize, for contentMode: UIView.ContentMode) -> Image { switch contentMode { case .scaleAspectFit: return resize(to: size, for: .aspectFit) diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageCache.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageCache.swift similarity index 98% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageCache.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageCache.swift index 8d445b5..5c347de 100755 --- a/WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageCache.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageCache.swift @@ -158,11 +158,11 @@ open class ImageCache { #if !os(macOS) && !os(watchOS) NotificationCenter.default.addObserver( - self, selector: #selector(clearMemoryCache), name: .UIApplicationDidReceiveMemoryWarning, object: nil) + self, selector: #selector(clearMemoryCache), name: UIApplication.didReceiveMemoryWarningNotification, object: nil) NotificationCenter.default.addObserver( - self, selector: #selector(cleanExpiredDiskCache), name: .UIApplicationWillTerminate, object: nil) + self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.willTerminateNotification, object: nil) NotificationCenter.default.addObserver( - self, selector: #selector(backgroundCleanExpiredDiskCache), name: .UIApplicationDidEnterBackground, object: nil) + self, selector: #selector(backgroundCleanExpiredDiskCache), name: UIApplication.didEnterBackgroundNotification, object: nil) #endif } @@ -535,7 +535,7 @@ open class ImageCache { func endBackgroundTask(_ task: inout UIBackgroundTaskIdentifier) { sharedApplication.endBackgroundTask(task) - task = UIBackgroundTaskInvalid + task = UIBackgroundTaskIdentifier.invalid } var backgroundTask: UIBackgroundTaskIdentifier! diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageDownloader.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageDownloader.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageDownloader.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageDownloader.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/ImagePrefetcher.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImagePrefetcher.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/ImagePrefetcher.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImagePrefetcher.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageProcessor.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageProcessor.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageProcessor.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageProcessor.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageTransition.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageTransition.swift similarity index 97% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageTransition.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageTransition.swift index 8ce42e8..3fe894a 100755 --- a/WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageTransition.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageTransition.swift @@ -79,7 +79,7 @@ public enum ImageTransition { /// Custom transition. case custom(duration: TimeInterval, - options: UIViewAnimationOptions, + options: UIView.AnimationOptions, animations: ((UIImageView, UIImage) -> Void)?, completion: ((Bool) -> Void)?) @@ -97,7 +97,7 @@ public enum ImageTransition { } } - var animationOptions: UIViewAnimationOptions { + var animationOptions: UIView.AnimationOptions { switch self { case .none: return [] case .fade(_): return .transitionCrossDissolve diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageView+Kingfisher.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageView+Kingfisher.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/ImageView+Kingfisher.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageView+Kingfisher.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Indicator.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Indicator.swift similarity index 97% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/Indicator.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Indicator.swift index 5ec5f97..2651676 100644 --- a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Indicator.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Indicator.swift @@ -133,9 +133,9 @@ class ActivityIndicator: Indicator { #if os(tvOS) let indicatorStyle = UIActivityIndicatorViewStyle.white #else - let indicatorStyle = UIActivityIndicatorViewStyle.gray + let indicatorStyle = UIActivityIndicatorView.Style.gray #endif - activityIndicatorView = UIActivityIndicatorView(activityIndicatorStyle:indicatorStyle) + activityIndicatorView = UIActivityIndicatorView(style:indicatorStyle) activityIndicatorView.autoresizingMask = [.flexibleLeftMargin, .flexibleRightMargin, .flexibleBottomMargin, .flexibleTopMargin] #endif } diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Kingfisher.h b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.h similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/Kingfisher.h rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.h diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Kingfisher.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/Kingfisher.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/KingfisherManager.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherManager.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/KingfisherManager.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherManager.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/KingfisherOptionsInfo.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherOptionsInfo.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/KingfisherOptionsInfo.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherOptionsInfo.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Placeholder.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Placeholder.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/Placeholder.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Placeholder.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/RequestModifier.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/RequestModifier.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/RequestModifier.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/RequestModifier.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/Resource.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Resource.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/Resource.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Resource.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/String+MD5.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/String+MD5.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/String+MD5.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/String+MD5.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/ThreadHelper.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ThreadHelper.swift similarity index 100% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/ThreadHelper.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ThreadHelper.swift diff --git a/WRNavigationBar_swift/Pods/Kingfisher/Sources/UIButton+Kingfisher.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/UIButton+Kingfisher.swift similarity index 97% rename from WRNavigationBar_swift/Pods/Kingfisher/Sources/UIButton+Kingfisher.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/UIButton+Kingfisher.swift index c9a5e0e..2b56423 100755 --- a/WRNavigationBar_swift/Pods/Kingfisher/Sources/UIButton+Kingfisher.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/UIButton+Kingfisher.swift @@ -52,7 +52,7 @@ extension Kingfisher where Base: UIButton { */ @discardableResult public func setImage(with resource: Resource?, - for state: UIControlState, + for state: UIControl.State, placeholder: UIImage? = nil, options: KingfisherOptionsInfo? = nil, progressBlock: DownloadProgressBlock? = nil, @@ -130,7 +130,7 @@ extension Kingfisher where Base: UIButton { */ @discardableResult public func setBackgroundImage(with resource: Resource?, - for state: UIControlState, + for state: UIControl.State, placeholder: UIImage? = nil, options: KingfisherOptionsInfo? = nil, progressBlock: DownloadProgressBlock? = nil, @@ -200,11 +200,11 @@ extension Kingfisher where Base: UIButton { - returns: Current URL for image. */ - public func webURL(for state: UIControlState) -> URL? { + public func webURL(for state: UIControl.State) -> URL? { return webURLs[NSNumber(value:state.rawValue)] as? URL } - fileprivate func setWebURL(_ url: URL?, for state: UIControlState) { + fileprivate func setWebURL(_ url: URL?, for state: UIControl.State) { webURLs[NSNumber(value:state.rawValue)] = url } @@ -243,11 +243,11 @@ extension Kingfisher where Base: UIButton { - returns: Current URL for background image. */ - public func backgroundWebURL(for state: UIControlState) -> URL? { + public func backgroundWebURL(for state: UIControl.State) -> URL? { return backgroundWebURLs[NSNumber(value:state.rawValue)] as? URL } - fileprivate func setBackgroundWebURL(_ url: URL?, for state: UIControlState) { + fileprivate func setBackgroundWebURL(_ url: URL?, for state: UIControl.State) { backgroundWebURLs[NSNumber(value:state.rawValue)] = url } diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCycleScrollView/WRCycleCell.swift b/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleCell.swift similarity index 98% rename from WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCycleScrollView/WRCycleCell.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/WRCycleCell.swift index c4e5747..49c0403 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCycleScrollView/WRCycleCell.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleCell.swift @@ -8,7 +8,6 @@ // Github地址:https://github.com/wangrui460/WRCycleScrollView import UIKit -import Kingfisher class WRCycleCell: UICollectionViewCell { @@ -108,7 +107,7 @@ class WRCycleCell: UICollectionViewCell let labelY = bounds.height - labelHeight descLabel.frame = CGRect(x: margin, y: labelY, width: labelWidth, height: labelHeight) bottomView.frame = CGRect(x: 0, y: labelY, width: imgView.bounds.width, height: labelHeight) - bringSubview(toFront: descLabel) + bringSubviewToFront(descLabel) } } } diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCycleScrollView/WRCycleScrollView.swift b/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleScrollView.swift similarity index 99% rename from WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCycleScrollView/WRCycleScrollView.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/WRCycleScrollView.swift index 47935a3..b6c99d2 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCycleScrollView/WRCycleScrollView.swift +++ b/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleScrollView.swift @@ -225,7 +225,7 @@ extension WRCycleScrollView func setupTimer() { timer = Timer(timeInterval: autoScrollInterval, target: self, selector: #selector(changeCycleCell), userInfo: nil, repeats: true) - RunLoop.main.add(timer!, forMode: .commonModes) + RunLoop.main.add(timer!, forMode: RunLoop.Mode.common) } fileprivate func changeToFirstCycleCell(animated:Bool) diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCustomNavigationBar.swift b/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCustomNavigationBar.swift deleted file mode 100644 index 5066e10..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCustomNavigationBar.swift +++ /dev/null @@ -1,301 +0,0 @@ -// -// WRCustomNavigationBar.swift -// WRNavigationBar_swift -// -// Created by itwangrui on 2017/11/25. -// Copyright © 2017年 wangrui. All rights reserved. -// - -import UIKit - -fileprivate let WRDefaultTitleSize:CGFloat = 18 -fileprivate let WRDefaultTitleColor = UIColor.black -fileprivate let WRDefaultBackgroundColor = UIColor.white -fileprivate let WRScreenWidth = UIScreen.main.bounds.size.width - - -// MARK: - Router -extension UIViewController -{ - // A页面 弹出 登录页面B - // presentedViewController: A页面 - // presentingViewController: B页面 - - func wr_toLastViewController(animated:Bool) - { - if self.navigationController != nil - { - if self.navigationController?.viewControllers.count == 1 - { - self.dismiss(animated: animated, completion: nil) - } else { - self.navigationController?.popViewController(animated: animated) - } - } - else if self.presentingViewController != nil { - self.dismiss(animated: animated, completion: nil) - } - } - - class func wr_currentViewController() -> UIViewController - { - if let rootVC = UIApplication.shared.delegate?.window??.rootViewController { - return self.wr_currentViewController(from: rootVC) - } else { - return UIViewController() - } - } - - class func wr_currentViewController(from fromVC:UIViewController) -> UIViewController - { - if fromVC.isKind(of: UINavigationController.self) { - let navigationController = fromVC as! UINavigationController - return wr_currentViewController(from: navigationController.viewControllers.last!) - } - else if fromVC.isKind(of: UITabBarController.self) { - let tabBarController = fromVC as! UITabBarController - return wr_currentViewController(from: tabBarController.selectedViewController!) - } - else if fromVC.presentedViewController != nil { - return wr_currentViewController(from:fromVC.presentingViewController!) - } - else { - return fromVC - } - } -} - - -//////////////////////////////////////////////////////////////////////////////////////////////////////////// -class WRCustomNavigationBar: UIView -{ - var onClickLeftButton:(()->())? - var onClickRightButton:(()->())? - var title:String? { - willSet { - titleLabel.isHidden = false - titleLabel.text = newValue - } - } - var titleLabelColor:UIColor? { - willSet { - titleLabel.textColor = newValue - } - } - var titleLabelFont:UIFont? { - willSet { - titleLabel.font = newValue - } - } - var barBackgroundColor:UIColor? { - willSet { - backgroundImageView.isHidden = true - backgroundView.isHidden = false - backgroundView.backgroundColor = newValue - } - } - var barBackgroundImage:UIImage? { - willSet { - backgroundView.isHidden = true - backgroundImageView.isHidden = false - backgroundImageView.image = newValue - } - } - - // fileprivate UI variable - fileprivate lazy var titleLabel:UILabel = { - let label = UILabel() - label.textColor = WRDefaultTitleColor - label.font = UIFont.systemFont(ofSize: WRDefaultTitleSize) - label.textAlignment = .center - label.isHidden = true - return label - }() - - fileprivate lazy var leftButton:UIButton = { - let button = UIButton() - button.imageView?.contentMode = .center - button.isHidden = true - button.addTarget(self, action: #selector(clickBack), for: .touchUpInside) - return button - }() - - fileprivate lazy var rightButton:UIButton = { - let button = UIButton() - button.imageView?.contentMode = .center - button.isHidden = true - button.addTarget(self, action: #selector(clickRight), for: .touchUpInside) - return button - }() - - fileprivate lazy var bottomLine:UIView = { - let view = UIView() - view.backgroundColor = UIColor(red: (218.0/255.0), green: (218.0/255.0), blue: (218.0/255.0), alpha: 1.0) - return view - }() - - fileprivate lazy var backgroundView:UIView = { - let view = UIView() - return view - }() - - fileprivate lazy var backgroundImageView:UIImageView = { - let imgView = UIImageView() - imgView.isHidden = true - return imgView - }() - - // fileprivate other variable - fileprivate static var isIphoneX:Bool { - get { - return UIScreen.main.bounds.equalTo(CGRect(x: 0, y: 0, width: 375, height: 812)) - } - } - fileprivate static var navBarBottom:Int { - get { - return isIphoneX ? 88 : 64 - } - } - - // init - class func CustomNavigationBar() -> WRCustomNavigationBar { - let frame = CGRect(x: 0, y: 0, width: WRScreenWidth, height: CGFloat(navBarBottom)) - return WRCustomNavigationBar(frame: frame) - } - override init(frame: CGRect) { - super.init(frame: frame) - setupView() - } - required init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - setupView() - } - - func setupView() - { - addSubview(backgroundView) - addSubview(backgroundImageView) - addSubview(leftButton) - addSubview(titleLabel) - addSubview(rightButton) - addSubview(bottomLine) - updateFrame() - backgroundColor = UIColor.clear - backgroundView.backgroundColor = WRDefaultBackgroundColor - } - func updateFrame() - { - let top:CGFloat = WRCustomNavigationBar.isIphoneX ? 44 : 20 - let margin:CGFloat = 0 - let buttonHeight:CGFloat = 44 - let buttonWidth:CGFloat = 44 - let titleLabelHeight:CGFloat = 44 - let titleLabelWidth:CGFloat = 180 - - backgroundView.frame = self.bounds - backgroundImageView.frame = self.bounds - leftButton.frame = CGRect(x: margin, y: top, width: buttonWidth, height: buttonHeight) - rightButton.frame = CGRect(x: WRScreenWidth-buttonWidth-margin, y: top, width: buttonWidth, height: buttonHeight) - titleLabel.frame = CGRect(x: (WRScreenWidth-titleLabelWidth)/2.0, y: top, width: titleLabelWidth, height: titleLabelHeight) - bottomLine.frame = CGRect(x: 0, y: bounds.height-0.5, width: WRScreenWidth, height: 0.5) - } -} - - -extension WRCustomNavigationBar -{ - func wr_setBottomLineHidden(hidden:Bool) { - bottomLine.isHidden = hidden - } - func wr_setBackgroundAlpha(alpha:CGFloat) { - backgroundView.alpha = alpha - backgroundImageView.alpha = alpha - bottomLine.alpha = alpha - } - func wr_setTintColor(color:UIColor) { - leftButton.setTitleColor(color, for: .normal) - rightButton.setTitleColor(color, for: .normal) - titleLabel.textColor = color - } - - // 左右按钮共有方法 - func wr_setLeftButton(normal:UIImage, highlighted:UIImage) { - wr_setLeftButton(normal: normal, highlighted: highlighted, title: nil, titleColor: nil) - } - func wr_setLeftButton(image:UIImage) { - wr_setLeftButton(normal: image, highlighted: image, title: nil, titleColor: nil) - } - func wr_setLeftButton(title:String, titleColor:UIColor) { - wr_setLeftButton(normal: nil, highlighted: nil, title: title, titleColor: titleColor) - } - - func wr_setRightButton(normal:UIImage, highlighted:UIImage) { - wr_setRightButton(normal: normal, highlighted: highlighted, title: nil, titleColor: nil) - } - func wr_setRightButton(image:UIImage) { - wr_setRightButton(normal: image, highlighted: image, title: nil, titleColor: nil) - } - func wr_setRightButton(title:String, titleColor:UIColor) { - wr_setRightButton(normal: nil, highlighted: nil, title: title, titleColor: titleColor) - } - - - // 左右按钮私有方法 - private func wr_setLeftButton(normal:UIImage?, highlighted:UIImage?, title:String?, titleColor:UIColor?) { - leftButton.isHidden = false - leftButton.setImage(normal, for: .normal) - leftButton.setImage(highlighted, for: .highlighted) - leftButton.setTitle(title, for: .normal) - leftButton.setTitleColor(titleColor, for: .normal) - } - private func wr_setRightButton(normal:UIImage?, highlighted:UIImage?, title:String?, titleColor:UIColor?) { - rightButton.isHidden = false - rightButton.setImage(normal, for: .normal) - rightButton.setImage(highlighted, for: .highlighted) - rightButton.setTitle(title, for: .normal) - rightButton.setTitleColor(titleColor, for: .normal) - } -} - - -// MARK: - 导航栏左右按钮事件 -extension WRCustomNavigationBar -{ - @objc func clickBack() { - if let onClickBack = onClickLeftButton { - onClickBack() - } else { - let currentVC = UIViewController.wr_currentViewController() - currentVC.wr_toLastViewController(animated: true) - } - } - @objc func clickRight() { - if let onClickRight = onClickRightButton { - onClickRight() - } - } -} - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRNavigationBar.swift b/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRNavigationBar.swift deleted file mode 100644 index 1322e4c..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRNavigationBar.swift +++ /dev/null @@ -1,1004 +0,0 @@ -// -// WRNavigationBar.swift -// WRNavigationBar_swift -// -// Created by wangrui on 2017/4/19. -// Copyright © 2017年 wangrui. All rights reserved. -// -// Github地址:https://github.com/wangrui460/WRNavigationBar_swift - -import UIKit - -extension UINavigationBar:WRAwakeProtocol -{ - fileprivate struct AssociatedKeys { - static var backgroundView: UIView = UIView() - static var backgroundImageView: UIImageView = UIImageView() - } - - fileprivate var backgroundView:UIView? { - get { - guard let bgView = objc_getAssociatedObject(self, &AssociatedKeys.backgroundView) as? UIView else { - return nil - } - return bgView - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.backgroundView, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - fileprivate var backgroundImageView:UIImageView? { - get { - guard let bgImageView = objc_getAssociatedObject(self, &AssociatedKeys.backgroundImageView) as? UIImageView else { - return nil - } - return bgImageView - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.backgroundImageView, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - // set navigationBar backgroundImage - fileprivate func wr_setBackgroundImage(image:UIImage) - { - backgroundView?.removeFromSuperview() - backgroundView = nil - if (backgroundImageView == nil) - { - // add a image(nil color) to _UIBarBackground make it clear - setBackgroundImage(UIImage(), for: .default) - backgroundImageView = UIImageView(frame: CGRect(x: 0, y: 0, width: Int(bounds.width), height: WRNavigationBar.navBarBottom())) - backgroundImageView?.autoresizingMask = .flexibleWidth - // _UIBarBackground is first subView for navigationBar - subviews.first?.insertSubview(backgroundImageView ?? UIImageView(), at: 0) - } - backgroundImageView?.image = image - } - - // set navigationBar barTintColor - fileprivate func wr_setBackgroundColor(color:UIColor) - { - backgroundImageView?.removeFromSuperview() - backgroundImageView = nil - if (backgroundView == nil) - { - // add a image(nil color) to _UIBarBackground make it clear - setBackgroundImage(UIImage(), for: .default) - backgroundView = UIView(frame: CGRect(x: 0, y: 0, width: Int(bounds.width), height: WRNavigationBar.navBarBottom())) - backgroundView?.autoresizingMask = .flexibleWidth - // _UIBarBackground is first subView for navigationBar - subviews.first?.insertSubview(backgroundView ?? UIView(), at: 0) - } - backgroundView?.backgroundColor = color - } - - // set _UIBarBackground alpha (_UIBarBackground subviews alpha <= _UIBarBackground alpha) - fileprivate func wr_setBackgroundAlpha(alpha:CGFloat) - { - if let barBackgroundView = subviews.first - { - if #available(iOS 11.0, *) - { // sometimes we can't change _UIBarBackground alpha - for view in barBackgroundView.subviews { - view.alpha = alpha - } - } else { - barBackgroundView.alpha = alpha - } - } - } - - // 设置导航栏所有BarButtonItem的透明度 - func wr_setBarButtonItemsAlpha(alpha:CGFloat, hasSystemBackIndicator:Bool) - { - for view in subviews - { - if (hasSystemBackIndicator == true) - { - // _UIBarBackground/_UINavigationBarBackground对应的view是系统导航栏,不需要改变其透明度 - if let _UIBarBackgroundClass = NSClassFromString("_UIBarBackground") - { - if view.isKind(of: _UIBarBackgroundClass) == false { - view.alpha = alpha - } - } - - if let _UINavigationBarBackground = NSClassFromString("_UINavigationBarBackground") - { - if view.isKind(of: _UINavigationBarBackground) == false { - view.alpha = alpha - } - } - } - else - { - // 这里如果不做判断的话,会显示 backIndicatorImage(系统返回按钮) - if let _UINavigationBarBackIndicatorViewClass = NSClassFromString("_UINavigationBarBackIndicatorView"), - view.isKind(of: _UINavigationBarBackIndicatorViewClass) == false - { - if let _UIBarBackgroundClass = NSClassFromString("_UIBarBackground") - { - if view.isKind(of: _UIBarBackgroundClass) == false { - view.alpha = alpha - } - } - - if let _UINavigationBarBackground = NSClassFromString("_UINavigationBarBackground") - { - if view.isKind(of: _UINavigationBarBackground) == false { - view.alpha = alpha - } - } - } - } - } - } - - /// 设置导航栏在垂直方向上平移多少距离 - func wr_setTranslationY(translationY:CGFloat) - { - transform = CGAffineTransform.init(translationX: 0, y: translationY) - } - - func wr_getTranslationY() -> CGFloat - { - return transform.ty - } - - // call swizzling methods active 主动调用交换方法 - private static let onceToken = UUID().uuidString - public static func wrAwake() - { - DispatchQueue.once(token: onceToken) - { - let needSwizzleSelectorArr = [ - #selector(setter: titleTextAttributes) - ] - - for selector in needSwizzleSelectorArr { - let str = ("wr_" + selector.description) - if let originalMethod = class_getInstanceMethod(self, selector), - let swizzledMethod = class_getInstanceMethod(self, Selector(str)) { - method_exchangeImplementations(originalMethod, swizzledMethod) - } - } - } - } - - //========================================================================== - // MARK: swizzling pop - //========================================================================== - @objc func wr_setTitleTextAttributes(_ newTitleTextAttributes:[String : Any]?) - { - guard var attributes = newTitleTextAttributes else { - return - } - - guard let originTitleTextAttributes = titleTextAttributes else { - wr_setTitleTextAttributes(attributes) - return - } - - var titleColor:UIColor? - for attribute in originTitleTextAttributes { - if attribute.key == NSAttributedStringKey.foregroundColor { - titleColor = attribute.value as? UIColor - break - } - } - - guard let originTitleColor = titleColor else { - wr_setTitleTextAttributes(attributes) - return - } - - if attributes[NSAttributedStringKey.foregroundColor.rawValue] == nil { - attributes.updateValue(originTitleColor, forKey: NSAttributedStringKey.foregroundColor.rawValue) - } - wr_setTitleTextAttributes(attributes) - } -} - -//========================================================================== -// MARK: - UINavigationController -//========================================================================== -extension UINavigationController: WRFatherAwakeProtocol -{ - override open var preferredStatusBarStyle: UIStatusBarStyle { - return topViewController?.statusBarStyle ?? WRNavigationBar.defaultStatusBarStyle - } - - fileprivate func setNeedsNavigationBarUpdate(backgroundImage: UIImage) - { - navigationBar.wr_setBackgroundImage(image: backgroundImage) - } - - fileprivate func setNeedsNavigationBarUpdate(barTintColor: UIColor) - { - navigationBar.wr_setBackgroundColor(color: barTintColor) - } - - fileprivate func setNeedsNavigationBarUpdate(barBackgroundAlpha: CGFloat) - { - navigationBar.wr_setBackgroundAlpha(alpha: barBackgroundAlpha) - } - - fileprivate func setNeedsNavigationBarUpdate(tintColor: UIColor) { - navigationBar.tintColor = tintColor - } - - fileprivate func setNeedsNavigationBarUpdate(hideShadowImage: Bool) - { - navigationBar.shadowImage = (hideShadowImage == true) ? UIImage() : nil - } - - fileprivate func setNeedsNavigationBarUpdate(titleColor: UIColor) - { - guard let titleTextAttributes = navigationBar.titleTextAttributes else { - navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor:titleColor] - return - } - - var newTitleTextAttributes = titleTextAttributes - newTitleTextAttributes.updateValue(titleColor, forKey: NSAttributedStringKey.foregroundColor) - navigationBar.titleTextAttributes = newTitleTextAttributes - } - - fileprivate func updateNavigationBar(fromVC: UIViewController?, toVC: UIViewController?, progress: CGFloat) - { - // change navBarBarTintColor - let fromBarTintColor = fromVC?.navBarBarTintColor ?? WRNavigationBar.defaultNavBarBarTintColor - let toBarTintColor = toVC?.navBarBarTintColor ?? WRNavigationBar.defaultNavBarBarTintColor - let newBarTintColor = WRNavigationBar.middleColor(fromColor: fromBarTintColor, toColor: toBarTintColor, percent: progress) - setNeedsNavigationBarUpdate(barTintColor: newBarTintColor) - - // change navBarTintColor - let fromTintColor = fromVC?.navBarTintColor ?? WRNavigationBar.defaultNavBarTintColor - let toTintColor = toVC?.navBarTintColor ?? WRNavigationBar.defaultNavBarTintColor - let newTintColor = WRNavigationBar.middleColor(fromColor: fromTintColor, toColor: toTintColor, percent: progress) - setNeedsNavigationBarUpdate(tintColor: newTintColor) - - // change navBarTitleColor -// let fromTitleColor = fromVC?.navBarTitleColor ?? WRNavigationBar.defaultNavBarTitleColor -// let toTitleColor = toVC?.navBarTitleColor ?? WRNavigationBar.defaultNavBarTitleColor -// let newTitleColor = WRNavigationBar.middleColor(fromColor: fromTitleColor, toColor: toTitleColor, percent: progress) -// setNeedsNavigationBarUpdate(titleColor: newTitleColor) - - // change navBar _UIBarBackground alpha - let fromBarBackgroundAlpha = fromVC?.navBarBackgroundAlpha ?? WRNavigationBar.defaultBackgroundAlpha - let toBarBackgroundAlpha = toVC?.navBarBackgroundAlpha ?? WRNavigationBar.defaultBackgroundAlpha - let newBarBackgroundAlpha = WRNavigationBar.middleAlpha(fromAlpha: fromBarBackgroundAlpha, toAlpha: toBarBackgroundAlpha, percent: progress) - setNeedsNavigationBarUpdate(barBackgroundAlpha: newBarBackgroundAlpha) - } - - // call swizzling methods active 主动调用交换方法 - private static let onceToken = UUID().uuidString - public static func fatherAwake() - { - DispatchQueue.once(token: onceToken) - { - let needSwizzleSelectorArr = [ - NSSelectorFromString("_updateInteractiveTransition:"), - #selector(popToViewController), - #selector(popToRootViewController), - #selector(pushViewController) - ] - - for selector in needSwizzleSelectorArr { - // _updateInteractiveTransition: => wr_updateInteractiveTransition: - let str = ("wr_" + selector.description).replacingOccurrences(of: "__", with: "_") - if let originalMethod = class_getInstanceMethod(self, selector), - let swizzledMethod = class_getInstanceMethod(self, Selector(str)) { - method_exchangeImplementations(originalMethod, swizzledMethod) - } - } - } - } - - //========================================================================== - // MARK: swizzling pop - //========================================================================== - struct popProperties { - fileprivate static let popDuration = 0.13 - fileprivate static var displayCount = 0 - fileprivate static var popProgress:CGFloat { - let all:CGFloat = CGFloat(60.0 * popDuration) - let current = min(all, CGFloat(displayCount)) - return current / all - } - } - - // swizzling system method: popToViewController - @objc func wr_popToViewController(_ viewController: UIViewController, animated: Bool) -> [UIViewController]? - { - setNeedsNavigationBarUpdate(titleColor: viewController.navBarTitleColor) - var displayLink:CADisplayLink? = CADisplayLink(target: self, selector: #selector(popNeedDisplay)) - // UITrackingRunLoopMode: 界面跟踪 Mode,用于 ScrollView 追踪触摸滑动,保证界面滑动时不受其他 Mode 影响 - // NSRunLoopCommonModes contains kCFRunLoopDefaultMode and UITrackingRunLoopMode - displayLink?.add(to: RunLoop.main, forMode: .commonModes) - CATransaction.setCompletionBlock { - displayLink?.invalidate() - displayLink = nil - popProperties.displayCount = 0 - } - CATransaction.setAnimationDuration(popProperties.popDuration) - CATransaction.begin() - let vcs = wr_popToViewController(viewController, animated: animated) - CATransaction.commit() - return vcs - } - - // swizzling system method: popToRootViewControllerAnimated - @objc func wr_popToRootViewControllerAnimated(_ animated: Bool) -> [UIViewController]? - { - var displayLink:CADisplayLink? = CADisplayLink(target: self, selector: #selector(popNeedDisplay)) - displayLink?.add(to: RunLoop.main, forMode: .commonModes) - CATransaction.setCompletionBlock { - displayLink?.invalidate() - displayLink = nil - popProperties.displayCount = 0 - } - CATransaction.setAnimationDuration(popProperties.popDuration) - CATransaction.begin() - let vcs = wr_popToRootViewControllerAnimated(animated) - CATransaction.commit() - return vcs; - } - - // change navigationBar barTintColor smooth before pop to current VC finished - @objc fileprivate func popNeedDisplay() - { - guard let topViewController = topViewController, - let coordinator = topViewController.transitionCoordinator else { - return - } - - popProperties.displayCount += 1 - let popProgress = popProperties.popProgress - // print("第\(popProperties.displayCount)次pop的进度:\(popProgress)") - let fromVC = coordinator.viewController(forKey: .from) - let toVC = coordinator.viewController(forKey: .to) - updateNavigationBar(fromVC: fromVC, toVC: toVC, progress: popProgress) - } - - - //========================================================================== - // MARK: swizzling push - //========================================================================== - struct pushProperties { - fileprivate static let pushDuration = 0.13 - fileprivate static var displayCount = 0 - fileprivate static var pushProgress:CGFloat { - let all:CGFloat = CGFloat(60.0 * pushDuration) - let current = min(all, CGFloat(displayCount)) - return current / all - } - } - - // swizzling system method: pushViewController - @objc func wr_pushViewController(_ viewController: UIViewController, animated: Bool) - { - var displayLink:CADisplayLink? = CADisplayLink(target: self, selector: #selector(pushNeedDisplay)) - displayLink?.add(to: RunLoop.main, forMode: .commonModes) - CATransaction.setCompletionBlock { - displayLink?.invalidate() - displayLink = nil - pushProperties.displayCount = 0 - viewController.pushToCurrentVCFinished = true - }; - CATransaction.setAnimationDuration(pushProperties.pushDuration) - CATransaction.begin() - wr_pushViewController(viewController, animated: animated) - CATransaction.commit() - } - - // change navigationBar barTintColor smooth before push to current VC finished or before pop to current VC finished - @objc fileprivate func pushNeedDisplay() - { - guard let topViewController = topViewController, - let coordinator = topViewController.transitionCoordinator else { - return - } - - pushProperties.displayCount += 1 - let pushProgress = pushProperties.pushProgress - // print("第\(pushProperties.displayCount)次push的进度:\(pushProgress)") - let fromVC = coordinator.viewController(forKey: .from) - let toVC = coordinator.viewController(forKey: .to) - updateNavigationBar(fromVC: fromVC, toVC: toVC, progress: pushProgress) - } -} - -//========================================================================== -// MARK: - deal the gesture of return -//========================================================================== -extension UINavigationController: UINavigationBarDelegate -{ - public func navigationBar(_ navigationBar: UINavigationBar, shouldPop item: UINavigationItem) -> Bool - { - if let topVC = topViewController, - let coor = topVC.transitionCoordinator, coor.initiallyInteractive { - if #available(iOS 10.0, *) { - coor.notifyWhenInteractionChanges({ (context) in - self.dealInteractionChanges(context) - }) - } else { - coor.notifyWhenInteractionEnds({ (context) in - self.dealInteractionChanges(context) - }) - } - return true - } - - let itemCount = navigationBar.items?.count ?? 0 - let n = viewControllers.count >= itemCount ? 2 : 1 - let popToVC = viewControllers[viewControllers.count - n] - - popToViewController(popToVC, animated: true) - return true - } - - // deal the gesture of return break off - private func dealInteractionChanges(_ context: UIViewControllerTransitionCoordinatorContext) - { - let animations: (UITransitionContextViewControllerKey) -> () = { - let curColor = context.viewController(forKey: $0)?.navBarBarTintColor ?? WRNavigationBar.defaultNavBarBarTintColor - let curAlpha = context.viewController(forKey: $0)?.navBarBackgroundAlpha ?? WRNavigationBar.defaultBackgroundAlpha - - self.setNeedsNavigationBarUpdate(barTintColor: curColor) - self.setNeedsNavigationBarUpdate(barBackgroundAlpha: curAlpha) - } - - // after that, cancel the gesture of return - if context.isCancelled - { - let cancelDuration: TimeInterval = context.transitionDuration * Double(context.percentComplete) - UIView.animate(withDuration: cancelDuration) { - animations(.from) - } - } - else - { - // after that, finish the gesture of return - let finishDuration: TimeInterval = context.transitionDuration * Double(1 - context.percentComplete) - UIView.animate(withDuration: finishDuration) { - animations(.to) - } - } - } - - // swizzling system method: _updateInteractiveTransition - @objc func wr_updateInteractiveTransition(_ percentComplete: CGFloat) - { - guard let topViewController = topViewController, - let coordinator = topViewController.transitionCoordinator else { - wr_updateInteractiveTransition(percentComplete) - return - } - - let fromVC = coordinator.viewController(forKey: .from) - let toVC = coordinator.viewController(forKey: .to) - updateNavigationBar(fromVC: fromVC, toVC: toVC, progress: percentComplete) - - wr_updateInteractiveTransition(percentComplete) - } -} - -//============================================================================= -// MARK: - store navigationBar barTintColor and tintColor every viewController -//============================================================================= -extension UIViewController: WRAwakeProtocol -{ - fileprivate struct AssociatedKeys - { - static var pushToCurrentVCFinished: Bool = false - static var pushToNextVCFinished:Bool = false - - static var navBarBackgroundImage: UIImage = UIImage() - - static var navBarBarTintColor: UIColor = WRNavigationBar.defaultNavBarBarTintColor - static var navBarBackgroundAlpha:CGFloat = 1.0 - static var navBarTintColor: UIColor = WRNavigationBar.defaultNavBarTintColor - static var navBarTitleColor: UIColor = WRNavigationBar.defaultNavBarTitleColor - static var statusBarStyle: UIStatusBarStyle = UIStatusBarStyle.default - static var navBarShadowImageHidden: Bool = false - - static var customNavBar: UINavigationBar = UINavigationBar() - } - - // navigationBar barTintColor can not change by currentVC before fromVC push to currentVC finished - fileprivate var pushToCurrentVCFinished:Bool { - get { - guard let isFinished = objc_getAssociatedObject(self, &AssociatedKeys.pushToCurrentVCFinished) as? Bool else { - return false - } - return isFinished - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.pushToCurrentVCFinished, newValue, .OBJC_ASSOCIATION_ASSIGN) - } - } - - // navigationBar barTintColor can not change by currentVC when currentVC push to nextVC finished - fileprivate var pushToNextVCFinished:Bool { - get { - guard let isFinished = objc_getAssociatedObject(self, &AssociatedKeys.pushToNextVCFinished) as? Bool else { - return false - } - return isFinished - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.pushToNextVCFinished, newValue, .OBJC_ASSOCIATION_ASSIGN) - } - } - - // you can set navigationBar backgroundImage - var navBarBackgroundImage: UIImage? - { - get { - guard let bgImage = objc_getAssociatedObject(self, &AssociatedKeys.navBarBackgroundImage) as? UIImage else { - return WRNavigationBar.defaultNavBarBackgroundImage - } - return bgImage - } -// set { -// if customNavBar.isKind(of: UINavigationBar.self) { -// let navBar = customNavBar as! UINavigationBar -// navBar.wr_setBackgroundImage(image: newValue!) -// } -// else { -// objc_setAssociatedObject(self, &AssociatedKeys.navBarBackgroundImage, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) -// } -// } - } - - // navigationBar barTintColor - var navBarBarTintColor: UIColor { - get { - guard let barTintColor = objc_getAssociatedObject(self, &AssociatedKeys.navBarBarTintColor) as? UIColor else { - return WRNavigationBar.defaultNavBarBarTintColor - } - return barTintColor - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.navBarBarTintColor, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - - if customNavBar.isKind(of: UINavigationBar.self) { -// let navBar = customNavBar as! UINavigationBar -// navBar.wr_setBackgroundColor(color: newValue) - } - else { - if canUpdateNavBarBarTintColorOrBackgroundAlpha == true { - navigationController?.setNeedsNavigationBarUpdate(barTintColor: newValue) - } - } - } - } - - // navigationBar _UIBarBackground alpha - var navBarBackgroundAlpha:CGFloat { - get { - guard let barBackgroundAlpha = objc_getAssociatedObject(self, &AssociatedKeys.navBarBackgroundAlpha) as? CGFloat else { - return 1.0 - } - return barBackgroundAlpha - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.navBarBackgroundAlpha, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - - if customNavBar.isKind(of: UINavigationBar.self) { -// let navBar = customNavBar as! UINavigationBar -// navBar.wr_setBackgroundAlpha(alpha: newValue) - } - else { - if canUpdateNavBarBarTintColorOrBackgroundAlpha == true { - navigationController?.setNeedsNavigationBarUpdate(barBackgroundAlpha: newValue) - } - } - } - } - private var canUpdateNavBarBarTintColorOrBackgroundAlpha:Bool { - get { - let isRootViewController = self.navigationController?.viewControllers.first == self - if (pushToCurrentVCFinished == true || isRootViewController == true) && pushToNextVCFinished == false { - return true - } else { - return false - } - } - } - - // navigationBar tintColor - var navBarTintColor: UIColor { - get { - guard let tintColor = objc_getAssociatedObject(self, &AssociatedKeys.navBarTintColor) as? UIColor else { - return WRNavigationBar.defaultNavBarTintColor - } - return tintColor - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.navBarTintColor, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - - if customNavBar.isKind(of: UINavigationBar.self) { -// let navBar = customNavBar as! UINavigationBar -// navBar.tintColor = newValue - } - else - { - if pushToNextVCFinished == false { - navigationController?.setNeedsNavigationBarUpdate(tintColor: newValue) - } - } - } - } - - // navigationBar titleColor - var navBarTitleColor: UIColor { - get { - guard let titleColor = objc_getAssociatedObject(self, &AssociatedKeys.navBarTitleColor) as? UIColor else { - return WRNavigationBar.defaultNavBarTitleColor - } - return titleColor - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.navBarTitleColor, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - - if customNavBar.isKind(of: UINavigationBar.self) { -// let navBar = customNavBar as! UINavigationBar -// navBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor:newValue] - } - else - { - if pushToNextVCFinished == false { - navigationController?.setNeedsNavigationBarUpdate(titleColor: newValue) - } - } - } - } - - // statusBarStyle - var statusBarStyle: UIStatusBarStyle { - get { - guard let style = objc_getAssociatedObject(self, &AssociatedKeys.statusBarStyle) as? UIStatusBarStyle else { - return WRNavigationBar.defaultStatusBarStyle - } - return style - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.statusBarStyle, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - setNeedsStatusBarAppearanceUpdate() - } - } - - // if you want shadowImage hidden,you can via hideShadowImage = true - var navBarShadowImageHidden:Bool { - get { - guard let isHidden = objc_getAssociatedObject(self, &AssociatedKeys.navBarShadowImageHidden) as? Bool else { - return WRNavigationBar.defaultShadowImageHidden - } - return isHidden - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.navBarShadowImageHidden, newValue, .OBJC_ASSOCIATION_ASSIGN) - navigationController?.setNeedsNavigationBarUpdate(hideShadowImage: newValue) - } - } - - // custom navigationBar - var customNavBar: UIView { - get { - guard let navBar = objc_getAssociatedObject(self, &AssociatedKeys.customNavBar) as? UINavigationBar else { - return UIView() - } - return navBar - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.customNavBar, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - // swizzling two system methods: viewWillAppear(_:) and viewWillDisappear(_:) - private static let onceToken = UUID().uuidString - @objc public static func wrAwake() - { - DispatchQueue.once(token: onceToken) - { - let needSwizzleSelectors = [ - #selector(viewWillAppear(_:)), - #selector(viewWillDisappear(_:)), - #selector(viewDidAppear(_:)) - ] - - for selector in needSwizzleSelectors - { - let newSelectorStr = "wr_" + selector.description - if let originalMethod = class_getInstanceMethod(self, selector), - let swizzledMethod = class_getInstanceMethod(self, Selector(newSelectorStr)) { - method_exchangeImplementations(originalMethod, swizzledMethod) - } - } - } - } - - @objc func wr_viewWillAppear(_ animated: Bool) - { - if canUpdateNavigationBar() == true { - pushToNextVCFinished = false - navigationController?.setNeedsNavigationBarUpdate(tintColor: navBarTintColor) - navigationController?.setNeedsNavigationBarUpdate(titleColor: navBarTitleColor) - } - wr_viewWillAppear(animated) - } - - @objc func wr_viewWillDisappear(_ animated: Bool) - { - if canUpdateNavigationBar() == true { - pushToNextVCFinished = true - } - wr_viewWillDisappear(animated) - } - - @objc func wr_viewDidAppear(_ animated: Bool) - { - - if self.navigationController?.viewControllers.first != self { - self.pushToCurrentVCFinished = true - } - if canUpdateNavigationBar() == true - { - if let navBarBgImage = navBarBackgroundImage { - navigationController?.setNeedsNavigationBarUpdate(backgroundImage: navBarBgImage) - } else { - navigationController?.setNeedsNavigationBarUpdate(barTintColor: navBarBarTintColor) - } - navigationController?.setNeedsNavigationBarUpdate(barBackgroundAlpha: navBarBackgroundAlpha) - navigationController?.setNeedsNavigationBarUpdate(tintColor: navBarTintColor) - navigationController?.setNeedsNavigationBarUpdate(titleColor: navBarTitleColor) - navigationController?.setNeedsNavigationBarUpdate(hideShadowImage: navBarShadowImageHidden) - } - wr_viewDidAppear(animated) - } - - func canUpdateNavigationBar() -> Bool - { - let viewFrame = view.frame - let maxFrame = UIScreen.main.bounds - let middleFrame = CGRect(x: 0, y: WRNavigationBar.navBarBottom(), width: WRNavigationBar.screenWidth(), height: WRNavigationBar.screenHeight()-WRNavigationBar.navBarBottom()) - let minFrame = CGRect(x: 0, y: WRNavigationBar.navBarBottom(), width: WRNavigationBar.screenWidth(), height: WRNavigationBar.screenHeight()-WRNavigationBar.navBarBottom()-WRNavigationBar.tabBarHeight()) - // 蝙蝠🦇 - let isBat = viewFrame.equalTo(maxFrame) || viewFrame.equalTo(middleFrame) || viewFrame.equalTo(minFrame) - if self.navigationController != nil && isBat == true { - return true - } else { - return false - } - } - -} - -//==================================================================================== -// MARK: - Swizzling会改变全局状态,所以用 DispatchQueue.once 来确保无论多少线程都只会被执行一次 -//==================================================================================== -extension DispatchQueue { - - private static var onceTracker = [String]() - - //Executes a block of code, associated with a unique token, only once. The code is thread safe and will only execute the code once even in the presence of multithreaded calls. - public class func once(token: String, block: () -> Void) - { // 保证被 objc_sync_enter 和 objc_sync_exit 包裹的代码可以有序同步地执行 - objc_sync_enter(self) - defer { // 作用域结束后执行defer中的代码 - objc_sync_exit(self) - } - - if onceTracker.contains(token) { - return - } - - onceTracker.append(token) - block() - } -} - - -//=========================================================================================== -// MARK: - default navigationBar barTintColor、tintColor and statusBarStyle YOU CAN CHANGE!!! -//=========================================================================================== -class WRNavigationBar -{ - fileprivate struct AssociatedKeys - { // default is system attributes - static var defNavBarBarTintColor: UIColor = UIColor.white - static var defNavBarBackgroundImage: UIImage = UIImage() - static var defNavBarTintColor: UIColor = UIColor(red: 0, green: 0.478431, blue: 1, alpha: 1.0) - static var defNavBarTitleColor: UIColor = UIColor.black - static var defStatusBarStyle: UIStatusBarStyle = UIStatusBarStyle.default - static var defShadowImageHidden: Bool = false - } - - class var defaultNavBarBarTintColor: UIColor { - get { - guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defNavBarBarTintColor) as? UIColor else { - return AssociatedKeys.defNavBarBarTintColor - } - return def - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.defNavBarBarTintColor, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - class var defaultNavBarBackgroundImage: UIImage? { - get { - guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defNavBarBackgroundImage) as? UIImage else { - return nil - } - return def - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.defNavBarBackgroundImage, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - class var defaultNavBarTintColor: UIColor { - get { - guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defNavBarTintColor) as? UIColor else { - return AssociatedKeys.defNavBarTintColor - } - return def - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.defNavBarTintColor, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - class var defaultNavBarTitleColor: UIColor { - get { - guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defNavBarTitleColor) as? UIColor else { - return AssociatedKeys.defNavBarTitleColor - } - return def - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.defNavBarTitleColor, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - class var defaultStatusBarStyle: UIStatusBarStyle { - get { - guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defStatusBarStyle) as? UIStatusBarStyle else { - return .default - } - return def - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.defStatusBarStyle, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - class var defaultShadowImageHidden: Bool { - get { - guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defShadowImageHidden) as? Bool else { - return false - } - return def - } - set { - objc_setAssociatedObject(self, &AssociatedKeys.defShadowImageHidden, newValue, .OBJC_ASSOCIATION_ASSIGN) - } - } - - class var defaultBackgroundAlpha: CGFloat { - get { - return 1.0 - } - } - - // Calculate the middle Color with translation percent - class fileprivate func middleColor(fromColor: UIColor, toColor: UIColor, percent: CGFloat) -> UIColor - { - // get current color RGBA - var fromRed: CGFloat = 0 - var fromGreen: CGFloat = 0 - var fromBlue: CGFloat = 0 - var fromAlpha: CGFloat = 0 - fromColor.getRed(&fromRed, green: &fromGreen, blue: &fromBlue, alpha: &fromAlpha) - - // get to color RGBA - var toRed: CGFloat = 0 - var toGreen: CGFloat = 0 - var toBlue: CGFloat = 0 - var toAlpha: CGFloat = 0 - toColor.getRed(&toRed, green: &toGreen, blue: &toBlue, alpha: &toAlpha) - - // calculate middle color RGBA - let newRed = fromRed + (toRed - fromRed) * percent - let newGreen = fromGreen + (toGreen - fromGreen) * percent - let newBlue = fromBlue + (toBlue - fromBlue) * percent - let newAlpha = fromAlpha + (toAlpha - fromAlpha) * percent - return UIColor(red: newRed, green: newGreen, blue: newBlue, alpha: newAlpha) - } - - // Calculate the middle alpha - class fileprivate func middleAlpha(fromAlpha: CGFloat, toAlpha: CGFloat, percent: CGFloat) -> CGFloat - { - let newAlpha = fromAlpha + (toAlpha - fromAlpha) * percent - return newAlpha - } -} - -extension WRNavigationBar -{ - class func isIphoneX() -> Bool { - return UIScreen.main.bounds.equalTo(CGRect(x: 0, y: 0, width: 375, height: 812)) - } - class func navBarBottom() -> Int { - return self.isIphoneX() ? 88 : 64; - } - class func tabBarHeight() -> Int { - return self.isIphoneX() ? 83 : 49; - } - class func screenWidth() -> Int { - return Int(UIScreen.main.bounds.size.width) - } - class func screenHeight() -> Int { - return Int(UIScreen.main.bounds.size.height) - } -} - - - - - - - - - - - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// 1. 定义 WRAwakeProtocol 协议 -public protocol WRAwakeProtocol: class { - static func wrAwake() -} -public protocol WRFatherAwakeProtocol: class -{ // 1.1 定义 WRFatherAwakeProtocol () - static func fatherAwake() -} - -class NothingToSeeHere -{ - static func harmlessFunction(){ -// let typeCount = Int(objc_getClassList(nil, 0)) -// let types = UnsafeMutablePointer.allocate(capacity: typeCount) -// let autoreleaseintTypes = AutoreleasingUnsafeMutablePointer(types) -// objc_getClassList(autoreleaseintTypes, Int32(typeCount)) //获取所有的类 -// for index in 0 ..< typeCount { -// (types[index] as? WRAwakeProtocol.Type)?.wrAwake() //如果该类实现了SelfAware协议,那么调用 awake 方法 -// (types[index] as? WRFatherAwakeProtocol.Type)?.fatherAwake() -// } -// types.deallocate(capacity: typeCount) - UINavigationBar.wrAwake() - UIViewController.wrAwake() - UINavigationController.fatherAwake() - } -} - -// 2. 让APP启动时只执行一次 harmlessFunction 方法 -extension UIApplication -{ - private static let runOnce:Void = { //使用静态属性以保证只调用一次(该属性是个方法) - NothingToSeeHere.harmlessFunction() - }() - - open override var next: UIResponder?{ //重写next属性 - UIApplication.runOnce - return super.next - } -} - -// 3. 自定义类实现 WRAwakeProtocol 协议,重写 wrAwake 方法 -// 自定义类实现 WRFatherAwakeProtocol 协议,重写 fatherAwake 方法 - diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCycleScrollView/WRProxy.swift b/WRNavigationBar_swift/WRNavigationBar_swift/WRProxy.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/WRNavigationBar/WRCycleScrollView/WRProxy.swift rename to WRNavigationBar_swift/WRNavigationBar_swift/WRProxy.swift From 21e7f7bb984569000ca9188c6df15aa60f182b83 Mon Sep 17 00:00:00 2001 From: EyreFree Date: Wed, 16 Jan 2019 13:50:17 +0800 Subject: [PATCH 2/4] Wrap with CocoaPods --- .gitignore | 58 +- .swift-version | 1 + .travis.yml | 14 + Example/Podfile | 11 + Example/Podfile.lock | 16 + .../WRNavigationBar_swift.podspec.json | 22 + Example/Pods/Manifest.lock | 16 + Example/Pods/Pods.xcodeproj/project.pbxproj | 754 ++++++++++++++ .../Info.plist | 0 ...ar_swift_Example-acknowledgements.markdown | 28 + ...onBar_swift_Example-acknowledgements.plist | 60 ++ ...Pods-WRNavigationBar_swift_Example-dummy.m | 5 + ...RNavigationBar_swift_Example-frameworks.sh | 153 +++ ...WRNavigationBar_swift_Example-resources.sh | 0 ...s-WRNavigationBar_swift_Example-umbrella.h | 16 + ...NavigationBar_swift_Example.debug.xcconfig | 11 + ...ds-WRNavigationBar_swift_Example.modulemap | 6 + ...vigationBar_swift_Example.release.xcconfig | 11 + .../Info.plist | 26 + ...nBar_swift_Tests-acknowledgements.markdown | 0 ...tionBar_swift_Tests-acknowledgements.plist | 0 .../Pods-WRNavigationBar_swift_Tests-dummy.m | 5 + ...-WRNavigationBar_swift_Tests-frameworks.sh | 0 ...s-WRNavigationBar_swift_Tests-resources.sh | 118 +++ ...ods-WRNavigationBar_swift_Tests-umbrella.h | 4 +- ...WRNavigationBar_swift_Tests.debug.xcconfig | 2 + ...Pods-WRNavigationBar_swift_Tests.modulemap | 6 + ...NavigationBar_swift_Tests.release.xcconfig | 2 + .../WRNavigationBar_swift/Info.plist | 26 + .../WRNavigationBar_swift-dummy.m | 5 + .../WRNavigationBar_swift-prefix.pch | 12 + .../WRNavigationBar_swift-umbrella.h | 16 + .../WRNavigationBar_swift.modulemap | 6 + .../WRNavigationBar_swift.xcconfig | 9 + .../Tests}/Info.plist | 2 + .../Tests/Tests.swift | 16 +- .../project.pbxproj | 672 +++++++++++++ .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../WRNavigationBar_swift-Example.xcscheme | 115 +++ .../contents.xcworkspacedata | 0 .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../AllTransparent.swift | 1 + .../AntForestController.swift | 0 .../WRNavigationBar_swift/AppDelegate.swift | 9 +- .../Base.lproj/LaunchScreen.xib | 46 + .../Base.lproj/Main.storyboard | 24 +- .../BaseNavigationController.swift | 0 .../BaseViewController.swift | 1 + .../CustomListController.swift | 0 .../CustomNavBarController.swift | 0 .../ImageNavController.swift | 0 .../AppIcon.appiconset/180wr.png | Bin .../AppIcon.appiconset/Contents.json | 0 .../AppIcon.appiconset/wr120@2x.png | Bin .../Images.xcassets}/Contents.json | 0 .../938A54DAB0905290EBBE392AE73286DC.jpg | Bin .../bottomImage.imageset/Contents.json | 0 .../image1.imageset/Contents.json | 0 .../image1.imageset/image1.jpg | Bin .../image2.imageset/Contents.json | 0 .../image2.imageset/image2.jpg | Bin .../image3.imageset/Contents.json | 0 .../DF0999B79D020D160165A612636482E9.jpg | Bin .../image4.imageset/Contents.json | 0 .../\346\244\255\345\234\206 2.png" | Bin .../image5.imageset/Contents.json | 0 .../image5.imageset/\346\210\2213.png" | Bin .../B56C24FF94B6EB94E1DD1931343B37D3.jpg | Bin .../image6.imageset/Contents.json | 0 .../image7.imageset/Contents.json | 0 .../u=2864424897,2473674229&fm=26&gp=0.jpg | Bin .../image8.imageset/Contents.json | 0 .../cad334853a19ab63f278ed8532ff8ae1.jpeg | Bin .../imageNav.imageset/Contents.json | 0 .../u=1206318416,27195661&fm=26&gp=0.jpg | Bin .../localImg10.imageset/Contents.json | 0 .../localImg10.imageset/localImg10.jpg | Bin .../Images.xcassets}/localImg6.imageset/6.jpg | Bin .../localImg6.imageset/Contents.json | 0 .../localImg7.imageset/Contents.json | 0 .../localImg7.imageset/localImg7.jpg | Bin .../localImg8.imageset/Contents.json | 0 .../localImg8.imageset/localImg8.jpg | Bin .../localImg9.imageset/Contents.json | 0 .../localImg9.imageset/localImg9.jpg | Bin .../millcolorGrad.imageset/Contents.json | 0 .../millcolorGrad.imageset/millcolorGrad.png | Bin .../mine.imageset/Contents.json | 0 .../mine.imageset/mine@2x.png | Bin .../mine.imageset/mine@3x.png | Bin .../mineHighlight.imageset/Contents.json | 0 .../mineHighlight@2x.png | Bin .../mineHighlight@3x.png | Bin .../mysl.imageset/Contents.json | 0 .../mysl.imageset/WechatIMG52.png | Bin .../test.imageset/Contents.json | 0 .../Images.xcassets}/test.imageset/test.jpg | Bin .../wbBg.imageset/Contents.json | 0 .../Images.xcassets}/wbBg.imageset/wbBG.png | Bin .../WRNavigationBar_swift/Info.plist | 16 +- .../MillcolorGradController.swift | 0 .../MoveListController.swift | 0 .../NormalListController.swift | 1 + .../QQAppController.swift | 0 .../QQMineController.swift | 1 + .../QQZoneController.swift | 1 + .../SecondViewController.swift | 1 + .../SixthViewController.swift | 1 + .../ViewController.swift | 24 + .../WeiBoMineController.swift | 0 .../ZhiHuController.swift | 19 +- WRNavigationBar_swift.podspec | 20 + WRNavigationBar_swift/Assets/.gitkeep | 0 WRNavigationBar_swift/Classes/.gitkeep | 0 .../Classes}/WRCustomNavigationBar.swift | 32 +- .../Classes}/WRNavigationBar.swift | 36 +- WRNavigationBar_swift/Podfile | 11 - WRNavigationBar_swift/Podfile.lock | 3 - WRNavigationBar_swift/Pods/Manifest.lock | 3 - .../Pods/Pods.xcodeproj/project.pbxproj | 384 ------- .../Pods-WRNavigationBar_swift-dummy.m | 5 - .../Pods-WRNavigationBar_swift.modulemap | 6 - .../project.pbxproj | 728 -------------- .../Base.lproj/LaunchScreen.storyboard | 27 - .../Kingfisher/AnimatedImageView.swift | 373 ------- .../Kingfisher/Box.swift | 16 - .../Kingfisher/CacheSerializer.swift | 87 -- .../Kingfisher/Filter.swift | 137 --- .../FormatIndicatedCacheSerializer.swift | 96 -- .../Kingfisher/Image.swift | 943 ------------------ .../Kingfisher/ImageCache.swift | 722 -------------- .../Kingfisher/ImageDownloader.swift | 606 ----------- .../Kingfisher/ImagePrefetcher.swift | 264 ----- .../Kingfisher/ImageProcessor.swift | 586 ----------- .../Kingfisher/ImageTransition.swift | 128 --- .../Kingfisher/ImageView+Kingfisher.swift | 258 ----- .../Kingfisher/Indicator.swift | 199 ---- .../Kingfisher/Kingfisher.h | 37 - .../Kingfisher/Kingfisher.swift | 73 -- .../Kingfisher/KingfisherManager.swift | 266 ----- .../Kingfisher/KingfisherOptionsInfo.swift | 335 ------- .../Kingfisher/Placeholder.swift | 82 -- .../Kingfisher/RequestModifier.swift | 53 - .../Kingfisher/Resource.swift | 74 -- .../Kingfisher/String+MD5.swift | 292 ------ .../Kingfisher/ThreadHelper.swift | 40 - .../Kingfisher/UIButton+Kingfisher.swift | 274 ----- .../WRNavigationBar_swift/WRCycleCell.swift | 149 --- .../WRCycleScrollView.swift | 376 ------- .../WRNavigationBar_swift/WRProxy.swift | 52 - _Pods.xcodeproj | 1 + 152 files changed, 2329 insertions(+), 7814 deletions(-) create mode 100755 .swift-version create mode 100644 .travis.yml create mode 100644 Example/Podfile create mode 100644 Example/Podfile.lock create mode 100644 Example/Pods/Local Podspecs/WRNavigationBar_swift.podspec.json create mode 100644 Example/Pods/Manifest.lock create mode 100644 Example/Pods/Pods.xcodeproj/project.pbxproj rename {WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift => Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example}/Info.plist (100%) create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-acknowledgements.markdown create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-acknowledgements.plist create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-dummy.m create mode 100755 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-frameworks.sh rename WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-resources.sh => Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-resources.sh (100%) create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-umbrella.h create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.debug.xcconfig create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.release.xcconfig create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Info.plist rename WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.markdown => Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-acknowledgements.markdown (100%) rename WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.plist => Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-acknowledgements.plist (100%) create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-dummy.m rename WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-frameworks.sh => Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-frameworks.sh (100%) create mode 100755 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-resources.sh rename WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-umbrella.h => Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-umbrella.h (73%) rename WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig => Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.debug.xcconfig (59%) create mode 100644 Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.modulemap rename WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig => Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.release.xcconfig (59%) create mode 100644 Example/Pods/Target Support Files/WRNavigationBar_swift/Info.plist create mode 100644 Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-dummy.m create mode 100644 Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-prefix.pch create mode 100644 Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-umbrella.h create mode 100644 Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.modulemap create mode 100644 Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.xcconfig rename {WRNavigationBar_swift/WRNavigationBar_swiftTests => Example/Tests}/Info.plist (92%) rename WRNavigationBar_swift/WRNavigationBar_swiftTests/WRNavigationBar_swiftTests.swift => Example/Tests/Tests.swift (63%) create mode 100644 Example/WRNavigationBar_swift.xcodeproj/project.pbxproj rename {WRNavigationBar_swift => Example}/WRNavigationBar_swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {WRNavigationBar_swift => Example}/WRNavigationBar_swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) create mode 100644 Example/WRNavigationBar_swift.xcodeproj/xcshareddata/xcschemes/WRNavigationBar_swift-Example.xcscheme rename {WRNavigationBar_swift => Example}/WRNavigationBar_swift.xcworkspace/contents.xcworkspacedata (100%) rename {WRNavigationBar_swift => Example}/WRNavigationBar_swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/AllTransparent.swift (99%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/AntForestController.swift (100%) rename {WRNavigationBar_swift => Example}/WRNavigationBar_swift/AppDelegate.swift (98%) create mode 100644 Example/WRNavigationBar_swift/Base.lproj/LaunchScreen.xib rename {WRNavigationBar_swift => Example}/WRNavigationBar_swift/Base.lproj/Main.storyboard (57%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/BaseNavigationController.swift (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/BaseViewController.swift (97%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/CustomListController.swift (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/CustomNavBarController.swift (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/ImageNavController.swift (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/AppIcon.appiconset/180wr.png (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/AppIcon.appiconset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/AppIcon.appiconset/wr120@2x.png (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/bottomImage.imageset/938A54DAB0905290EBBE392AE73286DC.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/bottomImage.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image1.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image1.imageset/image1.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image2.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image2.imageset/image2.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image3.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image3.imageset/DF0999B79D020D160165A612636482E9.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image4.imageset/Contents.json (100%) rename "WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image4.imageset/\346\244\255\345\234\206 2.png" => "Example/WRNavigationBar_swift/Images.xcassets/image4.imageset/\346\244\255\345\234\206 2.png" (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image5.imageset/Contents.json (100%) rename "WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image5.imageset/\346\210\2213.png" => "Example/WRNavigationBar_swift/Images.xcassets/image5.imageset/\346\210\2213.png" (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image6.imageset/B56C24FF94B6EB94E1DD1931343B37D3.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image6.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image7.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image7.imageset/u=2864424897,2473674229&fm=26&gp=0.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image8.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/image8.imageset/cad334853a19ab63f278ed8532ff8ae1.jpeg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/imageNav.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/imageNav.imageset/u=1206318416,27195661&fm=26&gp=0.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg10.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg10.imageset/localImg10.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg6.imageset/6.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg6.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg7.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg7.imageset/localImg7.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg8.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg8.imageset/localImg8.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg9.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/localImg9.imageset/localImg9.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/millcolorGrad.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/millcolorGrad.imageset/millcolorGrad.png (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/mine.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/mine.imageset/mine@2x.png (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/mine.imageset/mine@3x.png (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/mineHighlight.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/mineHighlight.imageset/mineHighlight@2x.png (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/mineHighlight.imageset/mineHighlight@3x.png (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/mysl.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/mysl.imageset/WechatIMG52.png (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/test.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/test.imageset/test.jpg (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/wbBg.imageset/Contents.json (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets => Example/WRNavigationBar_swift/Images.xcassets}/wbBg.imageset/wbBG.png (100%) rename {WRNavigationBar_swift => Example}/WRNavigationBar_swift/Info.plist (71%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/MillcolorGradController.swift (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/MoveListController.swift (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/NormalListController.swift (99%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/QQAppController.swift (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/QQMineController.swift (99%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/QQZoneController.swift (99%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/SecondViewController.swift (99%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/SixthViewController.swift (99%) create mode 100644 Example/WRNavigationBar_swift/ViewController.swift rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/WeiBoMineController.swift (100%) rename {WRNavigationBar_swift/WRNavigationBar_swift/Demos => Example/WRNavigationBar_swift}/ZhiHuController.swift (90%) create mode 100644 WRNavigationBar_swift.podspec create mode 100644 WRNavigationBar_swift/Assets/.gitkeep create mode 100644 WRNavigationBar_swift/Classes/.gitkeep rename {WRNavigationBar => WRNavigationBar_swift/Classes}/WRCustomNavigationBar.swift (92%) rename {WRNavigationBar => WRNavigationBar_swift/Classes}/WRNavigationBar.swift (97%) delete mode 100644 WRNavigationBar_swift/Podfile delete mode 100644 WRNavigationBar_swift/Podfile.lock delete mode 100644 WRNavigationBar_swift/Pods/Manifest.lock delete mode 100644 WRNavigationBar_swift/Pods/Pods.xcodeproj/project.pbxproj delete mode 100644 WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-dummy.m delete mode 100644 WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.modulemap delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.pbxproj delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Base.lproj/LaunchScreen.storyboard delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/AnimatedImageView.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Box.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/CacheSerializer.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Filter.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/FormatIndicatedCacheSerializer.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Image.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageCache.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageDownloader.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImagePrefetcher.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageProcessor.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageTransition.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageView+Kingfisher.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Indicator.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.h delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherManager.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherOptionsInfo.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Placeholder.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/RequestModifier.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Resource.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/String+MD5.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ThreadHelper.swift delete mode 100755 WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/UIButton+Kingfisher.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/WRCycleCell.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/WRCycleScrollView.swift delete mode 100644 WRNavigationBar_swift/WRNavigationBar_swift/WRProxy.swift create mode 120000 _Pods.xcodeproj diff --git a/.gitignore b/.gitignore index 2c22487..93c86d3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,8 @@ -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore +# OS X +.DS_Store -## Build generated +# Xcode build/ -DerivedData/ - -## Various settings *.pbxuser !default.pbxuser *.mode1v3 @@ -16,50 +12,26 @@ DerivedData/ *.perspectivev3 !default.perspectivev3 xcuserdata/ - -## Other +*.xccheckout +profile *.moved-aside -*.xcuserstate - -## Obj-C/Swift specific +DerivedData *.hmap *.ipa -*.dSYM.zip -*.dSYM - -## Playgrounds -timeline.xctimeline -playground.xcworkspace -# Swift Package Manager -# -# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. -# Packages/ -.build/ +# Bundler +.bundle -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ - -# Carthage -# # Add this line if you want to avoid checking in source code from Carthage dependencies. # Carthage/Checkouts Carthage/Build -# fastlane +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# +# Note: if you ignore the Pods directory, make sure to uncomment +# `pod install` in .travis.yml # -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output +# Pods/ diff --git a/.swift-version b/.swift-version new file mode 100755 index 0000000..bf77d54 --- /dev/null +++ b/.swift-version @@ -0,0 +1 @@ +4.2 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8d49fa0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +# references: +# * https://www.objc.io/issues/6-build-tools/travis-ci/ +# * https://github.com/supermarin/xcpretty#usage + +osx_image: xcode7.3 +language: objective-c +# cache: cocoapods +# podfile: Example/Podfile +# before_install: +# - gem install cocoapods # Since Travis is not always on latest version +# - pod install --project-directory=Example +script: +- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/WRNavigationBar_swift.xcworkspace -scheme WRNavigationBar_swift-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty +- pod lib lint diff --git a/Example/Podfile b/Example/Podfile new file mode 100644 index 0000000..51fd9bc --- /dev/null +++ b/Example/Podfile @@ -0,0 +1,11 @@ +use_frameworks! + +target 'WRNavigationBar_swift_Example' do + pod 'WRNavigationBar_swift', :path => '../' + + target 'WRNavigationBar_swift_Tests' do + inherit! :search_paths + + + end +end diff --git a/Example/Podfile.lock b/Example/Podfile.lock new file mode 100644 index 0000000..52101f7 --- /dev/null +++ b/Example/Podfile.lock @@ -0,0 +1,16 @@ +PODS: + - WRNavigationBar_swift (0.1.0) + +DEPENDENCIES: + - WRNavigationBar_swift (from `../`) + +EXTERNAL SOURCES: + WRNavigationBar_swift: + :path: "../" + +SPEC CHECKSUMS: + WRNavigationBar_swift: ec68cfa6759f2f2a3815412ddca899ec2c7b17b5 + +PODFILE CHECKSUM: b9c9e56e2153483fea864e416272c298196d42b7 + +COCOAPODS: 1.5.3 diff --git a/Example/Pods/Local Podspecs/WRNavigationBar_swift.podspec.json b/Example/Pods/Local Podspecs/WRNavigationBar_swift.podspec.json new file mode 100644 index 0000000..e9def69 --- /dev/null +++ b/Example/Pods/Local Podspecs/WRNavigationBar_swift.podspec.json @@ -0,0 +1,22 @@ +{ + "name": "WRNavigationBar_swift", + "version": "0.1.0", + "summary": "A useful custom navigation bar.", + "description": "WRNavigationBar which allows you to change NavigationBar's appearance dynamically.", + "homepage": "https://github.com/wangrui460/WRNavigationBar_swift", + "license": { + "type": "MIT", + "file": "LICENSE" + }, + "authors": { + "EyreFree": "eyrefree@eyrefree.org" + }, + "source": { + "git": "https://github.com/wangrui460/WRNavigationBar_swift.git", + "tag": "0.1.0" + }, + "platforms": { + "ios": "8.0" + }, + "source_files": "WRNavigationBar_swift/Classes/**/*" +} diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock new file mode 100644 index 0000000..52101f7 --- /dev/null +++ b/Example/Pods/Manifest.lock @@ -0,0 +1,16 @@ +PODS: + - WRNavigationBar_swift (0.1.0) + +DEPENDENCIES: + - WRNavigationBar_swift (from `../`) + +EXTERNAL SOURCES: + WRNavigationBar_swift: + :path: "../" + +SPEC CHECKSUMS: + WRNavigationBar_swift: ec68cfa6759f2f2a3815412ddca899ec2c7b17b5 + +PODFILE CHECKSUM: b9c9e56e2153483fea864e416272c298196d42b7 + +COCOAPODS: 1.5.3 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj new file mode 100644 index 0000000..9dc5df5 --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -0,0 +1,754 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0719EF6C5821D05F964CF2B2886F61B9 /* WRNavigationBar_swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5B1651DFC89238E5BC2C4A7D5796A9 /* WRNavigationBar_swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2844F6E28FE4D57E3E12897FFFB6BF93 /* Pods-WRNavigationBar_swift_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A220E8B831374E686270E39EFAA40192 /* Pods-WRNavigationBar_swift_Example-dummy.m */; }; + 2FD18F6E20CF2F088D400AA6790E3EF7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; + 4E339A32B29342BC4C0B01368DD02B84 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; + 6C6D80692A099EF54E27A092F951EB67 /* WRNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C59F1AB4AF8927F5A57EED90D422956 /* WRNavigationBar.swift */; }; + 81C5E3581239A25680037B1E661FE3AB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; + 88568CBFB534E3ECD7A4E1112CCFFDA4 /* Pods-WRNavigationBar_swift_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6CF5616DD1A65C22BB3F8C9052B30ACF /* Pods-WRNavigationBar_swift_Tests-dummy.m */; }; + A51E01C223029C9F69B26884179AF5E3 /* Pods-WRNavigationBar_swift_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B76D2BC188CA1D9EB9B467575F2E5CE /* Pods-WRNavigationBar_swift_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AC6F7EBA157905D0CF3228305BAC0CC8 /* WRCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A08B83DBB3F1D2E9B30B96F89B36904 /* WRCustomNavigationBar.swift */; }; + D571EE690E7BC00590D902E16A7C70E5 /* Pods-WRNavigationBar_swift_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 57E8B3CEC6C8E348762C233480A3587F /* Pods-WRNavigationBar_swift_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F22078882962C9D69FF0FABDC2C9586E /* WRNavigationBar_swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CA3E0C4DD52127AF023AB8C108CB0E6E /* WRNavigationBar_swift-dummy.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 8C54A5C9B38A7E81E6D2E86732CDF129 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 777F87E1EDAD2F539CEA49C05C1567F8; + remoteInfo = WRNavigationBar_swift; + }; + AC6B40231439C1E1DE2783CE68A9F569 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + proxyType = 1; + remoteGlobalIDString = F9ADB9B615006C52C138AD76187E5EAF; + remoteInfo = "Pods-WRNavigationBar_swift_Example"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 0A08B83DBB3F1D2E9B30B96F89B36904 /* WRCustomNavigationBar.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WRCustomNavigationBar.swift; path = WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift; sourceTree = ""; }; + 0D3DB10569732B78633829B822307682 /* WRNavigationBar_swift.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = WRNavigationBar_swift.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 16572CDCCBC5AB6707970E0EF747A271 /* Pods-WRNavigationBar_swift_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-WRNavigationBar_swift_Tests-acknowledgements.markdown"; sourceTree = ""; }; + 172EDA0E4F87FE67AA7CE0C95B12AC5A /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + 27FB9858EC497F84631FA0DB3FEFB4A0 /* Pods-WRNavigationBar_swift_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift_Example.debug.xcconfig"; sourceTree = ""; }; + 29EE0D68839AEB48D831BB5EF7B0ACD2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 2B76D2BC188CA1D9EB9B467575F2E5CE /* Pods-WRNavigationBar_swift_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-WRNavigationBar_swift_Tests-umbrella.h"; sourceTree = ""; }; + 2C5B1651DFC89238E5BC2C4A7D5796A9 /* WRNavigationBar_swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "WRNavigationBar_swift-umbrella.h"; sourceTree = ""; }; + 4F3013C5430F3006B8B1AB126FF6B50D /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + 508CA396CD0CDEB1126200868837EAD1 /* Pods-WRNavigationBar_swift_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-WRNavigationBar_swift_Example.modulemap"; sourceTree = ""; }; + 57E8B3CEC6C8E348762C233480A3587F /* Pods-WRNavigationBar_swift_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-WRNavigationBar_swift_Example-umbrella.h"; sourceTree = ""; }; + 5D6BC060D6923D654AC232DC8D36C473 /* Pods_WRNavigationBar_swift_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_WRNavigationBar_swift_Tests.framework; path = "Pods-WRNavigationBar_swift_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 68711F33FA5271BB868BA7F5C5F6D2ED /* Pods-WRNavigationBar_swift_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift_Tests-frameworks.sh"; sourceTree = ""; }; + 68BCE43926B6E3C7C38AE96123877E6F /* Pods-WRNavigationBar_swift_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-WRNavigationBar_swift_Tests.modulemap"; sourceTree = ""; }; + 6CF5616DD1A65C22BB3F8C9052B30ACF /* Pods-WRNavigationBar_swift_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-WRNavigationBar_swift_Tests-dummy.m"; sourceTree = ""; }; + 72395276AB45FD1C5482D6324B434874 /* Pods-WRNavigationBar_swift_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-WRNavigationBar_swift_Tests-acknowledgements.plist"; sourceTree = ""; }; + 799F174B17C6FAB94002034E24A7F0EE /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7CB07908E5460AED31C1C988AC9C48CA /* Pods-WRNavigationBar_swift_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift_Tests-resources.sh"; sourceTree = ""; }; + 84AB3F23C408005D7530E66217941E8F /* Pods-WRNavigationBar_swift_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-WRNavigationBar_swift_Example-acknowledgements.markdown"; sourceTree = ""; }; + 8C59F1AB4AF8927F5A57EED90D422956 /* WRNavigationBar.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = WRNavigationBar.swift; path = WRNavigationBar_swift/Classes/WRNavigationBar.swift; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + A220E8B831374E686270E39EFAA40192 /* Pods-WRNavigationBar_swift_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-WRNavigationBar_swift_Example-dummy.m"; sourceTree = ""; }; + A6ADD00F39D2345F9ED6AFE00AD2754D /* Pods-WRNavigationBar_swift_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-WRNavigationBar_swift_Example-acknowledgements.plist"; sourceTree = ""; }; + A910EFE6F17AED68F486FF1F1F7EE26A /* Pods-WRNavigationBar_swift_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift_Example.release.xcconfig"; sourceTree = ""; }; + AA27BDDDD9B4C4B45D6607EBA6D9D1AF /* Pods-WRNavigationBar_swift_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift_Tests.debug.xcconfig"; sourceTree = ""; }; + B45CB8D4E36A91FD20D745DC09B18794 /* WRNavigationBar_swift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = WRNavigationBar_swift.xcconfig; sourceTree = ""; }; + BF32BEF5D26D5880904EB6F3D0B7BB92 /* WRNavigationBar_swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = WRNavigationBar_swift.modulemap; sourceTree = ""; }; + C08A11C2C34A949A6425C92602564FC0 /* Pods_WRNavigationBar_swift_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_WRNavigationBar_swift_Example.framework; path = "Pods-WRNavigationBar_swift_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + CA3E0C4DD52127AF023AB8C108CB0E6E /* WRNavigationBar_swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "WRNavigationBar_swift-dummy.m"; sourceTree = ""; }; + CC9BB5740219F22AF360CA93A9D6F00C /* WRNavigationBar_swift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "WRNavigationBar_swift-prefix.pch"; sourceTree = ""; }; + CD9D66E58AF7978C20D8AC84ACE81FCB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D40F8C0BBD58E88B6B2B8F09B0AA1DD6 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift_Tests.release.xcconfig"; sourceTree = ""; }; + D5B9CD2CF1929DDAE3428882BBE38D33 /* Pods-WRNavigationBar_swift_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift_Example-frameworks.sh"; sourceTree = ""; }; + D942504DD0BE6A07B10A1621BB03DEEC /* Pods-WRNavigationBar_swift_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift_Example-resources.sh"; sourceTree = ""; }; + F34BEA3B2FF78CB4EA1ABCBAD8672164 /* WRNavigationBar_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = WRNavigationBar_swift.framework; path = WRNavigationBar_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 18522BD4FD73472CE435796384A7AA70 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 4E339A32B29342BC4C0B01368DD02B84 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 1AF4ACEC31080A1183417526DD7EAD79 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 81C5E3581239A25680037B1E661FE3AB /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + FD048BA2B4000F5FB64ACAD45796D03C /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2FD18F6E20CF2F088D400AA6790E3EF7 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0A1967CF87B66B313A0F0FC5CBFD2E96 /* Pods-WRNavigationBar_swift_Example */ = { + isa = PBXGroup; + children = ( + 29EE0D68839AEB48D831BB5EF7B0ACD2 /* Info.plist */, + 508CA396CD0CDEB1126200868837EAD1 /* Pods-WRNavigationBar_swift_Example.modulemap */, + 84AB3F23C408005D7530E66217941E8F /* Pods-WRNavigationBar_swift_Example-acknowledgements.markdown */, + A6ADD00F39D2345F9ED6AFE00AD2754D /* Pods-WRNavigationBar_swift_Example-acknowledgements.plist */, + A220E8B831374E686270E39EFAA40192 /* Pods-WRNavigationBar_swift_Example-dummy.m */, + D5B9CD2CF1929DDAE3428882BBE38D33 /* Pods-WRNavigationBar_swift_Example-frameworks.sh */, + D942504DD0BE6A07B10A1621BB03DEEC /* Pods-WRNavigationBar_swift_Example-resources.sh */, + 57E8B3CEC6C8E348762C233480A3587F /* Pods-WRNavigationBar_swift_Example-umbrella.h */, + 27FB9858EC497F84631FA0DB3FEFB4A0 /* Pods-WRNavigationBar_swift_Example.debug.xcconfig */, + A910EFE6F17AED68F486FF1F1F7EE26A /* Pods-WRNavigationBar_swift_Example.release.xcconfig */, + ); + name = "Pods-WRNavigationBar_swift_Example"; + path = "Target Support Files/Pods-WRNavigationBar_swift_Example"; + sourceTree = ""; + }; + 1FE312CA59A3E5EEBD0CCF3C3D58EA3A /* Pod */ = { + isa = PBXGroup; + children = ( + 4F3013C5430F3006B8B1AB126FF6B50D /* LICENSE */, + 172EDA0E4F87FE67AA7CE0C95B12AC5A /* README.md */, + 0D3DB10569732B78633829B822307682 /* WRNavigationBar_swift.podspec */, + ); + name = Pod; + sourceTree = ""; + }; + 3E092CC42832524A27915C9F96830956 /* Products */ = { + isa = PBXGroup; + children = ( + C08A11C2C34A949A6425C92602564FC0 /* Pods_WRNavigationBar_swift_Example.framework */, + 5D6BC060D6923D654AC232DC8D36C473 /* Pods_WRNavigationBar_swift_Tests.framework */, + F34BEA3B2FF78CB4EA1ABCBAD8672164 /* WRNavigationBar_swift.framework */, + ); + name = Products; + sourceTree = ""; + }; + 485E4E620821677066507495826A2F5D /* WRNavigationBar_swift */ = { + isa = PBXGroup; + children = ( + 0A08B83DBB3F1D2E9B30B96F89B36904 /* WRCustomNavigationBar.swift */, + 8C59F1AB4AF8927F5A57EED90D422956 /* WRNavigationBar.swift */, + 1FE312CA59A3E5EEBD0CCF3C3D58EA3A /* Pod */, + BDE0BE668F000EDAFF6B0BFB35275729 /* Support Files */, + ); + name = WRNavigationBar_swift; + path = ../..; + sourceTree = ""; + }; + 69954B5A8F9BC776E4FAFEA373E98C39 /* Development Pods */ = { + isa = PBXGroup; + children = ( + 485E4E620821677066507495826A2F5D /* WRNavigationBar_swift */, + ); + name = "Development Pods"; + sourceTree = ""; + }; + 726A1E7173BB33543E5FC7D95196B242 /* Targets Support Files */ = { + isa = PBXGroup; + children = ( + 0A1967CF87B66B313A0F0FC5CBFD2E96 /* Pods-WRNavigationBar_swift_Example */, + D6691E126CA8ED9D62913EB4BCD4ACE2 /* Pods-WRNavigationBar_swift_Tests */, + ); + name = "Targets Support Files"; + sourceTree = ""; + }; + 7DB346D0F39D3F0E887471402A8071AB = { + isa = PBXGroup; + children = ( + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, + 69954B5A8F9BC776E4FAFEA373E98C39 /* Development Pods */, + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, + 3E092CC42832524A27915C9F96830956 /* Products */, + 726A1E7173BB33543E5FC7D95196B242 /* Targets Support Files */, + ); + sourceTree = ""; + }; + BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + isa = PBXGroup; + children = ( + D35AF013A5F0BAD4F32504907A52519E /* iOS */, + ); + name = Frameworks; + sourceTree = ""; + }; + BDE0BE668F000EDAFF6B0BFB35275729 /* Support Files */ = { + isa = PBXGroup; + children = ( + 799F174B17C6FAB94002034E24A7F0EE /* Info.plist */, + BF32BEF5D26D5880904EB6F3D0B7BB92 /* WRNavigationBar_swift.modulemap */, + B45CB8D4E36A91FD20D745DC09B18794 /* WRNavigationBar_swift.xcconfig */, + CA3E0C4DD52127AF023AB8C108CB0E6E /* WRNavigationBar_swift-dummy.m */, + CC9BB5740219F22AF360CA93A9D6F00C /* WRNavigationBar_swift-prefix.pch */, + 2C5B1651DFC89238E5BC2C4A7D5796A9 /* WRNavigationBar_swift-umbrella.h */, + ); + name = "Support Files"; + path = "Example/Pods/Target Support Files/WRNavigationBar_swift"; + sourceTree = ""; + }; + D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { + isa = PBXGroup; + children = ( + 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; + D6691E126CA8ED9D62913EB4BCD4ACE2 /* Pods-WRNavigationBar_swift_Tests */ = { + isa = PBXGroup; + children = ( + CD9D66E58AF7978C20D8AC84ACE81FCB /* Info.plist */, + 68BCE43926B6E3C7C38AE96123877E6F /* Pods-WRNavigationBar_swift_Tests.modulemap */, + 16572CDCCBC5AB6707970E0EF747A271 /* Pods-WRNavigationBar_swift_Tests-acknowledgements.markdown */, + 72395276AB45FD1C5482D6324B434874 /* Pods-WRNavigationBar_swift_Tests-acknowledgements.plist */, + 6CF5616DD1A65C22BB3F8C9052B30ACF /* Pods-WRNavigationBar_swift_Tests-dummy.m */, + 68711F33FA5271BB868BA7F5C5F6D2ED /* Pods-WRNavigationBar_swift_Tests-frameworks.sh */, + 7CB07908E5460AED31C1C988AC9C48CA /* Pods-WRNavigationBar_swift_Tests-resources.sh */, + 2B76D2BC188CA1D9EB9B467575F2E5CE /* Pods-WRNavigationBar_swift_Tests-umbrella.h */, + AA27BDDDD9B4C4B45D6607EBA6D9D1AF /* Pods-WRNavigationBar_swift_Tests.debug.xcconfig */, + D40F8C0BBD58E88B6B2B8F09B0AA1DD6 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */, + ); + name = "Pods-WRNavigationBar_swift_Tests"; + path = "Target Support Files/Pods-WRNavigationBar_swift_Tests"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 44000D3C5074C1378B89D1721EEC5849 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D571EE690E7BC00590D902E16A7C70E5 /* Pods-WRNavigationBar_swift_Example-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D5B6D70CE20A76E0731274EBFA6081F8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + A51E01C223029C9F69B26884179AF5E3 /* Pods-WRNavigationBar_swift_Tests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + E0698C8FB7E5CC37973FF2B22B869C31 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 0719EF6C5821D05F964CF2B2886F61B9 /* WRNavigationBar_swift-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 777F87E1EDAD2F539CEA49C05C1567F8 /* WRNavigationBar_swift */ = { + isa = PBXNativeTarget; + buildConfigurationList = E6A96FDEF93EA23E002E980B577E71DB /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift" */; + buildPhases = ( + 7DFC3E71E4364B5B9DA43423B4382CA4 /* Sources */, + 1AF4ACEC31080A1183417526DD7EAD79 /* Frameworks */, + E0698C8FB7E5CC37973FF2B22B869C31 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = WRNavigationBar_swift; + productName = WRNavigationBar_swift; + productReference = F34BEA3B2FF78CB4EA1ABCBAD8672164 /* WRNavigationBar_swift.framework */; + productType = "com.apple.product-type.framework"; + }; + 8E85EDDB0A657AAAE8EF85FB6F22D8AE /* Pods-WRNavigationBar_swift_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = FB9F8C72C32CB8A084D563ECA3ACCD9C /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Tests" */; + buildPhases = ( + 119F38F8774BFDC0455C2C2B2DAF75FE /* Sources */, + FD048BA2B4000F5FB64ACAD45796D03C /* Frameworks */, + D5B6D70CE20A76E0731274EBFA6081F8 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 0216709A9DBB036A38700C87C96A4EA1 /* PBXTargetDependency */, + ); + name = "Pods-WRNavigationBar_swift_Tests"; + productName = "Pods-WRNavigationBar_swift_Tests"; + productReference = 5D6BC060D6923D654AC232DC8D36C473 /* Pods_WRNavigationBar_swift_Tests.framework */; + productType = "com.apple.product-type.framework"; + }; + F9ADB9B615006C52C138AD76187E5EAF /* Pods-WRNavigationBar_swift_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = C2F96B402B6E1167483FA91D8148066B /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Example" */; + buildPhases = ( + 8B547BD0A0D069F8C3B8537AE2958FCA /* Sources */, + 18522BD4FD73472CE435796384A7AA70 /* Frameworks */, + 44000D3C5074C1378B89D1721EEC5849 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + 5702C38EC04A58EA36C1651AEB76929D /* PBXTargetDependency */, + ); + name = "Pods-WRNavigationBar_swift_Example"; + productName = "Pods-WRNavigationBar_swift_Example"; + productReference = C08A11C2C34A949A6425C92602564FC0 /* Pods_WRNavigationBar_swift_Example.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; + }; + buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 7DB346D0F39D3F0E887471402A8071AB; + productRefGroup = 3E092CC42832524A27915C9F96830956 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + F9ADB9B615006C52C138AD76187E5EAF /* Pods-WRNavigationBar_swift_Example */, + 8E85EDDB0A657AAAE8EF85FB6F22D8AE /* Pods-WRNavigationBar_swift_Tests */, + 777F87E1EDAD2F539CEA49C05C1567F8 /* WRNavigationBar_swift */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXSourcesBuildPhase section */ + 119F38F8774BFDC0455C2C2B2DAF75FE /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 88568CBFB534E3ECD7A4E1112CCFFDA4 /* Pods-WRNavigationBar_swift_Tests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 7DFC3E71E4364B5B9DA43423B4382CA4 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + AC6F7EBA157905D0CF3228305BAC0CC8 /* WRCustomNavigationBar.swift in Sources */, + 6C6D80692A099EF54E27A092F951EB67 /* WRNavigationBar.swift in Sources */, + F22078882962C9D69FF0FABDC2C9586E /* WRNavigationBar_swift-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8B547BD0A0D069F8C3B8537AE2958FCA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2844F6E28FE4D57E3E12897FFFB6BF93 /* Pods-WRNavigationBar_swift_Example-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 0216709A9DBB036A38700C87C96A4EA1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "Pods-WRNavigationBar_swift_Example"; + target = F9ADB9B615006C52C138AD76187E5EAF /* Pods-WRNavigationBar_swift_Example */; + targetProxy = AC6B40231439C1E1DE2783CE68A9F569 /* PBXContainerItemProxy */; + }; + 5702C38EC04A58EA36C1651AEB76929D /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = WRNavigationBar_swift; + target = 777F87E1EDAD2F539CEA49C05C1567F8 /* WRNavigationBar_swift */; + targetProxy = 8C54A5C9B38A7E81E6D2E86732CDF129 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 05797DAF083C477FDAB03052DC0D3ED9 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B45CB8D4E36A91FD20D745DC09B18794 /* WRNavigationBar_swift.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/WRNavigationBar_swift/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.modulemap"; + PRODUCT_MODULE_NAME = WRNavigationBar_swift; + PRODUCT_NAME = WRNavigationBar_swift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 125B85936036B33F3CF531E8C0334A23 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B45CB8D4E36A91FD20D745DC09B18794 /* WRNavigationBar_swift.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/WRNavigationBar_swift/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.modulemap"; + PRODUCT_MODULE_NAME = WRNavigationBar_swift; + PRODUCT_NAME = WRNavigationBar_swift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 1C620BB134BA5B4556C6A6ABAC2A2252 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 27FB9858EC497F84631FA0DB3FEFB4A0 /* Pods-WRNavigationBar_swift_Example.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 4CA2EB678B9E6D1C3ABC1B535B548B10 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A910EFE6F17AED68F486FF1F1F7EE26A /* Pods-WRNavigationBar_swift_Example.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 528C9B31BDE312E97240A31093C37E2E /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D40F8C0BBD58E88B6B2B8F09B0AA1DD6 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 8B33C5230DE4A9DFA6D8F46505DD7AF7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + B42B54097A876E8A982CBF5DAA91B1AB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_ALLOWED = NO; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_RELEASE=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + EABD53A18E3950E15ED50B9175D43E95 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = AA27BDDDD9B4C4B45D6607EBA6D9D1AF /* Pods-WRNavigationBar_swift_Tests.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8B33C5230DE4A9DFA6D8F46505DD7AF7 /* Debug */, + B42B54097A876E8A982CBF5DAA91B1AB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C2F96B402B6E1167483FA91D8148066B /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1C620BB134BA5B4556C6A6ABAC2A2252 /* Debug */, + 4CA2EB678B9E6D1C3ABC1B535B548B10 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + E6A96FDEF93EA23E002E980B577E71DB /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 05797DAF083C477FDAB03052DC0D3ED9 /* Debug */, + 125B85936036B33F3CF531E8C0334A23 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + FB9F8C72C32CB8A084D563ECA3ACCD9C /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EABD53A18E3950E15ED50B9175D43E95 /* Debug */, + 528C9B31BDE312E97240A31093C37E2E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; +} diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Info.plist b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Info.plist similarity index 100% rename from WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Info.plist rename to Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Info.plist diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-acknowledgements.markdown new file mode 100644 index 0000000..fdbff7c --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-acknowledgements.markdown @@ -0,0 +1,28 @@ +# Acknowledgements +This application makes use of the following third party libraries: + +## WRNavigationBar_swift + +MIT License + +Copyright (c) 2017 + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. + +Generated by CocoaPods - https://cocoapods.org diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-acknowledgements.plist new file mode 100644 index 0000000..5e6ee02 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-acknowledgements.plist @@ -0,0 +1,60 @@ + + + + + PreferenceSpecifiers + + + FooterText + This application makes use of the following third party libraries: + Title + Acknowledgements + Type + PSGroupSpecifier + + + FooterText + MIT License + +Copyright (c) 2017 + +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: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +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. + + License + MIT + Title + WRNavigationBar_swift + Type + PSGroupSpecifier + + + FooterText + Generated by CocoaPods - https://cocoapods.org + Title + + Type + PSGroupSpecifier + + + StringsTable + Acknowledgements + Title + Acknowledgements + + diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-dummy.m b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-dummy.m new file mode 100644 index 0000000..855b3ce --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_WRNavigationBar_swift_Example : NSObject +@end +@implementation PodsDummy_Pods_WRNavigationBar_swift_Example +@end diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-frameworks.sh new file mode 100755 index 0000000..6500eff --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-frameworks.sh @@ -0,0 +1,153 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" +SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" + +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework +install_framework() +{ + if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then + local source="${BUILT_PRODUCTS_DIR}/$1" + elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then + local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" + elif [ -r "$1" ]; then + local source="$1" + fi + + local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + + if [ -L "${source}" ]; then + echo "Symlinked..." + source="$(readlink "${source}")" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + + local basename + basename="$(basename -s .framework "$1")" + binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then + binary="${destination}/${basename}" + fi + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then + strip_invalid_archs "$binary" + fi + + # Resign the code if required by the build settings to avoid unstable apps + code_sign_if_enabled "${destination}/$(basename "$1")" + + # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. + if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then + local swift_runtime_libs + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + for lib in $swift_runtime_libs; do + echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" + rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" + code_sign_if_enabled "${destination}/${lib}" + done + fi +} + +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identitiy + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} + +# Strip invalid architectures +strip_invalid_archs() { + binary="$1" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi + stripped="" + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then + # Strip non-valid architectures in-place + lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + stripped="$stripped $arch" + fi + done + if [[ "$stripped" ]]; then + echo "Stripped $binary of architectures:$stripped" + fi + STRIP_BINARY_RETVAL=1 +} + + +if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/WRNavigationBar_swift/WRNavigationBar_swift.framework" +fi +if [[ "$CONFIGURATION" == "Release" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/WRNavigationBar_swift/WRNavigationBar_swift.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait +fi diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-resources.sh b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-resources.sh similarity index 100% rename from WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-resources.sh rename to Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-resources.sh diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-umbrella.h new file mode 100644 index 0000000..89f0b2c --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double Pods_WRNavigationBar_swift_ExampleVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_WRNavigationBar_swift_ExampleVersionString[]; + diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.debug.xcconfig new file mode 100644 index 0000000..59695fb --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.debug.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/WRNavigationBar_swift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/WRNavigationBar_swift/WRNavigationBar_swift.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "WRNavigationBar_swift" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap new file mode 100644 index 0000000..9791e17 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap @@ -0,0 +1,6 @@ +framework module Pods_WRNavigationBar_swift_Example { + umbrella header "Pods-WRNavigationBar_swift_Example-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.release.xcconfig new file mode 100644 index 0000000..59695fb --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.release.xcconfig @@ -0,0 +1,11 @@ +ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/WRNavigationBar_swift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/WRNavigationBar_swift/WRNavigationBar_swift.framework/Headers" +OTHER_LDFLAGS = $(inherited) -framework "WRNavigationBar_swift" +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. +PODS_ROOT = ${SRCROOT}/Pods diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Info.plist b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-acknowledgements.markdown similarity index 100% rename from WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.markdown rename to Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-acknowledgements.markdown diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-acknowledgements.plist similarity index 100% rename from WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-acknowledgements.plist rename to Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-acknowledgements.plist diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-dummy.m b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-dummy.m new file mode 100644 index 0000000..8ab27b5 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_Pods_WRNavigationBar_swift_Tests : NSObject +@end +@implementation PodsDummy_Pods_WRNavigationBar_swift_Tests +@end diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-frameworks.sh b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-frameworks.sh similarity index 100% rename from WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-frameworks.sh rename to Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-frameworks.sh diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-resources.sh b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-resources.sh new file mode 100755 index 0000000..345301f --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-resources.sh @@ -0,0 +1,118 @@ +#!/bin/sh +set -e +set -u +set -o pipefail + +if [ -z ${UNLOCALIZED_RESOURCES_FOLDER_PATH+x} ]; then + # If UNLOCALIZED_RESOURCES_FOLDER_PATH is not set, then there's nowhere for us to copy + # resources to, so exit 0 (signalling the script phase was successful). + exit 0 +fi + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + +RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt +> "$RESOURCES_TO_COPY" + +XCASSET_FILES=() + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +case "${TARGETED_DEVICE_FAMILY:-}" in + 1,2) + TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" + ;; + 1) + TARGET_DEVICE_ARGS="--target-device iphone" + ;; + 2) + TARGET_DEVICE_ARGS="--target-device ipad" + ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; + *) + TARGET_DEVICE_ARGS="--target-device mac" + ;; +esac + +install_resource() +{ + if [[ "$1" = /* ]] ; then + RESOURCE_PATH="$1" + else + RESOURCE_PATH="${PODS_ROOT}/$1" + fi + if [[ ! -e "$RESOURCE_PATH" ]] ; then + cat << EOM +error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. +EOM + exit 1 + fi + case $RESOURCE_PATH in + *.storyboard) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.xib) + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true + ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} + ;; + *.framework) + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + ;; + *.xcdatamodel) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" + ;; + *.xcdatamodeld) + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true + xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" + ;; + *.xcmappingmodel) + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true + xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" + ;; + *.xcassets) + ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" + XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") + ;; + *) + echo "$RESOURCE_PATH" || true + echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" + ;; + esac +} + +mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then + mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" +fi +rm -f "$RESOURCES_TO_COPY" + +if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "${XCASSET_FILES:-}" ] +then + # Find all other xcassets (this unfortunately includes those of path pods and other targets). + OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) + while read line; do + if [[ $line != "${PODS_ROOT}*" ]]; then + XCASSET_FILES+=("$line") + fi + done <<<"$OTHER_XCASSETS" + + if [ -z ${ASSETCATALOG_COMPILER_APPICON_NAME+x} ]; then + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" + else + printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" --app-icon "${ASSETCATALOG_COMPILER_APPICON_NAME}" --output-partial-info-plist "${TARGET_TEMP_DIR}/assetcatalog_generated_info_cocoapods.plist" + fi +fi diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-umbrella.h b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-umbrella.h similarity index 73% rename from WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-umbrella.h rename to Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-umbrella.h index 6e22a7e..1ae0226 100644 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-umbrella.h +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests-umbrella.h @@ -11,6 +11,6 @@ #endif -FOUNDATION_EXPORT double Pods_WRNavigationBar_swiftVersionNumber; -FOUNDATION_EXPORT const unsigned char Pods_WRNavigationBar_swiftVersionString[]; +FOUNDATION_EXPORT double Pods_WRNavigationBar_swift_TestsVersionNumber; +FOUNDATION_EXPORT const unsigned char Pods_WRNavigationBar_swift_TestsVersionString[]; diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.debug.xcconfig similarity index 59% rename from WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig rename to Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.debug.xcconfig index 566aa02..8787a67 100644 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.debug.xcconfig @@ -1,5 +1,7 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/WRNavigationBar_swift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/WRNavigationBar_swift/WRNavigationBar_swift.framework/Headers" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.modulemap b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.modulemap new file mode 100644 index 0000000..40f3ab7 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.modulemap @@ -0,0 +1,6 @@ +framework module Pods_WRNavigationBar_swift_Tests { + umbrella header "Pods-WRNavigationBar_swift_Tests-umbrella.h" + + export * + module * { export * } +} diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.release.xcconfig similarity index 59% rename from WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig rename to Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.release.xcconfig index 566aa02..8787a67 100644 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.release.xcconfig @@ -1,5 +1,7 @@ +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/WRNavigationBar_swift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/WRNavigationBar_swift/WRNavigationBar_swift.framework/Headers" PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_PODFILE_DIR_PATH = ${SRCROOT}/. diff --git a/Example/Pods/Target Support Files/WRNavigationBar_swift/Info.plist b/Example/Pods/Target Support Files/WRNavigationBar_swift/Info.plist new file mode 100644 index 0000000..161a9d3 --- /dev/null +++ b/Example/Pods/Target Support Files/WRNavigationBar_swift/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 0.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-dummy.m b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-dummy.m new file mode 100644 index 0000000..8143361 --- /dev/null +++ b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_WRNavigationBar_swift : NSObject +@end +@implementation PodsDummy_WRNavigationBar_swift +@end diff --git a/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-prefix.pch b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-prefix.pch @@ -0,0 +1,12 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + diff --git a/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-umbrella.h b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-umbrella.h new file mode 100644 index 0000000..cde05c7 --- /dev/null +++ b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double WRNavigationBar_swiftVersionNumber; +FOUNDATION_EXPORT const unsigned char WRNavigationBar_swiftVersionString[]; + diff --git a/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.modulemap b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.modulemap new file mode 100644 index 0000000..03b3365 --- /dev/null +++ b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.modulemap @@ -0,0 +1,6 @@ +framework module WRNavigationBar_swift { + umbrella header "WRNavigationBar_swift-umbrella.h" + + export * + module * { export * } +} diff --git a/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.xcconfig b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.xcconfig new file mode 100644 index 0000000..efe5ca9 --- /dev/null +++ b/Example/Pods/Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.xcconfig @@ -0,0 +1,9 @@ +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/WRNavigationBar_swift +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES diff --git a/WRNavigationBar_swift/WRNavigationBar_swiftTests/Info.plist b/Example/Tests/Info.plist similarity index 92% rename from WRNavigationBar_swift/WRNavigationBar_swiftTests/Info.plist rename to Example/Tests/Info.plist index 6c6c23c..ba72822 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swiftTests/Info.plist +++ b/Example/Tests/Info.plist @@ -16,6 +16,8 @@ BNDL CFBundleShortVersionString 1.0 + CFBundleSignature + ???? CFBundleVersion 1 diff --git a/WRNavigationBar_swift/WRNavigationBar_swiftTests/WRNavigationBar_swiftTests.swift b/Example/Tests/Tests.swift similarity index 63% rename from WRNavigationBar_swift/WRNavigationBar_swiftTests/WRNavigationBar_swiftTests.swift rename to Example/Tests/Tests.swift index ceff76b..01b05a7 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swiftTests/WRNavigationBar_swiftTests.swift +++ b/Example/Tests/Tests.swift @@ -1,15 +1,7 @@ -// -// WRNavigationBar_swiftTests.swift -// WRNavigationBar_swiftTests -// -// Created by wangrui on 2017/4/19. -// Copyright © 2017年 wangrui. All rights reserved. -// - import XCTest -@testable import WRNavigationBar_swift +import WRNavigationBar_swift -class WRNavigationBar_swiftTests: XCTestCase { +class Tests: XCTestCase { override func setUp() { super.setUp() @@ -23,12 +15,12 @@ class WRNavigationBar_swiftTests: XCTestCase { func testExample() { // This is an example of a functional test case. - // Use XCTAssert and related functions to verify your tests produce the correct results. + XCTAssert(true, "Pass") } func testPerformanceExample() { // This is an example of a performance test case. - self.measure { + self.measure() { // Put the code you want to measure the time of here. } } diff --git a/Example/WRNavigationBar_swift.xcodeproj/project.pbxproj b/Example/WRNavigationBar_swift.xcodeproj/project.pbxproj new file mode 100644 index 0000000..d919c2b --- /dev/null +++ b/Example/WRNavigationBar_swift.xcodeproj/project.pbxproj @@ -0,0 +1,672 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 12CE362021EEEB1400F43FC1 /* BaseNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE361F21EEEB1400F43FC1 /* BaseNavigationController.swift */; }; + 12CE362C21EEEBB500F43FC1 /* NormalListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE362421EEEBB400F43FC1 /* NormalListController.swift */; }; + 12CE362D21EEEBB500F43FC1 /* WeiBoMineController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE362521EEEBB400F43FC1 /* WeiBoMineController.swift */; }; + 12CE362E21EEEBB500F43FC1 /* ZhiHuController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE362621EEEBB400F43FC1 /* ZhiHuController.swift */; }; + 12CE362F21EEEBB500F43FC1 /* AllTransparent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE362721EEEBB400F43FC1 /* AllTransparent.swift */; }; + 12CE363021EEEBB500F43FC1 /* QQMineController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE362821EEEBB400F43FC1 /* QQMineController.swift */; }; + 12CE363121EEEBB500F43FC1 /* AntForestController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE362921EEEBB400F43FC1 /* AntForestController.swift */; }; + 12CE363221EEEBB500F43FC1 /* QQAppController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE362A21EEEBB500F43FC1 /* QQAppController.swift */; }; + 12CE363321EEEBB500F43FC1 /* QQZoneController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE362B21EEEBB500F43FC1 /* QQZoneController.swift */; }; + 12CE363921EEEBD300F43FC1 /* ImageNavController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE363421EEEBD300F43FC1 /* ImageNavController.swift */; }; + 12CE363A21EEEBD300F43FC1 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE363521EEEBD300F43FC1 /* BaseViewController.swift */; }; + 12CE363B21EEEBD300F43FC1 /* CustomNavBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE363621EEEBD300F43FC1 /* CustomNavBarController.swift */; }; + 12CE363C21EEEBD300F43FC1 /* CustomListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE363721EEEBD300F43FC1 /* CustomListController.swift */; }; + 12CE363D21EEEBD300F43FC1 /* MillcolorGradController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE363821EEEBD300F43FC1 /* MillcolorGradController.swift */; }; + 12CE364121EEEBE900F43FC1 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE363E21EEEBE900F43FC1 /* SecondViewController.swift */; }; + 12CE364221EEEBE900F43FC1 /* SixthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE363F21EEEBE900F43FC1 /* SixthViewController.swift */; }; + 12CE364321EEEBE900F43FC1 /* MoveListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE364021EEEBE900F43FC1 /* MoveListController.swift */; }; + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; + 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; + 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; + 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; + B406E88B434D03FDA92542DD /* Pods_WRNavigationBar_swift_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E04A31239948BC169A0C854F /* Pods_WRNavigationBar_swift_Example.framework */; }; + B99D551A00A182B8E8DF553E /* Pods_WRNavigationBar_swift_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 674BDFB6759A869CA78AA223 /* Pods_WRNavigationBar_swift_Tests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 607FACC81AFB9204008FA782 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 607FACCF1AFB9204008FA782; + remoteInfo = WRNavigationBar_swift; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 12CE361F21EEEB1400F43FC1 /* BaseNavigationController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseNavigationController.swift; sourceTree = ""; }; + 12CE362421EEEBB400F43FC1 /* NormalListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NormalListController.swift; sourceTree = ""; }; + 12CE362521EEEBB400F43FC1 /* WeiBoMineController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WeiBoMineController.swift; sourceTree = ""; }; + 12CE362621EEEBB400F43FC1 /* ZhiHuController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZhiHuController.swift; sourceTree = ""; }; + 12CE362721EEEBB400F43FC1 /* AllTransparent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AllTransparent.swift; sourceTree = ""; }; + 12CE362821EEEBB400F43FC1 /* QQMineController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QQMineController.swift; sourceTree = ""; }; + 12CE362921EEEBB400F43FC1 /* AntForestController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AntForestController.swift; sourceTree = ""; }; + 12CE362A21EEEBB500F43FC1 /* QQAppController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QQAppController.swift; sourceTree = ""; }; + 12CE362B21EEEBB500F43FC1 /* QQZoneController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QQZoneController.swift; sourceTree = ""; }; + 12CE363421EEEBD300F43FC1 /* ImageNavController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageNavController.swift; sourceTree = ""; }; + 12CE363521EEEBD300F43FC1 /* BaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; + 12CE363621EEEBD300F43FC1 /* CustomNavBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomNavBarController.swift; sourceTree = ""; }; + 12CE363721EEEBD300F43FC1 /* CustomListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomListController.swift; sourceTree = ""; }; + 12CE363821EEEBD300F43FC1 /* MillcolorGradController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MillcolorGradController.swift; sourceTree = ""; }; + 12CE363E21EEEBE900F43FC1 /* SecondViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; + 12CE363F21EEEBE900F43FC1 /* SixthViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SixthViewController.swift; sourceTree = ""; }; + 12CE364021EEEBE900F43FC1 /* MoveListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoveListController.swift; sourceTree = ""; }; + 13E408BC4F5E083E46BB13C3 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; + 1CE6177B91612B092B9820D6 /* Pods-WRNavigationBar_swift_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.release.xcconfig"; sourceTree = ""; }; + 243A7BB5A0E9B7114C709179 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; + 3C739D7B7E47049E273E27D6 /* Pods-WRNavigationBar_swift_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.debug.xcconfig"; sourceTree = ""; }; + 607FACD01AFB9204008FA782 /* WRNavigationBar_swift_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WRNavigationBar_swift_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 607FACE51AFB9204008FA782 /* WRNavigationBar_swift_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WRNavigationBar_swift_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; + 674BDFB6759A869CA78AA223 /* Pods_WRNavigationBar_swift_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WRNavigationBar_swift_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 8A798F447A512F554761A078 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.release.xcconfig"; sourceTree = ""; }; + 95AD45F4B1519FF22CE4A582 /* Pods-WRNavigationBar_swift_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.debug.xcconfig"; sourceTree = ""; }; + B0BBA55420B4316A4E7F8CC6 /* WRNavigationBar_swift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = WRNavigationBar_swift.podspec; path = ../WRNavigationBar_swift.podspec; sourceTree = ""; }; + E04A31239948BC169A0C854F /* Pods_WRNavigationBar_swift_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WRNavigationBar_swift_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 607FACCD1AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B406E88B434D03FDA92542DD /* Pods_WRNavigationBar_swift_Example.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE21AFB9204008FA782 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + B99D551A00A182B8E8DF553E /* Pods_WRNavigationBar_swift_Tests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 12CE362121EEEB6C00F43FC1 /* Normal */ = { + isa = PBXGroup; + children = ( + 12CE362721EEEBB400F43FC1 /* AllTransparent.swift */, + 12CE362921EEEBB400F43FC1 /* AntForestController.swift */, + 12CE362421EEEBB400F43FC1 /* NormalListController.swift */, + 12CE362A21EEEBB500F43FC1 /* QQAppController.swift */, + 12CE362821EEEBB400F43FC1 /* QQMineController.swift */, + 12CE362B21EEEBB500F43FC1 /* QQZoneController.swift */, + 12CE362521EEEBB400F43FC1 /* WeiBoMineController.swift */, + 12CE362621EEEBB400F43FC1 /* ZhiHuController.swift */, + ); + name = Normal; + sourceTree = ""; + }; + 12CE362221EEEB7200F43FC1 /* Custom */ = { + isa = PBXGroup; + children = ( + 12CE363521EEEBD300F43FC1 /* BaseViewController.swift */, + 12CE363721EEEBD300F43FC1 /* CustomListController.swift */, + 12CE363621EEEBD300F43FC1 /* CustomNavBarController.swift */, + 12CE363421EEEBD300F43FC1 /* ImageNavController.swift */, + 12CE363821EEEBD300F43FC1 /* MillcolorGradController.swift */, + ); + name = Custom; + sourceTree = ""; + }; + 12CE362321EEEB7A00F43FC1 /* Move */ = { + isa = PBXGroup; + children = ( + 12CE364021EEEBE900F43FC1 /* MoveListController.swift */, + 12CE363E21EEEBE900F43FC1 /* SecondViewController.swift */, + 12CE363F21EEEBE900F43FC1 /* SixthViewController.swift */, + ); + name = Move; + sourceTree = ""; + }; + 5509A3A32E1AC179314F5323 /* Frameworks */ = { + isa = PBXGroup; + children = ( + E04A31239948BC169A0C854F /* Pods_WRNavigationBar_swift_Example.framework */, + 674BDFB6759A869CA78AA223 /* Pods_WRNavigationBar_swift_Tests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 607FACC71AFB9204008FA782 = { + isa = PBXGroup; + children = ( + 607FACF51AFB993E008FA782 /* Podspec Metadata */, + 607FACD21AFB9204008FA782 /* Example for WRNavigationBar_swift */, + 607FACE81AFB9204008FA782 /* Tests */, + 607FACD11AFB9204008FA782 /* Products */, + B75287A99791E3F78365CDC0 /* Pods */, + 5509A3A32E1AC179314F5323 /* Frameworks */, + ); + sourceTree = ""; + }; + 607FACD11AFB9204008FA782 /* Products */ = { + isa = PBXGroup; + children = ( + 607FACD01AFB9204008FA782 /* WRNavigationBar_swift_Example.app */, + 607FACE51AFB9204008FA782 /* WRNavigationBar_swift_Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 607FACD21AFB9204008FA782 /* Example for WRNavigationBar_swift */ = { + isa = PBXGroup; + children = ( + 607FACD51AFB9204008FA782 /* AppDelegate.swift */, + 12CE361F21EEEB1400F43FC1 /* BaseNavigationController.swift */, + 12CE362121EEEB6C00F43FC1 /* Normal */, + 12CE362221EEEB7200F43FC1 /* Custom */, + 12CE362321EEEB7A00F43FC1 /* Move */, + 607FACD71AFB9204008FA782 /* ViewController.swift */, + 607FACD91AFB9204008FA782 /* Main.storyboard */, + 607FACDC1AFB9204008FA782 /* Images.xcassets */, + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, + 607FACD31AFB9204008FA782 /* Supporting Files */, + ); + name = "Example for WRNavigationBar_swift"; + path = WRNavigationBar_swift; + sourceTree = ""; + }; + 607FACD31AFB9204008FA782 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 607FACD41AFB9204008FA782 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 607FACE81AFB9204008FA782 /* Tests */ = { + isa = PBXGroup; + children = ( + 607FACEB1AFB9204008FA782 /* Tests.swift */, + 607FACE91AFB9204008FA782 /* Supporting Files */, + ); + path = Tests; + sourceTree = ""; + }; + 607FACE91AFB9204008FA782 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 607FACEA1AFB9204008FA782 /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { + isa = PBXGroup; + children = ( + B0BBA55420B4316A4E7F8CC6 /* WRNavigationBar_swift.podspec */, + 13E408BC4F5E083E46BB13C3 /* README.md */, + 243A7BB5A0E9B7114C709179 /* LICENSE */, + ); + name = "Podspec Metadata"; + sourceTree = ""; + }; + B75287A99791E3F78365CDC0 /* Pods */ = { + isa = PBXGroup; + children = ( + 3C739D7B7E47049E273E27D6 /* Pods-WRNavigationBar_swift_Example.debug.xcconfig */, + 1CE6177B91612B092B9820D6 /* Pods-WRNavigationBar_swift_Example.release.xcconfig */, + 95AD45F4B1519FF22CE4A582 /* Pods-WRNavigationBar_swift_Tests.debug.xcconfig */, + 8A798F447A512F554761A078 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 607FACCF1AFB9204008FA782 /* WRNavigationBar_swift_Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift_Example" */; + buildPhases = ( + C28CE8BE5801E9ACCE0B4193 /* [CP] Check Pods Manifest.lock */, + 607FACCC1AFB9204008FA782 /* Sources */, + 607FACCD1AFB9204008FA782 /* Frameworks */, + 607FACCE1AFB9204008FA782 /* Resources */, + D710A271E31469B56CCD31B8 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = WRNavigationBar_swift_Example; + productName = WRNavigationBar_swift; + productReference = 607FACD01AFB9204008FA782 /* WRNavigationBar_swift_Example.app */; + productType = "com.apple.product-type.application"; + }; + 607FACE41AFB9204008FA782 /* WRNavigationBar_swift_Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift_Tests" */; + buildPhases = ( + B52675C9517FFA7CAFA894A8 /* [CP] Check Pods Manifest.lock */, + 607FACE11AFB9204008FA782 /* Sources */, + 607FACE21AFB9204008FA782 /* Frameworks */, + 607FACE31AFB9204008FA782 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 607FACE71AFB9204008FA782 /* PBXTargetDependency */, + ); + name = WRNavigationBar_swift_Tests; + productName = Tests; + productReference = 607FACE51AFB9204008FA782 /* WRNavigationBar_swift_Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 607FACC81AFB9204008FA782 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0830; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = CocoaPods; + TargetAttributes = { + 607FACCF1AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + DevelopmentTeam = P3X2725LYY; + LastSwiftMigration = 0900; + }; + 607FACE41AFB9204008FA782 = { + CreatedOnToolsVersion = 6.3.1; + DevelopmentTeam = P3X2725LYY; + LastSwiftMigration = 0900; + TestTargetID = 607FACCF1AFB9204008FA782; + }; + }; + }; + buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "WRNavigationBar_swift" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 607FACC71AFB9204008FA782; + productRefGroup = 607FACD11AFB9204008FA782 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 607FACCF1AFB9204008FA782 /* WRNavigationBar_swift_Example */, + 607FACE41AFB9204008FA782 /* WRNavigationBar_swift_Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 607FACCE1AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, + 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, + 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE31AFB9204008FA782 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + B52675C9517FFA7CAFA894A8 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-WRNavigationBar_swift_Tests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + C28CE8BE5801E9ACCE0B4193 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-WRNavigationBar_swift_Example-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + D710A271E31469B56CCD31B8 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/WRNavigationBar_swift/WRNavigationBar_swift.framework", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WRNavigationBar_swift.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 607FACCC1AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 12CE363A21EEEBD300F43FC1 /* BaseViewController.swift in Sources */, + 12CE364221EEEBE900F43FC1 /* SixthViewController.swift in Sources */, + 12CE364121EEEBE900F43FC1 /* SecondViewController.swift in Sources */, + 12CE363021EEEBB500F43FC1 /* QQMineController.swift in Sources */, + 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, + 12CE362F21EEEBB500F43FC1 /* AllTransparent.swift in Sources */, + 12CE364321EEEBE900F43FC1 /* MoveListController.swift in Sources */, + 12CE363B21EEEBD300F43FC1 /* CustomNavBarController.swift in Sources */, + 12CE363921EEEBD300F43FC1 /* ImageNavController.swift in Sources */, + 12CE363221EEEBB500F43FC1 /* QQAppController.swift in Sources */, + 12CE363D21EEEBD300F43FC1 /* MillcolorGradController.swift in Sources */, + 12CE362D21EEEBB500F43FC1 /* WeiBoMineController.swift in Sources */, + 12CE362E21EEEBB500F43FC1 /* ZhiHuController.swift in Sources */, + 12CE363121EEEBB500F43FC1 /* AntForestController.swift in Sources */, + 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, + 12CE363321EEEBB500F43FC1 /* QQZoneController.swift in Sources */, + 12CE362C21EEEBB500F43FC1 /* NormalListController.swift in Sources */, + 12CE362021EEEB1400F43FC1 /* BaseNavigationController.swift in Sources */, + 12CE363C21EEEBD300F43FC1 /* CustomListController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 607FACE11AFB9204008FA782 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 607FACCF1AFB9204008FA782 /* WRNavigationBar_swift_Example */; + targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 607FACD91AFB9204008FA782 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 607FACDA1AFB9204008FA782 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 607FACDF1AFB9204008FA782 /* Base */, + ); + name = LaunchScreen.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 607FACED1AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 607FACEE1AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 607FACF01AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 3C739D7B7E47049E273E27D6 /* Pods-WRNavigationBar_swift_Example.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = P3X2725LYY; + INFOPLIST_FILE = WRNavigationBar_swift/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.2; + }; + name = Debug; + }; + 607FACF11AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 1CE6177B91612B092B9820D6 /* Pods-WRNavigationBar_swift_Example.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = P3X2725LYY; + INFOPLIST_FILE = WRNavigationBar_swift/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MODULE_NAME = ExampleApp; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.2; + }; + name = Release; + }; + 607FACF31AFB9204008FA782 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 95AD45F4B1519FF22CE4A582 /* Pods-WRNavigationBar_swift_Tests.debug.xcconfig */; + buildSettings = { + DEVELOPMENT_TEAM = P3X2725LYY; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.2; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WRNavigationBar_swift_Example.app/WRNavigationBar_swift_Example"; + }; + name = Debug; + }; + 607FACF41AFB9204008FA782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8A798F447A512F554761A078 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */; + buildSettings = { + DEVELOPMENT_TEAM = P3X2725LYY; + FRAMEWORK_SEARCH_PATHS = ( + "$(SDKROOT)/Developer/Library/Frameworks", + "$(inherited)", + ); + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_SWIFT3_OBJC_INFERENCE = Default; + SWIFT_VERSION = 4.2; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WRNavigationBar_swift_Example.app/WRNavigationBar_swift_Example"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "WRNavigationBar_swift" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACED1AFB9204008FA782 /* Debug */, + 607FACEE1AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift_Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF01AFB9204008FA782 /* Debug */, + 607FACF11AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift_Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 607FACF31AFB9204008FA782 /* Debug */, + 607FACF41AFB9204008FA782 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 607FACC81AFB9204008FA782 /* Project object */; +} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/WRNavigationBar_swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Example/WRNavigationBar_swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/WRNavigationBar_swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Example/WRNavigationBar_swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/Example/WRNavigationBar_swift.xcodeproj/xcshareddata/xcschemes/WRNavigationBar_swift-Example.xcscheme b/Example/WRNavigationBar_swift.xcodeproj/xcshareddata/xcschemes/WRNavigationBar_swift-Example.xcscheme new file mode 100644 index 0000000..6df522b --- /dev/null +++ b/Example/WRNavigationBar_swift.xcodeproj/xcshareddata/xcschemes/WRNavigationBar_swift-Example.xcscheme @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WRNavigationBar_swift/WRNavigationBar_swift.xcworkspace/contents.xcworkspacedata b/Example/WRNavigationBar_swift.xcworkspace/contents.xcworkspacedata similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift.xcworkspace/contents.xcworkspacedata rename to Example/WRNavigationBar_swift.xcworkspace/contents.xcworkspacedata diff --git a/WRNavigationBar_swift/WRNavigationBar_swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/WRNavigationBar_swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to Example/WRNavigationBar_swift.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AllTransparent.swift b/Example/WRNavigationBar_swift/AllTransparent.swift similarity index 99% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/AllTransparent.swift rename to Example/WRNavigationBar_swift/AllTransparent.swift index ca0d792..0f9576f 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AllTransparent.swift +++ b/Example/WRNavigationBar_swift/AllTransparent.swift @@ -8,6 +8,7 @@ // Github地址:https://github.com/wangrui460/WRNavigationBar_swift import UIKit +import WRNavigationBar_swift private let IMAGE_HEIGHT:CGFloat = 220 private let NAVBAR_COLORCHANGE_POINT:CGFloat = IMAGE_HEIGHT - CGFloat(kNavBarBottom * 2) diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/AntForestController.swift b/Example/WRNavigationBar_swift/AntForestController.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/AntForestController.swift rename to Example/WRNavigationBar_swift/AntForestController.swift diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/AppDelegate.swift b/Example/WRNavigationBar_swift/AppDelegate.swift similarity index 98% rename from WRNavigationBar_swift/WRNavigationBar_swift/AppDelegate.swift rename to Example/WRNavigationBar_swift/AppDelegate.swift index e2cb050..8d23b35 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/AppDelegate.swift +++ b/Example/WRNavigationBar_swift/AppDelegate.swift @@ -8,6 +8,7 @@ // Github地址:https://github.com/wangrui460/WRNavigationBar_swift import UIKit +import WRNavigationBar_swift let MainNavBarColor = UIColor.init(red: 0/255.0, green: 175/255.0, blue: 240/255.0, alpha: 1) let kScreenWidth = UIScreen.main.bounds.width @@ -24,18 +25,18 @@ class AppDelegate: UIResponder, UIApplicationDelegate { { window = UIWindow.init(frame: UIScreen.main.bounds) window?.backgroundColor = UIColor.white - + let firstNav = BaseNavigationController.init(rootViewController: NormalListController()) let secondNav = BaseNavigationController.init(rootViewController: CustomListController()) let thirdNav = BaseNavigationController.init(rootViewController: MoveListController()) let tabBarVC = UITabBarController.init() tabBarVC.viewControllers = [firstNav, secondNav, thirdNav] setTabBarItems(tabBarVC: tabBarVC) - + window?.rootViewController = tabBarVC setNavBarAppearence() window?.makeKeyAndVisible() - + return true } @@ -55,7 +56,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { item.selectedImage = UIImage(named: highlightImages[index])?.withRenderingMode(.alwaysOriginal) } } - + func setNavBarAppearence() { // 设置导航栏默认的背景颜色 diff --git a/Example/WRNavigationBar_swift/Base.lproj/LaunchScreen.xib b/Example/WRNavigationBar_swift/Base.lproj/LaunchScreen.xib new file mode 100644 index 0000000..c0ae638 --- /dev/null +++ b/Example/WRNavigationBar_swift/Base.lproj/LaunchScreen.xib @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Base.lproj/Main.storyboard b/Example/WRNavigationBar_swift/Base.lproj/Main.storyboard similarity index 57% rename from WRNavigationBar_swift/WRNavigationBar_swift/Base.lproj/Main.storyboard rename to Example/WRNavigationBar_swift/Base.lproj/Main.storyboard index 273375f..d48fc8e 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Base.lproj/Main.storyboard +++ b/Example/WRNavigationBar_swift/Base.lproj/Main.storyboard @@ -1,25 +1,29 @@ - - + + + + + - + + - + - + - - + + - + - + - + diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseNavigationController.swift b/Example/WRNavigationBar_swift/BaseNavigationController.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseNavigationController.swift rename to Example/WRNavigationBar_swift/BaseNavigationController.swift diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseViewController.swift b/Example/WRNavigationBar_swift/BaseViewController.swift similarity index 97% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseViewController.swift rename to Example/WRNavigationBar_swift/BaseViewController.swift index cfb885d..dc91009 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/BaseViewController.swift +++ b/Example/WRNavigationBar_swift/BaseViewController.swift @@ -8,6 +8,7 @@ // Github地址:https://github.com/wangrui460/WRNavigationBar_swift import UIKit +import WRNavigationBar_swift class BaseViewController: UIViewController { diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/CustomListController.swift b/Example/WRNavigationBar_swift/CustomListController.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/CustomListController.swift rename to Example/WRNavigationBar_swift/CustomListController.swift diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/CustomNavBarController.swift b/Example/WRNavigationBar_swift/CustomNavBarController.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/CustomNavBarController.swift rename to Example/WRNavigationBar_swift/CustomNavBarController.swift diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ImageNavController.swift b/Example/WRNavigationBar_swift/ImageNavController.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/ImageNavController.swift rename to Example/WRNavigationBar_swift/ImageNavController.swift diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/AppIcon.appiconset/180wr.png b/Example/WRNavigationBar_swift/Images.xcassets/AppIcon.appiconset/180wr.png similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/AppIcon.appiconset/180wr.png rename to Example/WRNavigationBar_swift/Images.xcassets/AppIcon.appiconset/180wr.png diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/AppIcon.appiconset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/AppIcon.appiconset/wr120@2x.png b/Example/WRNavigationBar_swift/Images.xcassets/AppIcon.appiconset/wr120@2x.png similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/AppIcon.appiconset/wr120@2x.png rename to Example/WRNavigationBar_swift/Images.xcassets/AppIcon.appiconset/wr120@2x.png diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/bottomImage.imageset/938A54DAB0905290EBBE392AE73286DC.jpg b/Example/WRNavigationBar_swift/Images.xcassets/bottomImage.imageset/938A54DAB0905290EBBE392AE73286DC.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/bottomImage.imageset/938A54DAB0905290EBBE392AE73286DC.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/bottomImage.imageset/938A54DAB0905290EBBE392AE73286DC.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/bottomImage.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/bottomImage.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/bottomImage.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/bottomImage.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image1.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/image1.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image1.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/image1.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image1.imageset/image1.jpg b/Example/WRNavigationBar_swift/Images.xcassets/image1.imageset/image1.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image1.imageset/image1.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/image1.imageset/image1.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image2.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/image2.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image2.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/image2.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image2.imageset/image2.jpg b/Example/WRNavigationBar_swift/Images.xcassets/image2.imageset/image2.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image2.imageset/image2.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/image2.imageset/image2.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image3.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/image3.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image3.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/image3.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image3.imageset/DF0999B79D020D160165A612636482E9.jpg b/Example/WRNavigationBar_swift/Images.xcassets/image3.imageset/DF0999B79D020D160165A612636482E9.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image3.imageset/DF0999B79D020D160165A612636482E9.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/image3.imageset/DF0999B79D020D160165A612636482E9.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image4.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/image4.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image4.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/image4.imageset/Contents.json diff --git "a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image4.imageset/\346\244\255\345\234\206 2.png" "b/Example/WRNavigationBar_swift/Images.xcassets/image4.imageset/\346\244\255\345\234\206 2.png" similarity index 100% rename from "WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image4.imageset/\346\244\255\345\234\206 2.png" rename to "Example/WRNavigationBar_swift/Images.xcassets/image4.imageset/\346\244\255\345\234\206 2.png" diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image5.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/image5.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image5.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/image5.imageset/Contents.json diff --git "a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image5.imageset/\346\210\2213.png" "b/Example/WRNavigationBar_swift/Images.xcassets/image5.imageset/\346\210\2213.png" similarity index 100% rename from "WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image5.imageset/\346\210\2213.png" rename to "Example/WRNavigationBar_swift/Images.xcassets/image5.imageset/\346\210\2213.png" diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image6.imageset/B56C24FF94B6EB94E1DD1931343B37D3.jpg b/Example/WRNavigationBar_swift/Images.xcassets/image6.imageset/B56C24FF94B6EB94E1DD1931343B37D3.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image6.imageset/B56C24FF94B6EB94E1DD1931343B37D3.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/image6.imageset/B56C24FF94B6EB94E1DD1931343B37D3.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image6.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/image6.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image6.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/image6.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image7.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/image7.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image7.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/image7.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image7.imageset/u=2864424897,2473674229&fm=26&gp=0.jpg b/Example/WRNavigationBar_swift/Images.xcassets/image7.imageset/u=2864424897,2473674229&fm=26&gp=0.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image7.imageset/u=2864424897,2473674229&fm=26&gp=0.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/image7.imageset/u=2864424897,2473674229&fm=26&gp=0.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image8.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/image8.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image8.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/image8.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image8.imageset/cad334853a19ab63f278ed8532ff8ae1.jpeg b/Example/WRNavigationBar_swift/Images.xcassets/image8.imageset/cad334853a19ab63f278ed8532ff8ae1.jpeg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/image8.imageset/cad334853a19ab63f278ed8532ff8ae1.jpeg rename to Example/WRNavigationBar_swift/Images.xcassets/image8.imageset/cad334853a19ab63f278ed8532ff8ae1.jpeg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/imageNav.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/imageNav.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/imageNav.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/imageNav.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/imageNav.imageset/u=1206318416,27195661&fm=26&gp=0.jpg b/Example/WRNavigationBar_swift/Images.xcassets/imageNav.imageset/u=1206318416,27195661&fm=26&gp=0.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/imageNav.imageset/u=1206318416,27195661&fm=26&gp=0.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/imageNav.imageset/u=1206318416,27195661&fm=26&gp=0.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg10.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/localImg10.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg10.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/localImg10.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg10.imageset/localImg10.jpg b/Example/WRNavigationBar_swift/Images.xcassets/localImg10.imageset/localImg10.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg10.imageset/localImg10.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/localImg10.imageset/localImg10.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg6.imageset/6.jpg b/Example/WRNavigationBar_swift/Images.xcassets/localImg6.imageset/6.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg6.imageset/6.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/localImg6.imageset/6.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg6.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/localImg6.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg6.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/localImg6.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg7.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/localImg7.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg7.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/localImg7.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg7.imageset/localImg7.jpg b/Example/WRNavigationBar_swift/Images.xcassets/localImg7.imageset/localImg7.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg7.imageset/localImg7.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/localImg7.imageset/localImg7.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg8.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/localImg8.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg8.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/localImg8.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg8.imageset/localImg8.jpg b/Example/WRNavigationBar_swift/Images.xcassets/localImg8.imageset/localImg8.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg8.imageset/localImg8.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/localImg8.imageset/localImg8.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg9.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/localImg9.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg9.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/localImg9.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg9.imageset/localImg9.jpg b/Example/WRNavigationBar_swift/Images.xcassets/localImg9.imageset/localImg9.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/localImg9.imageset/localImg9.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/localImg9.imageset/localImg9.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/millcolorGrad.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/millcolorGrad.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/millcolorGrad.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/millcolorGrad.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/millcolorGrad.imageset/millcolorGrad.png b/Example/WRNavigationBar_swift/Images.xcassets/millcolorGrad.imageset/millcolorGrad.png similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/millcolorGrad.imageset/millcolorGrad.png rename to Example/WRNavigationBar_swift/Images.xcassets/millcolorGrad.imageset/millcolorGrad.png diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mine.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/mine.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mine.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/mine.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mine.imageset/mine@2x.png b/Example/WRNavigationBar_swift/Images.xcassets/mine.imageset/mine@2x.png similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mine.imageset/mine@2x.png rename to Example/WRNavigationBar_swift/Images.xcassets/mine.imageset/mine@2x.png diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mine.imageset/mine@3x.png b/Example/WRNavigationBar_swift/Images.xcassets/mine.imageset/mine@3x.png similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mine.imageset/mine@3x.png rename to Example/WRNavigationBar_swift/Images.xcassets/mine.imageset/mine@3x.png diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mineHighlight.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/mineHighlight.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mineHighlight.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/mineHighlight.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mineHighlight.imageset/mineHighlight@2x.png b/Example/WRNavigationBar_swift/Images.xcassets/mineHighlight.imageset/mineHighlight@2x.png similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mineHighlight.imageset/mineHighlight@2x.png rename to Example/WRNavigationBar_swift/Images.xcassets/mineHighlight.imageset/mineHighlight@2x.png diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mineHighlight.imageset/mineHighlight@3x.png b/Example/WRNavigationBar_swift/Images.xcassets/mineHighlight.imageset/mineHighlight@3x.png similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mineHighlight.imageset/mineHighlight@3x.png rename to Example/WRNavigationBar_swift/Images.xcassets/mineHighlight.imageset/mineHighlight@3x.png diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mysl.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/mysl.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mysl.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/mysl.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mysl.imageset/WechatIMG52.png b/Example/WRNavigationBar_swift/Images.xcassets/mysl.imageset/WechatIMG52.png similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/mysl.imageset/WechatIMG52.png rename to Example/WRNavigationBar_swift/Images.xcassets/mysl.imageset/WechatIMG52.png diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/test.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/test.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/test.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/test.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/test.imageset/test.jpg b/Example/WRNavigationBar_swift/Images.xcassets/test.imageset/test.jpg similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/test.imageset/test.jpg rename to Example/WRNavigationBar_swift/Images.xcassets/test.imageset/test.jpg diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/wbBg.imageset/Contents.json b/Example/WRNavigationBar_swift/Images.xcassets/wbBg.imageset/Contents.json similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/wbBg.imageset/Contents.json rename to Example/WRNavigationBar_swift/Images.xcassets/wbBg.imageset/Contents.json diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/wbBg.imageset/wbBG.png b/Example/WRNavigationBar_swift/Images.xcassets/wbBg.imageset/wbBG.png similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Assets.xcassets/wbBg.imageset/wbBG.png rename to Example/WRNavigationBar_swift/Images.xcassets/wbBg.imageset/wbBG.png diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Info.plist b/Example/WRNavigationBar_swift/Info.plist similarity index 71% rename from WRNavigationBar_swift/WRNavigationBar_swift/Info.plist rename to Example/WRNavigationBar_swift/Info.plist index 2b53832..eb18faa 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Info.plist +++ b/Example/WRNavigationBar_swift/Info.plist @@ -6,10 +6,6 @@ en CFBundleExecutable $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion @@ -20,12 +16,16 @@ APPL CFBundleShortVersionString 1.0 + CFBundleSignature + ???? CFBundleVersion 1 LSRequiresIPhoneOS UILaunchStoryboardName LaunchScreen + UIMainStoryboardFile + Main UIRequiredDeviceCapabilities armv7 @@ -34,14 +34,6 @@ UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/MillcolorGradController.swift b/Example/WRNavigationBar_swift/MillcolorGradController.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/MillcolorGradController.swift rename to Example/WRNavigationBar_swift/MillcolorGradController.swift diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/MoveListController.swift b/Example/WRNavigationBar_swift/MoveListController.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/MoveListController.swift rename to Example/WRNavigationBar_swift/MoveListController.swift diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/NormalListController.swift b/Example/WRNavigationBar_swift/NormalListController.swift similarity index 99% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/NormalListController.swift rename to Example/WRNavigationBar_swift/NormalListController.swift index 837f2f9..0b4c194 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/NormalListController.swift +++ b/Example/WRNavigationBar_swift/NormalListController.swift @@ -8,6 +8,7 @@ // Github地址:https://github.com/wangrui460/WRNavigationBar_swift import UIKit +import WRNavigationBar_swift let kNavBarBottom = WRNavigationBar.navBarBottom() diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQAppController.swift b/Example/WRNavigationBar_swift/QQAppController.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQAppController.swift rename to Example/WRNavigationBar_swift/QQAppController.swift diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQMineController.swift b/Example/WRNavigationBar_swift/QQMineController.swift similarity index 99% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQMineController.swift rename to Example/WRNavigationBar_swift/QQMineController.swift index e06d33a..e26b84b 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQMineController.swift +++ b/Example/WRNavigationBar_swift/QQMineController.swift @@ -8,6 +8,7 @@ // Github地址:https://github.com/wangrui460/WRNavigationBar_swift import UIKit +import WRNavigationBar_swift private let IMAGE_HEIGHT:CGFloat = 280 private let NAVBAR_COLORCHANGE_POINT:CGFloat = IMAGE_HEIGHT - CGFloat(kNavBarBottom) diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQZoneController.swift b/Example/WRNavigationBar_swift/QQZoneController.swift similarity index 99% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQZoneController.swift rename to Example/WRNavigationBar_swift/QQZoneController.swift index c212e08..d68aa72 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/QQZoneController.swift +++ b/Example/WRNavigationBar_swift/QQZoneController.swift @@ -8,6 +8,7 @@ // Github地址:https://github.com/wangrui460/WRNavigationBar_swift import UIKit +import WRNavigationBar_swift private let NAVBAR_COLORCHANGE_POINT:CGFloat = (-IMAGE_HEIGHT + CGFloat(kNavBarBottom * 2)) private let IMAGE_HEIGHT:CGFloat = 260 diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SecondViewController.swift b/Example/WRNavigationBar_swift/SecondViewController.swift similarity index 99% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/SecondViewController.swift rename to Example/WRNavigationBar_swift/SecondViewController.swift index 0fea077..d9139f5 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SecondViewController.swift +++ b/Example/WRNavigationBar_swift/SecondViewController.swift @@ -8,6 +8,7 @@ // Github地址:https://github.com/wangrui460/WRNavigationBar_swift import UIKit +import WRNavigationBar_swift private let NAVBAR_TRANSLATION_POINT:CGFloat = 0 diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SixthViewController.swift b/Example/WRNavigationBar_swift/SixthViewController.swift similarity index 99% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/SixthViewController.swift rename to Example/WRNavigationBar_swift/SixthViewController.swift index 03bae10..732d98a 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/SixthViewController.swift +++ b/Example/WRNavigationBar_swift/SixthViewController.swift @@ -8,6 +8,7 @@ // Github地址:https://github.com/wangrui460/WRNavigationBar_swift import UIKit +import WRNavigationBar_swift private let NAVBAR_TRANSLATION_POINT:CGFloat = 0 diff --git a/Example/WRNavigationBar_swift/ViewController.swift b/Example/WRNavigationBar_swift/ViewController.swift new file mode 100644 index 0000000..9c3cc15 --- /dev/null +++ b/Example/WRNavigationBar_swift/ViewController.swift @@ -0,0 +1,24 @@ +// +// ViewController.swift +// WRNavigationBar_swift +// +// Created by EyreFree on 01/16/2019. +// Copyright (c) 2019 EyreFree. All rights reserved. +// + +import UIKit + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + +} + diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/WeiBoMineController.swift b/Example/WRNavigationBar_swift/WeiBoMineController.swift similarity index 100% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/WeiBoMineController.swift rename to Example/WRNavigationBar_swift/WeiBoMineController.swift diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ZhiHuController.swift b/Example/WRNavigationBar_swift/ZhiHuController.swift similarity index 90% rename from WRNavigationBar_swift/WRNavigationBar_swift/Demos/ZhiHuController.swift rename to Example/WRNavigationBar_swift/ZhiHuController.swift index 406fcf3..6d93c2c 100644 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Demos/ZhiHuController.swift +++ b/Example/WRNavigationBar_swift/ZhiHuController.swift @@ -24,12 +24,14 @@ class ZhiHuController: UIViewController table.dataSource = self return table }() - lazy var cycleScrollView:WRCycleScrollView = { - let frame = CGRect(x: 0, y: -IMAGE_HEIGHT, width: CGFloat(kScreenWidth), height: IMAGE_HEIGHT) - let cycleView = WRCycleScrollView(frame: frame, type: .LOCAL, imgs: nil, descs: nil) - return cycleView - }() - + // TODO + let cycleScrollView: UIView = UIView() +// lazy var cycleScrollView: WRCycleScrollView = { +// let frame = CGRect(x: 0, y: -IMAGE_HEIGHT, width: CGFloat(kScreenWidth), height: IMAGE_HEIGHT) +// let cycleView = WRCycleScrollView(frame: frame, type: .LOCAL, imgs: nil, descs: nil) +// return cycleView +// }() + override func viewDidLoad() { super.viewDidLoad() @@ -41,8 +43,9 @@ class ZhiHuController: UIViewController "Win10秋季更新重磅功能:跟安卓与iOS无缝连接", "《琅琊榜2》为何没有胡歌?胡歌:我看过剧本,离开是种保护", "阿米尔汗在印度的影响力,我国的哪位影视明星能与之齐名呢?"] - cycleScrollView.localImgArray = localImages - cycleScrollView.descTextArray = descs + // TODO +// cycleScrollView.localImgArray = localImages +// cycleScrollView.descTextArray = descs tableView.addSubview(cycleScrollView) view.addSubview(tableView) diff --git a/WRNavigationBar_swift.podspec b/WRNavigationBar_swift.podspec new file mode 100644 index 0000000..4993f20 --- /dev/null +++ b/WRNavigationBar_swift.podspec @@ -0,0 +1,20 @@ +Pod::Spec.new do |s| + s.name = 'WRNavigationBar_swift' + s.version = '0.1.0' + s.summary = 'A useful custom navigation bar.' + + s.description = <<-DESC +WRNavigationBar which allows you to change NavigationBar's appearance dynamically. + DESC + + s.homepage = 'https://github.com/wangrui460/WRNavigationBar_swift' + # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.author = { 'EyreFree' => 'eyrefree@eyrefree.org' } + s.source = { :git => 'https://github.com/wangrui460/WRNavigationBar_swift.git', :tag => s.version.to_s } + # s.social_media_url = 'https://twitter.com/' + + s.ios.deployment_target = '8.0' + + s.source_files = 'WRNavigationBar_swift/Classes/**/*' +end diff --git a/WRNavigationBar_swift/Assets/.gitkeep b/WRNavigationBar_swift/Assets/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/WRNavigationBar_swift/Classes/.gitkeep b/WRNavigationBar_swift/Classes/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/WRNavigationBar/WRCustomNavigationBar.swift b/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift similarity index 92% rename from WRNavigationBar/WRCustomNavigationBar.swift rename to WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift index 5066e10..0429b06 100644 --- a/WRNavigationBar/WRCustomNavigationBar.swift +++ b/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift @@ -15,7 +15,7 @@ fileprivate let WRScreenWidth = UIScreen.main.bounds.size.width // MARK: - Router -extension UIViewController +public extension UIViewController { // A页面 弹出 登录页面B // presentedViewController: A页面 @@ -67,34 +67,34 @@ extension UIViewController //////////////////////////////////////////////////////////////////////////////////////////////////////////// -class WRCustomNavigationBar: UIView +public class WRCustomNavigationBar: UIView { - var onClickLeftButton:(()->())? - var onClickRightButton:(()->())? - var title:String? { + public var onClickLeftButton:(()->())? + public var onClickRightButton:(()->())? + public var title:String? { willSet { titleLabel.isHidden = false titleLabel.text = newValue } } - var titleLabelColor:UIColor? { + public var titleLabelColor:UIColor? { willSet { titleLabel.textColor = newValue } } - var titleLabelFont:UIFont? { + public var titleLabelFont:UIFont? { willSet { titleLabel.font = newValue } } - var barBackgroundColor:UIColor? { + public var barBackgroundColor:UIColor? { willSet { backgroundImageView.isHidden = true backgroundView.isHidden = false backgroundView.backgroundColor = newValue } } - var barBackgroundImage:UIImage? { + public var barBackgroundImage:UIImage? { willSet { backgroundView.isHidden = true backgroundImageView.isHidden = false @@ -158,20 +158,20 @@ class WRCustomNavigationBar: UIView } // init - class func CustomNavigationBar() -> WRCustomNavigationBar { + public class func CustomNavigationBar() -> WRCustomNavigationBar { let frame = CGRect(x: 0, y: 0, width: WRScreenWidth, height: CGFloat(navBarBottom)) return WRCustomNavigationBar(frame: frame) } - override init(frame: CGRect) { + public override init(frame: CGRect) { super.init(frame: frame) setupView() } - required init?(coder aDecoder: NSCoder) { + public required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) setupView() } - func setupView() + public func setupView() { addSubview(backgroundView) addSubview(backgroundImageView) @@ -183,7 +183,7 @@ class WRCustomNavigationBar: UIView backgroundColor = UIColor.clear backgroundView.backgroundColor = WRDefaultBackgroundColor } - func updateFrame() + public func updateFrame() { let top:CGFloat = WRCustomNavigationBar.isIphoneX ? 44 : 20 let margin:CGFloat = 0 @@ -202,7 +202,7 @@ class WRCustomNavigationBar: UIView } -extension WRCustomNavigationBar +public extension WRCustomNavigationBar { func wr_setBottomLineHidden(hidden:Bool) { bottomLine.isHidden = hidden @@ -259,7 +259,7 @@ extension WRCustomNavigationBar // MARK: - 导航栏左右按钮事件 -extension WRCustomNavigationBar +public extension WRCustomNavigationBar { @objc func clickBack() { if let onClickBack = onClickLeftButton { diff --git a/WRNavigationBar/WRNavigationBar.swift b/WRNavigationBar_swift/Classes/WRNavigationBar.swift similarity index 97% rename from WRNavigationBar/WRNavigationBar.swift rename to WRNavigationBar_swift/Classes/WRNavigationBar.swift index f53c884..af120c7 100644 --- a/WRNavigationBar/WRNavigationBar.swift +++ b/WRNavigationBar_swift/Classes/WRNavigationBar.swift @@ -9,7 +9,7 @@ import UIKit -extension UINavigationBar:WRAwakeProtocol +public extension UINavigationBar { fileprivate struct AssociatedKeys { static var backgroundView: UIView = UIView() @@ -204,9 +204,9 @@ extension UINavigationBar:WRAwakeProtocol //========================================================================== // MARK: - UINavigationController //========================================================================== -extension UINavigationController: WRFatherAwakeProtocol +public extension UINavigationController { - override open var preferredStatusBarStyle: UIStatusBarStyle { + open override var preferredStatusBarStyle: UIStatusBarStyle { return topViewController?.statusBarStyle ?? WRNavigationBar.defaultStatusBarStyle } @@ -489,7 +489,7 @@ extension UINavigationController: UINavigationBarDelegate //============================================================================= // MARK: - store navigationBar barTintColor and tintColor every viewController //============================================================================= -extension UIViewController: WRAwakeProtocol +public extension UIViewController { fileprivate struct AssociatedKeys { @@ -806,7 +806,7 @@ extension DispatchQueue { //=========================================================================================== // MARK: - default navigationBar barTintColor、tintColor and statusBarStyle YOU CAN CHANGE!!! //=========================================================================================== -class WRNavigationBar +public class WRNavigationBar { fileprivate struct AssociatedKeys { // default is system attributes @@ -818,7 +818,7 @@ class WRNavigationBar static var defShadowImageHidden: Bool = false } - class var defaultNavBarBarTintColor: UIColor { + public class var defaultNavBarBarTintColor: UIColor { get { guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defNavBarBarTintColor) as? UIColor else { return AssociatedKeys.defNavBarBarTintColor @@ -830,7 +830,7 @@ class WRNavigationBar } } - class var defaultNavBarBackgroundImage: UIImage? { + public class var defaultNavBarBackgroundImage: UIImage? { get { guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defNavBarBackgroundImage) as? UIImage else { return nil @@ -842,7 +842,7 @@ class WRNavigationBar } } - class var defaultNavBarTintColor: UIColor { + public class var defaultNavBarTintColor: UIColor { get { guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defNavBarTintColor) as? UIColor else { return AssociatedKeys.defNavBarTintColor @@ -854,7 +854,7 @@ class WRNavigationBar } } - class var defaultNavBarTitleColor: UIColor { + public class var defaultNavBarTitleColor: UIColor { get { guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defNavBarTitleColor) as? UIColor else { return AssociatedKeys.defNavBarTitleColor @@ -866,7 +866,7 @@ class WRNavigationBar } } - class var defaultStatusBarStyle: UIStatusBarStyle { + public class var defaultStatusBarStyle: UIStatusBarStyle { get { guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defStatusBarStyle) as? UIStatusBarStyle else { return .default @@ -878,7 +878,7 @@ class WRNavigationBar } } - class var defaultShadowImageHidden: Bool { + public class var defaultShadowImageHidden: Bool { get { guard let def = objc_getAssociatedObject(self, &AssociatedKeys.defShadowImageHidden) as? Bool else { return false @@ -890,7 +890,7 @@ class WRNavigationBar } } - class var defaultBackgroundAlpha: CGFloat { + public class var defaultBackgroundAlpha: CGFloat { get { return 1.0 } @@ -929,7 +929,7 @@ class WRNavigationBar } } -extension WRNavigationBar +public extension WRNavigationBar { class func isIphoneX() -> Bool { return UIScreen.main.bounds.equalTo(CGRect(x: 0, y: 0, width: 375, height: 812)) @@ -959,15 +959,6 @@ extension WRNavigationBar //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -// 1. 定义 WRAwakeProtocol 协议 -public protocol WRAwakeProtocol: class { - static func wrAwake() -} -public protocol WRFatherAwakeProtocol: class -{ // 1.1 定义 WRFatherAwakeProtocol () - static func fatherAwake() -} - class NothingToSeeHere { static func harmlessFunction(){ @@ -1002,3 +993,4 @@ extension UIApplication // 3. 自定义类实现 WRAwakeProtocol 协议,重写 wrAwake 方法 // 自定义类实现 WRFatherAwakeProtocol 协议,重写 fatherAwake 方法 + diff --git a/WRNavigationBar_swift/Podfile b/WRNavigationBar_swift/Podfile deleted file mode 100644 index b6bf957..0000000 --- a/WRNavigationBar_swift/Podfile +++ /dev/null @@ -1,11 +0,0 @@ - - -# 修改过得第三方库 - - -platform :ios, '8.0' -use_frameworks! - -target ‘WRNavigationBar_swift’ do - -end diff --git a/WRNavigationBar_swift/Podfile.lock b/WRNavigationBar_swift/Podfile.lock deleted file mode 100644 index 81bd7bf..0000000 --- a/WRNavigationBar_swift/Podfile.lock +++ /dev/null @@ -1,3 +0,0 @@ -PODFILE CHECKSUM: f271f06bc2e6c032fbdc2389d1ab0d2f2eecd650 - -COCOAPODS: 1.5.3 diff --git a/WRNavigationBar_swift/Pods/Manifest.lock b/WRNavigationBar_swift/Pods/Manifest.lock deleted file mode 100644 index 81bd7bf..0000000 --- a/WRNavigationBar_swift/Pods/Manifest.lock +++ /dev/null @@ -1,3 +0,0 @@ -PODFILE CHECKSUM: f271f06bc2e6c032fbdc2389d1ab0d2f2eecd650 - -COCOAPODS: 1.5.3 diff --git a/WRNavigationBar_swift/Pods/Pods.xcodeproj/project.pbxproj b/WRNavigationBar_swift/Pods/Pods.xcodeproj/project.pbxproj deleted file mode 100644 index e280427..0000000 --- a/WRNavigationBar_swift/Pods/Pods.xcodeproj/project.pbxproj +++ /dev/null @@ -1,384 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 03E4263133608CEB338591B4B7E12544 /* Pods-WRNavigationBar_swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 44078BAAD6BC63EA1206D6F36ECE9C08 /* Pods-WRNavigationBar_swift-dummy.m */; }; - 2B51C9B1416204B8AA1EAC455C2AF1FD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - B53B927794BDA4466883230633A594F4 /* Pods-WRNavigationBar_swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8E724B79A4530AE615B85746D3787943 /* Pods-WRNavigationBar_swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 05AF6C1F6A272D9B15B76E6B81CA14AB /* Pods-WRNavigationBar_swift-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift-frameworks.sh"; sourceTree = ""; }; - 080F16858EF8AC9C388A533BDBA3E17C /* Pods-WRNavigationBar_swift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-WRNavigationBar_swift.modulemap"; sourceTree = ""; }; - 44078BAAD6BC63EA1206D6F36ECE9C08 /* Pods-WRNavigationBar_swift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-WRNavigationBar_swift-dummy.m"; sourceTree = ""; }; - 5F776BF658F33F76A7D080C9CD1DA223 /* Pods-WRNavigationBar_swift-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-WRNavigationBar_swift-acknowledgements.markdown"; sourceTree = ""; }; - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 707AE4E06D73FD6317D2AB48594A4644 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 70D946765B50E9281043BEBBCF598B78 /* Pods_WRNavigationBar_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_WRNavigationBar_swift.framework; path = "Pods-WRNavigationBar_swift.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 815520D44A7A3F4B79088084773638CA /* Pods-WRNavigationBar_swift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift.debug.xcconfig"; sourceTree = ""; }; - 8E724B79A4530AE615B85746D3787943 /* Pods-WRNavigationBar_swift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-WRNavigationBar_swift-umbrella.h"; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9453666D7596D3911A788C6766C0FD9C /* Pods-WRNavigationBar_swift-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-WRNavigationBar_swift-acknowledgements.plist"; sourceTree = ""; }; - BBDE598CC03445EF6BE66726132F3BF0 /* Pods-WRNavigationBar_swift-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift-resources.sh"; sourceTree = ""; }; - EA7917D52F58C3D7F600454E26ABEAA4 /* Pods-WRNavigationBar_swift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift.release.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 397FE0E4835A351E0B7700CF1C792C2F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 2B51C9B1416204B8AA1EAC455C2AF1FD /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1BF2B0C737CAAE286BA4320319120121 /* Targets Support Files */ = { - isa = PBXGroup; - children = ( - 4F281C6F18F2900595F12EBD5F2C9E90 /* Pods-WRNavigationBar_swift */, - ); - name = "Targets Support Files"; - sourceTree = ""; - }; - 4F281C6F18F2900595F12EBD5F2C9E90 /* Pods-WRNavigationBar_swift */ = { - isa = PBXGroup; - children = ( - 707AE4E06D73FD6317D2AB48594A4644 /* Info.plist */, - 080F16858EF8AC9C388A533BDBA3E17C /* Pods-WRNavigationBar_swift.modulemap */, - 5F776BF658F33F76A7D080C9CD1DA223 /* Pods-WRNavigationBar_swift-acknowledgements.markdown */, - 9453666D7596D3911A788C6766C0FD9C /* Pods-WRNavigationBar_swift-acknowledgements.plist */, - 44078BAAD6BC63EA1206D6F36ECE9C08 /* Pods-WRNavigationBar_swift-dummy.m */, - 05AF6C1F6A272D9B15B76E6B81CA14AB /* Pods-WRNavigationBar_swift-frameworks.sh */, - BBDE598CC03445EF6BE66726132F3BF0 /* Pods-WRNavigationBar_swift-resources.sh */, - 8E724B79A4530AE615B85746D3787943 /* Pods-WRNavigationBar_swift-umbrella.h */, - 815520D44A7A3F4B79088084773638CA /* Pods-WRNavigationBar_swift.debug.xcconfig */, - EA7917D52F58C3D7F600454E26ABEAA4 /* Pods-WRNavigationBar_swift.release.xcconfig */, - ); - name = "Pods-WRNavigationBar_swift"; - path = "Target Support Files/Pods-WRNavigationBar_swift"; - sourceTree = ""; - }; - 7DB346D0F39D3F0E887471402A8071AB = { - isa = PBXGroup; - children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, - A17D75D9BF2CC92635CC487475FCF2C9 /* Products */, - 1BF2B0C737CAAE286BA4320319120121 /* Targets Support Files */, - ); - sourceTree = ""; - }; - A17D75D9BF2CC92635CC487475FCF2C9 /* Products */ = { - isa = PBXGroup; - children = ( - 70D946765B50E9281043BEBBCF598B78 /* Pods_WRNavigationBar_swift.framework */, - ); - name = Products; - sourceTree = ""; - }; - BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { - isa = PBXGroup; - children = ( - D35AF013A5F0BAD4F32504907A52519E /* iOS */, - ); - name = Frameworks; - sourceTree = ""; - }; - D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { - isa = PBXGroup; - children = ( - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 1D95B65CF45BAC3CC54856F59E179D87 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - B53B927794BDA4466883230633A594F4 /* Pods-WRNavigationBar_swift-umbrella.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - ECDA4F93CF6D0F58ED5B8B903A7DD81A /* Pods-WRNavigationBar_swift */ = { - isa = PBXNativeTarget; - buildConfigurationList = 18CF4BFB493512A8B136FC8E62C093D6 /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift" */; - buildPhases = ( - EDB8FDEB55244786ED419BCB0CBF5E5E /* Sources */, - 397FE0E4835A351E0B7700CF1C792C2F /* Frameworks */, - 1D95B65CF45BAC3CC54856F59E179D87 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "Pods-WRNavigationBar_swift"; - productName = "Pods-WRNavigationBar_swift"; - productReference = 70D946765B50E9281043BEBBCF598B78 /* Pods_WRNavigationBar_swift.framework */; - productType = "com.apple.product-type.framework"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0930; - LastUpgradeCheck = 0930; - }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = A17D75D9BF2CC92635CC487475FCF2C9 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - ECDA4F93CF6D0F58ED5B8B903A7DD81A /* Pods-WRNavigationBar_swift */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - EDB8FDEB55244786ED419BCB0CBF5E5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 03E4263133608CEB338591B4B7E12544 /* Pods-WRNavigationBar_swift-dummy.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1EE19F5DD95931924296F637BF18BD8F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; - }; - 39E8CDEE298765A16A439BFFB55BB7AC /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = EA7917D52F58C3D7F600454E26ABEAA4 /* Pods-WRNavigationBar_swift.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - A4AF4DD1E206C0526E366D66A0CB70B5 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 815520D44A7A3F4B79088084773638CA /* Pods-WRNavigationBar_swift.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - F4568DEE257655D290C2B9CEAB37C934 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_ENABLE_OBJC_WEAK = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_ALLOWED = NO; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = "$(TARGET_NAME)"; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 18CF4BFB493512A8B136FC8E62C093D6 /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A4AF4DD1E206C0526E366D66A0CB70B5 /* Debug */, - 39E8CDEE298765A16A439BFFB55BB7AC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1EE19F5DD95931924296F637BF18BD8F /* Debug */, - F4568DEE257655D290C2B9CEAB37C934 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; -} diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-dummy.m b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-dummy.m deleted file mode 100644 index 26626bc..0000000 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift-dummy.m +++ /dev/null @@ -1,5 +0,0 @@ -#import -@interface PodsDummy_Pods_WRNavigationBar_swift : NSObject -@end -@implementation PodsDummy_Pods_WRNavigationBar_swift -@end diff --git a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.modulemap b/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.modulemap deleted file mode 100644 index 64e0965..0000000 --- a/WRNavigationBar_swift/Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.modulemap +++ /dev/null @@ -1,6 +0,0 @@ -framework module Pods_WRNavigationBar_swift { - umbrella header "Pods-WRNavigationBar_swift-umbrella.h" - - export * - module * { export * } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.pbxproj b/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.pbxproj deleted file mode 100644 index 3ffc505..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift.xcodeproj/project.pbxproj +++ /dev/null @@ -1,728 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 12CE35BA21EEE1DD00F43FC1 /* WRCycleScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35B721EEE1DD00F43FC1 /* WRCycleScrollView.swift */; }; - 12CE35BB21EEE1DD00F43FC1 /* WRCycleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35B821EEE1DD00F43FC1 /* WRCycleCell.swift */; }; - 12CE35BC21EEE1DD00F43FC1 /* WRProxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35B921EEE1DD00F43FC1 /* WRProxy.swift */; }; - 12CE35C121EEE2EC00F43FC1 /* WRNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35BF21EEE2EC00F43FC1 /* WRNavigationBar.swift */; }; - 12CE35C221EEE2EC00F43FC1 /* WRCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35C021EEE2EC00F43FC1 /* WRCustomNavigationBar.swift */; }; - 12CE360921EEE37C00F43FC1 /* Image.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F221EEE37B00F43FC1 /* Image.swift */; }; - 12CE360A21EEE37C00F43FC1 /* KingfisherManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F321EEE37B00F43FC1 /* KingfisherManager.swift */; }; - 12CE360B21EEE37C00F43FC1 /* Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F421EEE37B00F43FC1 /* Kingfisher.swift */; }; - 12CE360C21EEE37C00F43FC1 /* CacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F521EEE37B00F43FC1 /* CacheSerializer.swift */; }; - 12CE360D21EEE37C00F43FC1 /* String+MD5.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F621EEE37B00F43FC1 /* String+MD5.swift */; }; - 12CE360E21EEE37C00F43FC1 /* KingfisherOptionsInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F721EEE37B00F43FC1 /* KingfisherOptionsInfo.swift */; }; - 12CE360F21EEE37C00F43FC1 /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F821EEE37B00F43FC1 /* ImageDownloader.swift */; }; - 12CE361021EEE37C00F43FC1 /* Resource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35F921EEE37B00F43FC1 /* Resource.swift */; }; - 12CE361121EEE37C00F43FC1 /* AnimatedImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FA21EEE37B00F43FC1 /* AnimatedImageView.swift */; }; - 12CE361221EEE37C00F43FC1 /* ImageTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FC21EEE37B00F43FC1 /* ImageTransition.swift */; }; - 12CE361321EEE37C00F43FC1 /* ImagePrefetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FD21EEE37B00F43FC1 /* ImagePrefetcher.swift */; }; - 12CE361421EEE37C00F43FC1 /* Box.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FE21EEE37B00F43FC1 /* Box.swift */; }; - 12CE361521EEE37C00F43FC1 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE35FF21EEE37B00F43FC1 /* Filter.swift */; }; - 12CE361621EEE37C00F43FC1 /* Placeholder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360021EEE37B00F43FC1 /* Placeholder.swift */; }; - 12CE361721EEE37C00F43FC1 /* RequestModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360121EEE37B00F43FC1 /* RequestModifier.swift */; }; - 12CE361821EEE37C00F43FC1 /* ImageProcessor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360221EEE37B00F43FC1 /* ImageProcessor.swift */; }; - 12CE361921EEE37C00F43FC1 /* ThreadHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360321EEE37B00F43FC1 /* ThreadHelper.swift */; }; - 12CE361A21EEE37C00F43FC1 /* UIButton+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360421EEE37B00F43FC1 /* UIButton+Kingfisher.swift */; }; - 12CE361B21EEE37C00F43FC1 /* ImageView+Kingfisher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360521EEE37B00F43FC1 /* ImageView+Kingfisher.swift */; }; - 12CE361C21EEE37C00F43FC1 /* FormatIndicatedCacheSerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360621EEE37B00F43FC1 /* FormatIndicatedCacheSerializer.swift */; }; - 12CE361D21EEE37C00F43FC1 /* ImageCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360721EEE37B00F43FC1 /* ImageCache.swift */; }; - 12CE361E21EEE37C00F43FC1 /* Indicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12CE360821EEE37B00F43FC1 /* Indicator.swift */; }; - 1A05B4761F07FAB4001D7B64 /* NormalListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A05B4751F07FAB4001D7B64 /* NormalListController.swift */; }; - 1A05B4781F07FAD7001D7B64 /* ImageNavController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A05B4771F07FAD7001D7B64 /* ImageNavController.swift */; }; - 1A05B47A1F080D0B001D7B64 /* MillcolorGradController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A05B4791F080D0B001D7B64 /* MillcolorGradController.swift */; }; - 1A0DF77B1EA7176500191349 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A0DF77A1EA7176500191349 /* AppDelegate.swift */; }; - 1A0DF7801EA7176500191349 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A0DF77E1EA7176500191349 /* Main.storyboard */; }; - 1A0DF7821EA7176500191349 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A0DF7811EA7176500191349 /* Assets.xcassets */; }; - 1A0DF7851EA7176500191349 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A0DF7831EA7176500191349 /* LaunchScreen.storyboard */; }; - 1A0DF7901EA7176500191349 /* WRNavigationBar_swiftTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A0DF78F1EA7176500191349 /* WRNavigationBar_swiftTests.swift */; }; - 1A0DF7B51EA7380600191349 /* SixthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A0DF7B41EA7380600191349 /* SixthViewController.swift */; }; - 1A0DF7B71EA7471B00191349 /* WeiBoMineController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A0DF7B61EA7471B00191349 /* WeiBoMineController.swift */; }; - 1A0DF7B91EA7521C00191349 /* BaseNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A0DF7B81EA7521C00191349 /* BaseNavigationController.swift */; }; - 1A869EDD1ECAA0C1006D96F8 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A869EDC1ECAA0C1006D96F8 /* BaseViewController.swift */; }; - 1A869EDF1ECAA36B006D96F8 /* CustomNavBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A869EDE1ECAA36B006D96F8 /* CustomNavBarController.swift */; }; - 1A96559C1ED6B64F00A89E30 /* CustomListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A96559B1ED6B64F00A89E30 /* CustomListController.swift */; }; - 1A96559E1ED6B8C600A89E30 /* MoveListController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A96559D1ED6B8C600A89E30 /* MoveListController.swift */; }; - 1A966E8D1EE048F60045FCB8 /* AntForestController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A966E8C1EE048F60045FCB8 /* AntForestController.swift */; }; - 1AADC3941F23088600BB73D9 /* AllTransparent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AADC3931F23088600BB73D9 /* AllTransparent.swift */; }; - 1AB702661EA9A43C006DBA79 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB702651EA9A43C006DBA79 /* SecondViewController.swift */; }; - 1AB7026A1EA9AC7A006DBA79 /* QQAppController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB702691EA9AC7A006DBA79 /* QQAppController.swift */; }; - 1AB7026C1EA9B753006DBA79 /* QQZoneController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AB7026B1EA9B753006DBA79 /* QQZoneController.swift */; }; - 1AD0140A1EDBFB4500A6893C /* ZhiHuController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AD014091EDBFB4500A6893C /* ZhiHuController.swift */; }; - 1AD014131EDC091F00A6893C /* QQMineController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AD014121EDC091F00A6893C /* QQMineController.swift */; }; - BA823A4F29CFCD6EEC3B52B9 /* Pods_WRNavigationBar_swift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 63C8A182323696F064D8660C /* Pods_WRNavigationBar_swift.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1A0DF78C1EA7176500191349 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1A0DF76F1EA7176500191349 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 1A0DF7761EA7176500191349; - remoteInfo = WRNavigationBar_swift; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 12CE35B721EEE1DD00F43FC1 /* WRCycleScrollView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRCycleScrollView.swift; path = WRNavigationBar_swift/WRCycleScrollView.swift; sourceTree = SOURCE_ROOT; }; - 12CE35B821EEE1DD00F43FC1 /* WRCycleCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRCycleCell.swift; path = WRNavigationBar_swift/WRCycleCell.swift; sourceTree = SOURCE_ROOT; }; - 12CE35B921EEE1DD00F43FC1 /* WRProxy.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRProxy.swift; path = WRNavigationBar_swift/WRProxy.swift; sourceTree = SOURCE_ROOT; }; - 12CE35BF21EEE2EC00F43FC1 /* WRNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRNavigationBar.swift; path = ../../WRNavigationBar/WRNavigationBar.swift; sourceTree = ""; }; - 12CE35C021EEE2EC00F43FC1 /* WRCustomNavigationBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WRCustomNavigationBar.swift; path = ../../WRNavigationBar/WRCustomNavigationBar.swift; sourceTree = ""; }; - 12CE35F221EEE37B00F43FC1 /* Image.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Image.swift; path = Kingfisher/Image.swift; sourceTree = ""; }; - 12CE35F321EEE37B00F43FC1 /* KingfisherManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = KingfisherManager.swift; path = Kingfisher/KingfisherManager.swift; sourceTree = ""; }; - 12CE35F421EEE37B00F43FC1 /* Kingfisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Kingfisher.swift; path = Kingfisher/Kingfisher.swift; sourceTree = ""; }; - 12CE35F521EEE37B00F43FC1 /* CacheSerializer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CacheSerializer.swift; path = Kingfisher/CacheSerializer.swift; sourceTree = ""; }; - 12CE35F621EEE37B00F43FC1 /* String+MD5.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "String+MD5.swift"; path = "Kingfisher/String+MD5.swift"; sourceTree = ""; }; - 12CE35F721EEE37B00F43FC1 /* KingfisherOptionsInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = KingfisherOptionsInfo.swift; path = Kingfisher/KingfisherOptionsInfo.swift; sourceTree = ""; }; - 12CE35F821EEE37B00F43FC1 /* ImageDownloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageDownloader.swift; path = Kingfisher/ImageDownloader.swift; sourceTree = ""; }; - 12CE35F921EEE37B00F43FC1 /* Resource.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Resource.swift; path = Kingfisher/Resource.swift; sourceTree = ""; }; - 12CE35FA21EEE37B00F43FC1 /* AnimatedImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AnimatedImageView.swift; path = Kingfisher/AnimatedImageView.swift; sourceTree = ""; }; - 12CE35FB21EEE37B00F43FC1 /* Kingfisher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Kingfisher.h; path = Kingfisher/Kingfisher.h; sourceTree = ""; }; - 12CE35FC21EEE37B00F43FC1 /* ImageTransition.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageTransition.swift; path = Kingfisher/ImageTransition.swift; sourceTree = ""; }; - 12CE35FD21EEE37B00F43FC1 /* ImagePrefetcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImagePrefetcher.swift; path = Kingfisher/ImagePrefetcher.swift; sourceTree = ""; }; - 12CE35FE21EEE37B00F43FC1 /* Box.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Box.swift; path = Kingfisher/Box.swift; sourceTree = ""; }; - 12CE35FF21EEE37B00F43FC1 /* Filter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Kingfisher/Filter.swift; sourceTree = ""; }; - 12CE360021EEE37B00F43FC1 /* Placeholder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Placeholder.swift; path = Kingfisher/Placeholder.swift; sourceTree = ""; }; - 12CE360121EEE37B00F43FC1 /* RequestModifier.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = RequestModifier.swift; path = Kingfisher/RequestModifier.swift; sourceTree = ""; }; - 12CE360221EEE37B00F43FC1 /* ImageProcessor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageProcessor.swift; path = Kingfisher/ImageProcessor.swift; sourceTree = ""; }; - 12CE360321EEE37B00F43FC1 /* ThreadHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ThreadHelper.swift; path = Kingfisher/ThreadHelper.swift; sourceTree = ""; }; - 12CE360421EEE37B00F43FC1 /* UIButton+Kingfisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "UIButton+Kingfisher.swift"; path = "Kingfisher/UIButton+Kingfisher.swift"; sourceTree = ""; }; - 12CE360521EEE37B00F43FC1 /* ImageView+Kingfisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "ImageView+Kingfisher.swift"; path = "Kingfisher/ImageView+Kingfisher.swift"; sourceTree = ""; }; - 12CE360621EEE37B00F43FC1 /* FormatIndicatedCacheSerializer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FormatIndicatedCacheSerializer.swift; path = Kingfisher/FormatIndicatedCacheSerializer.swift; sourceTree = ""; }; - 12CE360721EEE37B00F43FC1 /* ImageCache.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageCache.swift; path = Kingfisher/ImageCache.swift; sourceTree = ""; }; - 12CE360821EEE37B00F43FC1 /* Indicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Indicator.swift; path = Kingfisher/Indicator.swift; sourceTree = ""; }; - 1A05B4751F07FAB4001D7B64 /* NormalListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NormalListController.swift; sourceTree = ""; }; - 1A05B4771F07FAD7001D7B64 /* ImageNavController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageNavController.swift; sourceTree = ""; }; - 1A05B4791F080D0B001D7B64 /* MillcolorGradController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MillcolorGradController.swift; sourceTree = ""; }; - 1A0DF7771EA7176500191349 /* WRNavigationBar_swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WRNavigationBar_swift.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 1A0DF77A1EA7176500191349 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 1A0DF77F1EA7176500191349 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 1A0DF7811EA7176500191349 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 1A0DF7841EA7176500191349 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 1A0DF7861EA7176500191349 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1A0DF78B1EA7176500191349 /* WRNavigationBar_swiftTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WRNavigationBar_swiftTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 1A0DF78F1EA7176500191349 /* WRNavigationBar_swiftTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WRNavigationBar_swiftTests.swift; sourceTree = ""; }; - 1A0DF7911EA7176500191349 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1A0DF7B41EA7380600191349 /* SixthViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SixthViewController.swift; sourceTree = ""; }; - 1A0DF7B61EA7471B00191349 /* WeiBoMineController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WeiBoMineController.swift; sourceTree = ""; }; - 1A0DF7B81EA7521C00191349 /* BaseNavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = BaseNavigationController.swift; path = Demos/BaseNavigationController.swift; sourceTree = ""; }; - 1A869EDC1ECAA0C1006D96F8 /* BaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = ""; }; - 1A869EDE1ECAA36B006D96F8 /* CustomNavBarController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomNavBarController.swift; sourceTree = ""; }; - 1A96559B1ED6B64F00A89E30 /* CustomListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomListController.swift; sourceTree = ""; }; - 1A96559D1ED6B8C600A89E30 /* MoveListController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoveListController.swift; sourceTree = ""; }; - 1A966E8C1EE048F60045FCB8 /* AntForestController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AntForestController.swift; sourceTree = ""; }; - 1AADC3931F23088600BB73D9 /* AllTransparent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AllTransparent.swift; sourceTree = ""; }; - 1AB702651EA9A43C006DBA79 /* SecondViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = ""; }; - 1AB702691EA9AC7A006DBA79 /* QQAppController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QQAppController.swift; sourceTree = ""; }; - 1AB7026B1EA9B753006DBA79 /* QQZoneController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QQZoneController.swift; sourceTree = ""; }; - 1AD014091EDBFB4500A6893C /* ZhiHuController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZhiHuController.swift; sourceTree = ""; }; - 1AD014121EDC091F00A6893C /* QQMineController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = QQMineController.swift; sourceTree = ""; }; - 272C2A7862DC39DA91D57781 /* Pods-WRNavigationBar_swift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift.release.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.release.xcconfig"; sourceTree = ""; }; - 63C8A182323696F064D8660C /* Pods_WRNavigationBar_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WRNavigationBar_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D76868588A082EB7E7777210 /* Pods-WRNavigationBar_swift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift/Pods-WRNavigationBar_swift.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1A0DF7741EA7176500191349 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - BA823A4F29CFCD6EEC3B52B9 /* Pods_WRNavigationBar_swift.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1A0DF7881EA7176500191349 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 12CE35BD21EEE2CD00F43FC1 /* WRCycleScrollView */ = { - isa = PBXGroup; - children = ( - 12CE35B821EEE1DD00F43FC1 /* WRCycleCell.swift */, - 12CE35B721EEE1DD00F43FC1 /* WRCycleScrollView.swift */, - 12CE35B921EEE1DD00F43FC1 /* WRProxy.swift */, - ); - name = WRCycleScrollView; - sourceTree = ""; - }; - 12CE35BE21EEE2D800F43FC1 /* WRNavigationBar */ = { - isa = PBXGroup; - children = ( - 12CE35C021EEE2EC00F43FC1 /* WRCustomNavigationBar.swift */, - 12CE35BF21EEE2EC00F43FC1 /* WRNavigationBar.swift */, - ); - name = WRNavigationBar; - sourceTree = ""; - }; - 12CE35F121EEE36A00F43FC1 /* Kingfisher */ = { - isa = PBXGroup; - children = ( - 12CE35FA21EEE37B00F43FC1 /* AnimatedImageView.swift */, - 12CE35FE21EEE37B00F43FC1 /* Box.swift */, - 12CE35F521EEE37B00F43FC1 /* CacheSerializer.swift */, - 12CE35FF21EEE37B00F43FC1 /* Filter.swift */, - 12CE360621EEE37B00F43FC1 /* FormatIndicatedCacheSerializer.swift */, - 12CE35F221EEE37B00F43FC1 /* Image.swift */, - 12CE360721EEE37B00F43FC1 /* ImageCache.swift */, - 12CE35F821EEE37B00F43FC1 /* ImageDownloader.swift */, - 12CE35FD21EEE37B00F43FC1 /* ImagePrefetcher.swift */, - 12CE360221EEE37B00F43FC1 /* ImageProcessor.swift */, - 12CE35FC21EEE37B00F43FC1 /* ImageTransition.swift */, - 12CE360521EEE37B00F43FC1 /* ImageView+Kingfisher.swift */, - 12CE360821EEE37B00F43FC1 /* Indicator.swift */, - 12CE35FB21EEE37B00F43FC1 /* Kingfisher.h */, - 12CE35F421EEE37B00F43FC1 /* Kingfisher.swift */, - 12CE35F321EEE37B00F43FC1 /* KingfisherManager.swift */, - 12CE35F721EEE37B00F43FC1 /* KingfisherOptionsInfo.swift */, - 12CE360021EEE37B00F43FC1 /* Placeholder.swift */, - 12CE360121EEE37B00F43FC1 /* RequestModifier.swift */, - 12CE35F921EEE37B00F43FC1 /* Resource.swift */, - 12CE35F621EEE37B00F43FC1 /* String+MD5.swift */, - 12CE360321EEE37B00F43FC1 /* ThreadHelper.swift */, - 12CE360421EEE37B00F43FC1 /* UIButton+Kingfisher.swift */, - ); - name = Kingfisher; - sourceTree = ""; - }; - 1A0DF76E1EA7176500191349 = { - isa = PBXGroup; - children = ( - 1A0DF7791EA7176500191349 /* WRNavigationBar_swift */, - 1A0DF78E1EA7176500191349 /* WRNavigationBar_swiftTests */, - 1A0DF7781EA7176500191349 /* Products */, - 3DD6CC0BB5CD77C87CA6E111 /* Pods */, - C0FFEBF49771A4C61FC2F583 /* Frameworks */, - ); - sourceTree = ""; - }; - 1A0DF7781EA7176500191349 /* Products */ = { - isa = PBXGroup; - children = ( - 1A0DF7771EA7176500191349 /* WRNavigationBar_swift.app */, - 1A0DF78B1EA7176500191349 /* WRNavigationBar_swiftTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 1A0DF7791EA7176500191349 /* WRNavigationBar_swift */ = { - isa = PBXGroup; - children = ( - 12CE35F121EEE36A00F43FC1 /* Kingfisher */, - 12CE35BE21EEE2D800F43FC1 /* WRNavigationBar */, - 12CE35BD21EEE2CD00F43FC1 /* WRCycleScrollView */, - 1A0DF77A1EA7176500191349 /* AppDelegate.swift */, - 1A0DF7B81EA7521C00191349 /* BaseNavigationController.swift */, - 1A0DF7B11EA7370000191349 /* 普通 */, - 1A6FB6F51ED023EE0098622A /* 自定义导航栏 */, - 1A96559A1ED6B5AB00A89E30 /* 移动导航栏 */, - 1A0DF77E1EA7176500191349 /* Main.storyboard */, - 1A0DF7811EA7176500191349 /* Assets.xcassets */, - 1A0DF7831EA7176500191349 /* LaunchScreen.storyboard */, - 1A0DF7861EA7176500191349 /* Info.plist */, - ); - path = WRNavigationBar_swift; - sourceTree = ""; - }; - 1A0DF78E1EA7176500191349 /* WRNavigationBar_swiftTests */ = { - isa = PBXGroup; - children = ( - 1A0DF78F1EA7176500191349 /* WRNavigationBar_swiftTests.swift */, - 1A0DF7911EA7176500191349 /* Info.plist */, - ); - path = WRNavigationBar_swiftTests; - sourceTree = ""; - }; - 1A0DF7B11EA7370000191349 /* 普通 */ = { - isa = PBXGroup; - children = ( - 1A05B4751F07FAB4001D7B64 /* NormalListController.swift */, - 1A0DF7B61EA7471B00191349 /* WeiBoMineController.swift */, - 1AB702691EA9AC7A006DBA79 /* QQAppController.swift */, - 1AB7026B1EA9B753006DBA79 /* QQZoneController.swift */, - 1AD014091EDBFB4500A6893C /* ZhiHuController.swift */, - 1AD014121EDC091F00A6893C /* QQMineController.swift */, - 1A966E8C1EE048F60045FCB8 /* AntForestController.swift */, - 1AADC3931F23088600BB73D9 /* AllTransparent.swift */, - ); - name = "普通"; - path = Demos; - sourceTree = ""; - }; - 1A6FB6F51ED023EE0098622A /* 自定义导航栏 */ = { - isa = PBXGroup; - children = ( - 1A869EDC1ECAA0C1006D96F8 /* BaseViewController.swift */, - 1A96559B1ED6B64F00A89E30 /* CustomListController.swift */, - 1A869EDE1ECAA36B006D96F8 /* CustomNavBarController.swift */, - 1A05B4771F07FAD7001D7B64 /* ImageNavController.swift */, - 1A05B4791F080D0B001D7B64 /* MillcolorGradController.swift */, - ); - name = "自定义导航栏"; - path = Demos; - sourceTree = ""; - }; - 1A96559A1ED6B5AB00A89E30 /* 移动导航栏 */ = { - isa = PBXGroup; - children = ( - 1A96559D1ED6B8C600A89E30 /* MoveListController.swift */, - 1AB702651EA9A43C006DBA79 /* SecondViewController.swift */, - 1A0DF7B41EA7380600191349 /* SixthViewController.swift */, - ); - name = "移动导航栏"; - path = Demos; - sourceTree = ""; - }; - 3DD6CC0BB5CD77C87CA6E111 /* Pods */ = { - isa = PBXGroup; - children = ( - D76868588A082EB7E7777210 /* Pods-WRNavigationBar_swift.debug.xcconfig */, - 272C2A7862DC39DA91D57781 /* Pods-WRNavigationBar_swift.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - C0FFEBF49771A4C61FC2F583 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 63C8A182323696F064D8660C /* Pods_WRNavigationBar_swift.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1A0DF7761EA7176500191349 /* WRNavigationBar_swift */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1A0DF7941EA7176500191349 /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift" */; - buildPhases = ( - 8B07B81DC9245E9840A20E2B /* [CP] Check Pods Manifest.lock */, - 1A0DF7731EA7176500191349 /* Sources */, - 1A0DF7741EA7176500191349 /* Frameworks */, - 1A0DF7751EA7176500191349 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = WRNavigationBar_swift; - productName = WRNavigationBar_swift; - productReference = 1A0DF7771EA7176500191349 /* WRNavigationBar_swift.app */; - productType = "com.apple.product-type.application"; - }; - 1A0DF78A1EA7176500191349 /* WRNavigationBar_swiftTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1A0DF7971EA7176500191349 /* Build configuration list for PBXNativeTarget "WRNavigationBar_swiftTests" */; - buildPhases = ( - 1A0DF7871EA7176500191349 /* Sources */, - 1A0DF7881EA7176500191349 /* Frameworks */, - 1A0DF7891EA7176500191349 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 1A0DF78D1EA7176500191349 /* PBXTargetDependency */, - ); - name = WRNavigationBar_swiftTests; - productName = WRNavigationBar_swiftTests; - productReference = 1A0DF78B1EA7176500191349 /* WRNavigationBar_swiftTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1A0DF76F1EA7176500191349 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0810; - LastUpgradeCheck = 0900; - ORGANIZATIONNAME = wangrui; - TargetAttributes = { - 1A0DF7761EA7176500191349 = { - CreatedOnToolsVersion = 8.1; - DevelopmentTeam = P3X2725LYY; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - }; - 1A0DF78A1EA7176500191349 = { - CreatedOnToolsVersion = 8.1; - DevelopmentTeam = P3X2725LYY; - LastSwiftMigration = 0900; - ProvisioningStyle = Automatic; - TestTargetID = 1A0DF7761EA7176500191349; - }; - }; - }; - buildConfigurationList = 1A0DF7721EA7176500191349 /* Build configuration list for PBXProject "WRNavigationBar_swift" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 1A0DF76E1EA7176500191349; - productRefGroup = 1A0DF7781EA7176500191349 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1A0DF7761EA7176500191349 /* WRNavigationBar_swift */, - 1A0DF78A1EA7176500191349 /* WRNavigationBar_swiftTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 1A0DF7751EA7176500191349 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1A0DF7851EA7176500191349 /* LaunchScreen.storyboard in Resources */, - 1A0DF7821EA7176500191349 /* Assets.xcassets in Resources */, - 1A0DF7801EA7176500191349 /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1A0DF7891EA7176500191349 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 8B07B81DC9245E9840A20E2B /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-WRNavigationBar_swift-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 1A0DF7731EA7176500191349 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 12CE35BA21EEE1DD00F43FC1 /* WRCycleScrollView.swift in Sources */, - 12CE360921EEE37C00F43FC1 /* Image.swift in Sources */, - 1A869EDF1ECAA36B006D96F8 /* CustomNavBarController.swift in Sources */, - 12CE361621EEE37C00F43FC1 /* Placeholder.swift in Sources */, - 12CE361821EEE37C00F43FC1 /* ImageProcessor.swift in Sources */, - 12CE361921EEE37C00F43FC1 /* ThreadHelper.swift in Sources */, - 12CE361321EEE37C00F43FC1 /* ImagePrefetcher.swift in Sources */, - 12CE360A21EEE37C00F43FC1 /* KingfisherManager.swift in Sources */, - 12CE360C21EEE37C00F43FC1 /* CacheSerializer.swift in Sources */, - 12CE35C121EEE2EC00F43FC1 /* WRNavigationBar.swift in Sources */, - 1AD014131EDC091F00A6893C /* QQMineController.swift in Sources */, - 1AB7026C1EA9B753006DBA79 /* QQZoneController.swift in Sources */, - 1A05B47A1F080D0B001D7B64 /* MillcolorGradController.swift in Sources */, - 12CE35BB21EEE1DD00F43FC1 /* WRCycleCell.swift in Sources */, - 12CE361721EEE37C00F43FC1 /* RequestModifier.swift in Sources */, - 12CE361021EEE37C00F43FC1 /* Resource.swift in Sources */, - 1A05B4781F07FAD7001D7B64 /* ImageNavController.swift in Sources */, - 12CE361A21EEE37C00F43FC1 /* UIButton+Kingfisher.swift in Sources */, - 1A96559E1ED6B8C600A89E30 /* MoveListController.swift in Sources */, - 12CE361221EEE37C00F43FC1 /* ImageTransition.swift in Sources */, - 12CE361C21EEE37C00F43FC1 /* FormatIndicatedCacheSerializer.swift in Sources */, - 12CE360B21EEE37C00F43FC1 /* Kingfisher.swift in Sources */, - 12CE361D21EEE37C00F43FC1 /* ImageCache.swift in Sources */, - 12CE35C221EEE2EC00F43FC1 /* WRCustomNavigationBar.swift in Sources */, - 12CE360E21EEE37C00F43FC1 /* KingfisherOptionsInfo.swift in Sources */, - 1AD0140A1EDBFB4500A6893C /* ZhiHuController.swift in Sources */, - 12CE360F21EEE37C00F43FC1 /* ImageDownloader.swift in Sources */, - 1A869EDD1ECAA0C1006D96F8 /* BaseViewController.swift in Sources */, - 12CE361121EEE37C00F43FC1 /* AnimatedImageView.swift in Sources */, - 1A05B4761F07FAB4001D7B64 /* NormalListController.swift in Sources */, - 1A0DF7B51EA7380600191349 /* SixthViewController.swift in Sources */, - 1AB7026A1EA9AC7A006DBA79 /* QQAppController.swift in Sources */, - 12CE361521EEE37C00F43FC1 /* Filter.swift in Sources */, - 1A0DF77B1EA7176500191349 /* AppDelegate.swift in Sources */, - 12CE361B21EEE37C00F43FC1 /* ImageView+Kingfisher.swift in Sources */, - 1A966E8D1EE048F60045FCB8 /* AntForestController.swift in Sources */, - 1A96559C1ED6B64F00A89E30 /* CustomListController.swift in Sources */, - 1AB702661EA9A43C006DBA79 /* SecondViewController.swift in Sources */, - 12CE361421EEE37C00F43FC1 /* Box.swift in Sources */, - 12CE360D21EEE37C00F43FC1 /* String+MD5.swift in Sources */, - 1A0DF7B91EA7521C00191349 /* BaseNavigationController.swift in Sources */, - 1AADC3941F23088600BB73D9 /* AllTransparent.swift in Sources */, - 12CE35BC21EEE1DD00F43FC1 /* WRProxy.swift in Sources */, - 12CE361E21EEE37C00F43FC1 /* Indicator.swift in Sources */, - 1A0DF7B71EA7471B00191349 /* WeiBoMineController.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1A0DF7871EA7176500191349 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1A0DF7901EA7176500191349 /* WRNavigationBar_swiftTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1A0DF78D1EA7176500191349 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 1A0DF7761EA7176500191349 /* WRNavigationBar_swift */; - targetProxy = 1A0DF78C1EA7176500191349 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 1A0DF77E1EA7176500191349 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1A0DF77F1EA7176500191349 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 1A0DF7831EA7176500191349 /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 1A0DF7841EA7176500191349 /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 1A0DF7921EA7176500191349 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 1A0DF7931EA7176500191349 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_SUSPICIOUS_MOVES = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 1A0DF7951EA7176500191349 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D76868588A082EB7E7777210 /* Pods-WRNavigationBar_swift.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = P3X2725LYY; - INFOPLIST_FILE = WRNavigationBar_swift/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = video.com.wangrui; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Debug; - }; - 1A0DF7961EA7176500191349 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 272C2A7862DC39DA91D57781 /* Pods-WRNavigationBar_swift.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = P3X2725LYY; - INFOPLIST_FILE = WRNavigationBar_swift/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = video.com.wangrui; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = 1; - }; - name = Release; - }; - 1A0DF7981EA7176500191349 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = P3X2725LYY; - INFOPLIST_FILE = WRNavigationBar_swiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "video.wangrui.com.WRNavigationBar-swiftTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WRNavigationBar_swift.app/WRNavigationBar_swift"; - }; - name = Debug; - }; - 1A0DF7991EA7176500191349 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - BUNDLE_LOADER = "$(TEST_HOST)"; - DEVELOPMENT_TEAM = P3X2725LYY; - INFOPLIST_FILE = WRNavigationBar_swiftTests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "video.wangrui.com.WRNavigationBar-swiftTests"; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WRNavigationBar_swift.app/WRNavigationBar_swift"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1A0DF7721EA7176500191349 /* Build configuration list for PBXProject "WRNavigationBar_swift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1A0DF7921EA7176500191349 /* Debug */, - 1A0DF7931EA7176500191349 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1A0DF7941EA7176500191349 /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1A0DF7951EA7176500191349 /* Debug */, - 1A0DF7961EA7176500191349 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1A0DF7971EA7176500191349 /* Build configuration list for PBXNativeTarget "WRNavigationBar_swiftTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1A0DF7981EA7176500191349 /* Debug */, - 1A0DF7991EA7176500191349 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1A0DF76F1EA7176500191349 /* Project object */; -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Base.lproj/LaunchScreen.storyboard b/WRNavigationBar_swift/WRNavigationBar_swift/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index fdf3f97..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/AnimatedImageView.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/AnimatedImageView.swift deleted file mode 100755 index e952889..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/AnimatedImageView.swift +++ /dev/null @@ -1,373 +0,0 @@ -// -// AnimatableImageView.swift -// Kingfisher -// -// Created by bl4ckra1sond3tre on 4/22/16. -// -// The AnimatableImageView, AnimatedFrame and Animator is a modified version of -// some classes from kaishin's Gifu project (https://github.com/kaishin/Gifu) -// -// The MIT License (MIT) -// -// Copyright (c) 2017 Reda Lemeden. -// -// 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: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// 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. -// -// The name and characters used in the demo of this software are property of their -// respective owners. - -import UIKit -import ImageIO - -/// `AnimatedImageView` is a subclass of `UIImageView` for displaying animated image. -open class AnimatedImageView: UIImageView { - - /// Proxy object for prevending a reference cycle between the CADDisplayLink and AnimatedImageView. - class TargetProxy { - private weak var target: AnimatedImageView? - - init(target: AnimatedImageView) { - self.target = target - } - - @objc func onScreenUpdate() { - target?.updateFrame() - } - } - - // MARK: - Public property - /// Whether automatically play the animation when the view become visible. Default is true. - public var autoPlayAnimatedImage = true - - /// The size of the frame cache. - public var framePreloadCount = 10 - - /// Specifies whether the GIF frames should be pre-scaled to save memory. Default is true. - public var needsPrescaling = true - - /// The animation timer's run loop mode. Default is `NSRunLoopCommonModes`. Set this property to `NSDefaultRunLoopMode` will make the animation pause during UIScrollView scrolling. - public var runLoopMode = RunLoop.Mode.common { - willSet { - if runLoopMode == newValue { - return - } else { - stopAnimating() - displayLink.remove(from: .main, forMode: runLoopMode) - displayLink.add(to: .main, forMode: newValue) - startAnimating() - } - } - } - - // MARK: - Private property - /// `Animator` instance that holds the frames of a specific image in memory. - private var animator: Animator? - - /// A flag to avoid invalidating the displayLink on deinit if it was never created, because displayLink is so lazy. :D - private var isDisplayLinkInitialized: Bool = false - - /// A display link that keeps calling the `updateFrame` method on every screen refresh. - private lazy var displayLink: CADisplayLink = { - self.isDisplayLinkInitialized = true - let displayLink = CADisplayLink(target: TargetProxy(target: self), selector: #selector(TargetProxy.onScreenUpdate)) - displayLink.add(to: .main, forMode: self.runLoopMode) - displayLink.isPaused = true - return displayLink - }() - - // MARK: - Override - override open var image: Image? { - didSet { - if image != oldValue { - reset() - } - setNeedsDisplay() - layer.setNeedsDisplay() - } - } - - deinit { - if isDisplayLinkInitialized { - displayLink.invalidate() - } - } - - override open var isAnimating: Bool { - if isDisplayLinkInitialized { - return !displayLink.isPaused - } else { - return super.isAnimating - } - } - - /// Starts the animation. - override open func startAnimating() { - if self.isAnimating { - return - } else { - displayLink.isPaused = false - } - } - - /// Stops the animation. - override open func stopAnimating() { - super.stopAnimating() - if isDisplayLinkInitialized { - displayLink.isPaused = true - } - } - - override open func display(_ layer: CALayer) { - if let currentFrame = animator?.currentFrame { - layer.contents = currentFrame.cgImage - } else { - layer.contents = image?.cgImage - } - } - - override open func didMoveToWindow() { - super.didMoveToWindow() - didMove() - } - - override open func didMoveToSuperview() { - super.didMoveToSuperview() - didMove() - } - - // This is for back compatibility that using regular UIImageView to show animated image. - override func shouldPreloadAllAnimation() -> Bool { - return false - } - - // MARK: - Private method - /// Reset the animator. - private func reset() { - animator = nil - if let imageSource = image?.kf.imageSource?.imageRef { - animator = Animator(imageSource: imageSource, contentMode: contentMode, size: bounds.size, framePreloadCount: framePreloadCount) - animator?.needsPrescaling = needsPrescaling - animator?.prepareFramesAsynchronously() - } - didMove() - } - - private func didMove() { - if autoPlayAnimatedImage && animator != nil { - if let _ = superview, let _ = window { - startAnimating() - } else { - stopAnimating() - } - } - } - - /// Update the current frame with the displayLink duration. - private func updateFrame() { - let duration: CFTimeInterval - - // CA based display link is opt-out from ProMotion by default. - // So the duration and its FPS might not match. - // See [#718](https://github.com/onevcat/Kingfisher/issues/718) - if #available(iOS 10.0, tvOS 10.0, *) { - // By setting CADisableMinimumFrameDuration to YES in Info.plist may - // cause the preferredFramesPerSecond being 0 - if displayLink.preferredFramesPerSecond == 0 { - duration = displayLink.duration - } else { - // Some devices (like iPad Pro 10.5) will have a different FPS. - duration = 1.0 / Double(displayLink.preferredFramesPerSecond) - } - } else { - duration = displayLink.duration - } - - if animator?.updateCurrentFrame(duration: duration) ?? false { - layer.setNeedsDisplay() - } - } -} - -/// Keeps a reference to an `Image` instance and its duration as a GIF frame. -struct AnimatedFrame { - var image: Image? - let duration: TimeInterval - - static let null: AnimatedFrame = AnimatedFrame(image: .none, duration: 0.0) -} - -// MARK: - Animator -class Animator { - // MARK: Private property - fileprivate let size: CGSize - fileprivate let maxFrameCount: Int - fileprivate let imageSource: CGImageSource - - fileprivate var animatedFrames = [AnimatedFrame]() - fileprivate let maxTimeStep: TimeInterval = 1.0 - fileprivate var frameCount = 0 - fileprivate var currentFrameIndex = 0 - fileprivate var currentPreloadIndex = 0 - fileprivate var timeSinceLastFrameChange: TimeInterval = 0.0 - fileprivate var needsPrescaling = true - - /// Loop count of animated image. - private var loopCount = 0 - - var currentFrame: UIImage? { - return frame(at: currentFrameIndex) - } - - var contentMode = UIView.ContentMode.scaleToFill - - private lazy var preloadQueue: DispatchQueue = { - return DispatchQueue(label: "com.onevcat.Kingfisher.Animator.preloadQueue") - }() - - /** - Init an animator with image source reference. - - - parameter imageSource: The reference of animated image. - - parameter contentMode: Content mode of AnimatedImageView. - - parameter size: Size of AnimatedImageView. - - parameter framePreloadCount: Frame cache size. - - - returns: The animator object. - */ - init(imageSource source: CGImageSource, contentMode mode: UIView.ContentMode, size: CGSize, framePreloadCount count: Int) { - self.imageSource = source - self.contentMode = mode - self.size = size - self.maxFrameCount = count - } - - func frame(at index: Int) -> Image? { - return animatedFrames[safe: index]?.image - } - - func prepareFramesAsynchronously() { - preloadQueue.async { [weak self] in - self?.prepareFrames() - } - } - - private func prepareFrames() { - frameCount = CGImageSourceGetCount(imageSource) - - if let properties = CGImageSourceCopyProperties(imageSource, nil), - let gifInfo = (properties as NSDictionary)[kCGImagePropertyGIFDictionary as String] as? NSDictionary, - let loopCount = gifInfo[kCGImagePropertyGIFLoopCount as String] as? Int - { - self.loopCount = loopCount - } - - let frameToProcess = min(frameCount, maxFrameCount) - animatedFrames.reserveCapacity(frameToProcess) - animatedFrames = (0.. AnimatedFrame { - - guard let imageRef = CGImageSourceCreateImageAtIndex(imageSource, index, nil) else { - return AnimatedFrame.null - } - - let defaultGIFFrameDuration = 0.100 - let frameDuration = imageSource.kf.gifProperties(at: index).map { - gifInfo -> Double in - - let unclampedDelayTime = gifInfo[kCGImagePropertyGIFUnclampedDelayTime as String] as Double? - let delayTime = gifInfo[kCGImagePropertyGIFDelayTime as String] as Double? - let duration = unclampedDelayTime ?? delayTime ?? 0.0 - - /** - http://opensource.apple.com/source/WebCore/WebCore-7600.1.25/platform/graphics/cg/ImageSourceCG.cpp - Many annoying ads specify a 0 duration to make an image flash as quickly as - possible. We follow Safari and Firefox's behavior and use a duration of 100 ms - for any frames that specify a duration of <= 10 ms. - See and for more information. - - See also: http://nullsleep.tumblr.com/post/16524517190/animated-gif-minimum-frame-delay-browser. - */ - return duration > 0.011 ? duration : defaultGIFFrameDuration - } ?? defaultGIFFrameDuration - - let image = Image(cgImage: imageRef) - let scaledImage: Image? - - if needsPrescaling { - scaledImage = image.kf.resize(to: size, for: contentMode) - } else { - scaledImage = image - } - - return AnimatedFrame(image: scaledImage, duration: frameDuration) - } - - /** - Updates the current frame if necessary using the frame timer and the duration of each frame in `animatedFrames`. - */ - func updateCurrentFrame(duration: CFTimeInterval) -> Bool { - timeSinceLastFrameChange += min(maxTimeStep, duration) - guard let frameDuration = animatedFrames[safe: currentFrameIndex]?.duration, frameDuration <= timeSinceLastFrameChange else { - return false - } - - timeSinceLastFrameChange -= frameDuration - - let lastFrameIndex = currentFrameIndex - currentFrameIndex += 1 - currentFrameIndex = currentFrameIndex % animatedFrames.count - - if animatedFrames.count < frameCount { - preloadFrameAsynchronously(at: lastFrameIndex) - } - return true - } - - private func preloadFrameAsynchronously(at index: Int) { - preloadQueue.async { [weak self] in - self?.preloadFrame(at: index) - } - } - - private func preloadFrame(at index: Int) { - animatedFrames[index] = prepareFrame(at: currentPreloadIndex) - currentPreloadIndex += 1 - currentPreloadIndex = currentPreloadIndex % frameCount - } -} - -extension CGImageSource: KingfisherCompatible { } -extension Kingfisher where Base: CGImageSource { - func gifProperties(at index: Int) -> [String: Double]? { - let properties = CGImageSourceCopyPropertiesAtIndex(base, index, nil) as Dictionary? - return properties?[kCGImagePropertyGIFDictionary] as? [String: Double] - } -} - -extension Array { - subscript(safe index: Int) -> Element? { - return indices ~= index ? self[index] : nil - } -} - -private func pure(_ value: T) -> [T] { - return [value] -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Box.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Box.swift deleted file mode 100644 index 7076add..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Box.swift +++ /dev/null @@ -1,16 +0,0 @@ -// -// Box.swift -// Kingfisher -// -// Created by WANG WEI on 2016/09/12. -// Copyright © 2016年 Wei Wang. All rights reserved. -// - -import Foundation - -class Box { - let value: T - init(value: T) { - self.value = value - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/CacheSerializer.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/CacheSerializer.swift deleted file mode 100644 index 9d4ec7d..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/CacheSerializer.swift +++ /dev/null @@ -1,87 +0,0 @@ -// -// CacheSerializer.swift -// Kingfisher -// -// Created by Wei Wang on 2016/09/02. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -import Foundation - -/// An `CacheSerializer` would be used to convert some data to an image object for -/// retrieving from disk cache and vice versa for storing to disk cache. -public protocol CacheSerializer { - - /// Get the serialized data from a provided image - /// and optional original data for caching to disk. - /// - /// - /// - parameter image: The image needed to be serialized. - /// - parameter original: The original data which is just downloaded. - /// If the image is retrieved from cache instead of - /// downloaded, it will be `nil`. - /// - /// - returns: A data which will be stored to cache, or `nil` when no valid - /// data could be serialized. - func data(with image: Image, original: Data?) -> Data? - - /// Get an image deserialized from provided data. - /// - /// - parameter data: The data from which an image should be deserialized. - /// - parameter options: Options for deserialization. - /// - /// - returns: An image deserialized or `nil` when no valid image - /// could be deserialized. - func image(with data: Data, options: KingfisherOptionsInfo?) -> Image? -} - - -/// `DefaultCacheSerializer` is a basic `CacheSerializer` used in default cache of -/// Kingfisher. It could serialize and deserialize PNG, JEPG and GIF images. For -/// image other than these formats, a normalized `pngRepresentation` will be used. -public struct DefaultCacheSerializer: CacheSerializer { - - public static let `default` = DefaultCacheSerializer() - private init() {} - - public func data(with image: Image, original: Data?) -> Data? { - let imageFormat = original?.kf.imageFormat ?? .unknown - - let data: Data? - switch imageFormat { - case .PNG: data = image.kf.pngRepresentation() - case .JPEG: data = image.kf.jpegRepresentation(compressionQuality: 1.0) - case .GIF: data = image.kf.gifRepresentation() - case .unknown: data = original ?? image.kf.normalized.kf.pngRepresentation() - } - - return data - } - - public func image(with data: Data, options: KingfisherOptionsInfo?) -> Image? { - let options = options ?? KingfisherEmptyOptionsInfo - return Kingfisher.image( - data: data, - scale: options.scaleFactor, - preloadAllAnimationData: options.preloadAllAnimationData, - onlyFirstFrame: options.onlyLoadFirstFrame) - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Filter.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Filter.swift deleted file mode 100644 index b2f4504..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Filter.swift +++ /dev/null @@ -1,137 +0,0 @@ -// -// Filter.swift -// Kingfisher -// -// Created by Wei Wang on 2016/08/31. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - - - -import CoreImage -import Accelerate - -// Reuse the same CI Context for all CI drawing. -private let ciContext = CIContext(options: nil) - -/// Transformer method which will be used in to provide a `Filter`. -public typealias Transformer = (CIImage) -> CIImage? - -/// Supply a filter to create an `ImageProcessor`. -public protocol CIImageProcessor: ImageProcessor { - var filter: Filter { get } -} - -extension CIImageProcessor { - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - switch item { - case .image(let image): - return image.kf.apply(filter) - case .data(_): - return (DefaultImageProcessor.default >> self).process(item: item, options: options) - } - } -} - -/// Wrapper for a `Transformer` of CIImage filters. -public struct Filter { - - let transform: Transformer - - public init(tranform: @escaping Transformer) { - self.transform = tranform - } - - /// Tint filter which will apply a tint color to images. - public static var tint: (Color) -> Filter = { - color in - Filter { input in - let colorFilter = CIFilter(name: "CIConstantColorGenerator")! - colorFilter.setValue(CIColor(color: color), forKey: kCIInputColorKey) - - let colorImage = colorFilter.outputImage - let filter = CIFilter(name: "CISourceOverCompositing")! - filter.setValue(colorImage, forKey: kCIInputImageKey) - filter.setValue(input, forKey: kCIInputBackgroundImageKey) - #if swift(>=4.0) - return filter.outputImage?.cropped(to: input.extent) - #else - return filter.outputImage?.cropping(to: input.extent) - #endif - } - } - - public typealias ColorElement = (CGFloat, CGFloat, CGFloat, CGFloat) - - /// Color control filter which will apply color control change to images. - public static var colorControl: (ColorElement) -> Filter = { arg -> Filter in - let (brightness, contrast, saturation, inputEV) = arg - return Filter { input in - let paramsColor = [kCIInputBrightnessKey: brightness, - kCIInputContrastKey: contrast, - kCIInputSaturationKey: saturation] - - let paramsExposure = [kCIInputEVKey: inputEV] - #if swift(>=4.0) - let blackAndWhite = input.applyingFilter("CIColorControls", parameters: paramsColor) - return blackAndWhite.applyingFilter("CIExposureAdjust", parameters: paramsExposure) - #else - let blackAndWhite = input.applyingFilter("CIColorControls", withInputParameters: paramsColor) - return blackAndWhite.applyingFilter("CIExposureAdjust", withInputParameters: paramsExposure) - #endif - } - - } -} - -extension Kingfisher where Base: Image { - /// Apply a `Filter` containing `CIImage` transformer to `self`. - /// - /// - parameter filter: The filter used to transform `self`. - /// - /// - returns: A transformed image by input `Filter`. - /// - /// - Note: Only CG-based images are supported. If any error happens during transforming, `self` will be returned. - public func apply(_ filter: Filter) -> Image { - - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Tint image only works for CG-based image.") - return base - } - - let inputImage = CIImage(cgImage: cgImage) - guard let outputImage = filter.transform(inputImage) else { - return base - } - - guard let result = ciContext.createCGImage(outputImage, from: outputImage.extent) else { - assertionFailure("[Kingfisher] Can not make an tint image within context.") - return base - } - - #if os(macOS) - return fixedForRetinaPixel(cgImage: result, to: size) - #else - return Image(cgImage: result, scale: base.scale, orientation: base.imageOrientation) - #endif - } - -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/FormatIndicatedCacheSerializer.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/FormatIndicatedCacheSerializer.swift deleted file mode 100644 index 9014e37..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/FormatIndicatedCacheSerializer.swift +++ /dev/null @@ -1,96 +0,0 @@ -// -// RequestModifier.swift -// Kingfisher -// -// Created by Junyu Kuang on 5/28/17. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -import Foundation - -/// `FormatIndicatedCacheSerializer` let you indicate an image format for serialized caches. -/// -/// It could serialize and deserialize PNG, JEPG and GIF images. For -/// image other than these formats, a normalized `pngRepresentation` will be used. -/// -/// Example: -/// ```` -/// private let profileImageSize = CGSize(width: 44, height: 44) -/// -/// private let imageProcessor = RoundCornerImageProcessor( -/// cornerRadius: profileImageSize.width / 2, targetSize: profileImageSize) -/// -/// private let optionsInfo: KingfisherOptionsInfo = [ -/// .cacheSerializer(FormatIndicatedCacheSerializer.png), -/// .backgroundDecode, .processor(imageProcessor), .scaleFactor(UIScreen.main.scale)] -/// -/// extension UIImageView { -/// func setProfileImage(with url: URL) { -/// // Image will always cached as PNG format to preserve alpha channel for round rect. -/// _ = kf.setImage(with: url, options: optionsInfo) -/// } -///} -/// ```` -public struct FormatIndicatedCacheSerializer: CacheSerializer { - - public static let png = FormatIndicatedCacheSerializer(imageFormat: .PNG) - public static let jpeg = FormatIndicatedCacheSerializer(imageFormat: .JPEG) - public static let gif = FormatIndicatedCacheSerializer(imageFormat: .GIF) - - /// The indicated image format. - private let imageFormat: ImageFormat - - public func data(with image: Image, original: Data?) -> Data? { - - func imageData(withFormat imageFormat: ImageFormat) -> Data? { - switch imageFormat { - case .PNG: return image.kf.pngRepresentation() - case .JPEG: return image.kf.jpegRepresentation(compressionQuality: 1.0) - case .GIF: return image.kf.gifRepresentation() - case .unknown: return nil - } - } - - // generate data with indicated image format - if let data = imageData(withFormat: imageFormat) { - return data - } - - let originalFormat = original?.kf.imageFormat ?? .unknown - - // generate data with original image's format - if originalFormat != imageFormat, let data = imageData(withFormat: originalFormat) { - return data - } - - return original ?? image.kf.normalized.kf.pngRepresentation() - } - - /// Same implementation as `DefaultCacheSerializer`. - public func image(with data: Data, options: KingfisherOptionsInfo?) -> Image? { - let options = options ?? KingfisherEmptyOptionsInfo - return Kingfisher.image( - data: data, - scale: options.scaleFactor, - preloadAllAnimationData: options.preloadAllAnimationData, - onlyFirstFrame: options.onlyLoadFirstFrame) - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Image.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Image.swift deleted file mode 100755 index b29039b..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Image.swift +++ /dev/null @@ -1,943 +0,0 @@ -// -// Image.swift -// Kingfisher -// -// Created by Wei Wang on 16/1/6. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - - -#if os(macOS) -import AppKit -private var imagesKey: Void? -private var durationKey: Void? -#else -import UIKit -import MobileCoreServices -private var imageSourceKey: Void? -#endif -private var animatedImageDataKey: Void? - -import ImageIO -import CoreGraphics - -#if !os(watchOS) -import Accelerate -import CoreImage -#endif - -// MARK: - Image Properties -extension Kingfisher where Base: Image { - fileprivate(set) var animatedImageData: Data? { - get { - return objc_getAssociatedObject(base, &animatedImageDataKey) as? Data - } - set { - objc_setAssociatedObject(base, &animatedImageDataKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - #if os(macOS) - var cgImage: CGImage? { - return base.cgImage(forProposedRect: nil, context: nil, hints: nil) - } - - var scale: CGFloat { - return 1.0 - } - - fileprivate(set) var images: [Image]? { - get { - return objc_getAssociatedObject(base, &imagesKey) as? [Image] - } - set { - objc_setAssociatedObject(base, &imagesKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - fileprivate(set) var duration: TimeInterval { - get { - return objc_getAssociatedObject(base, &durationKey) as? TimeInterval ?? 0.0 - } - set { - objc_setAssociatedObject(base, &durationKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - var size: CGSize { - return base.representations.reduce(CGSize.zero, { size, rep in - return CGSize(width: max(size.width, CGFloat(rep.pixelsWide)), height: max(size.height, CGFloat(rep.pixelsHigh))) - }) - } - - #else - var cgImage: CGImage? { - return base.cgImage - } - - var scale: CGFloat { - return base.scale - } - - var images: [Image]? { - return base.images - } - - var duration: TimeInterval { - return base.duration - } - - fileprivate(set) var imageSource: ImageSource? { - get { - return objc_getAssociatedObject(base, &imageSourceKey) as? ImageSource - } - set { - objc_setAssociatedObject(base, &imageSourceKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - var size: CGSize { - return base.size - } - #endif -} - -// MARK: - Image Conversion -extension Kingfisher where Base: Image { - #if os(macOS) - static func image(cgImage: CGImage, scale: CGFloat, refImage: Image?) -> Image { - return Image(cgImage: cgImage, size: CGSize.zero) - } - - /** - Normalize the image. This method does nothing in OS X. - - - returns: The image itself. - */ - public var normalized: Image { - return base - } - - static func animated(with images: [Image], forDuration forDurationduration: TimeInterval) -> Image? { - return nil - } - #else - static func image(cgImage: CGImage, scale: CGFloat, refImage: Image?) -> Image { - if let refImage = refImage { - return Image(cgImage: cgImage, scale: scale, orientation: refImage.imageOrientation) - } else { - return Image(cgImage: cgImage, scale: scale, orientation: .up) - } - } - - /** - Normalize the image. This method will try to redraw an image with orientation and scale considered. - - - returns: The normalized image with orientation set to up and correct scale. - */ - public var normalized: Image { - // prevent animated image (GIF) lose it's images - guard images == nil else { return base } - // No need to do anything if already up - guard base.imageOrientation != .up else { return base } - - return draw(cgImage: nil, to: size) { - base.draw(in: CGRect(origin: CGPoint.zero, size: size)) - } - } - - static func animated(with images: [Image], forDuration duration: TimeInterval) -> Image? { - return .animatedImage(with: images, duration: duration) - } - #endif -} - -// MARK: - Image Representation -extension Kingfisher where Base: Image { - // MARK: - PNG - public func pngRepresentation() -> Data? { - #if os(macOS) - guard let cgimage = cgImage else { - return nil - } - let rep = NSBitmapImageRep(cgImage: cgimage) - return rep.representation(using: .png, properties: [:]) - #else - return base.pngData() - #endif - } - - // MARK: - JPEG - public func jpegRepresentation(compressionQuality: CGFloat) -> Data? { - #if os(macOS) - guard let cgImage = cgImage else { - return nil - } - let rep = NSBitmapImageRep(cgImage: cgImage) - return rep.representation(using:.jpeg, properties: [.compressionFactor: compressionQuality]) - #else - return base.jpegData(compressionQuality: compressionQuality) - #endif - } - - // MARK: - GIF - public func gifRepresentation() -> Data? { - return animatedImageData - } -} - -// MARK: - Create images from data -extension Kingfisher where Base: Image { - static func animated(with data: Data, scale: CGFloat = 1.0, duration: TimeInterval = 0.0, preloadAll: Bool, onlyFirstFrame: Bool = false) -> Image? { - - func decode(from imageSource: CGImageSource, for options: NSDictionary) -> ([Image], TimeInterval)? { - - //Calculates frame duration for a gif frame out of the kCGImagePropertyGIFDictionary dictionary - func frameDuration(from gifInfo: NSDictionary?) -> Double { - let gifDefaultFrameDuration = 0.100 - - guard let gifInfo = gifInfo else { - return gifDefaultFrameDuration - } - - let unclampedDelayTime = gifInfo[kCGImagePropertyGIFUnclampedDelayTime as String] as? NSNumber - let delayTime = gifInfo[kCGImagePropertyGIFDelayTime as String] as? NSNumber - let duration = unclampedDelayTime ?? delayTime - - guard let frameDuration = duration else { return gifDefaultFrameDuration } - - return frameDuration.doubleValue > 0.011 ? frameDuration.doubleValue : gifDefaultFrameDuration - } - - let frameCount = CGImageSourceGetCount(imageSource) - var images = [Image]() - var gifDuration = 0.0 - for i in 0 ..< frameCount { - - guard let imageRef = CGImageSourceCreateImageAtIndex(imageSource, i, options) else { - return nil - } - - if frameCount == 1 { - // Single frame - gifDuration = Double.infinity - } else { - - // Animated GIF - guard let properties = CGImageSourceCopyPropertiesAtIndex(imageSource, i, nil) else { - return nil - } - - let gifInfo = (properties as NSDictionary)[kCGImagePropertyGIFDictionary as String] as? NSDictionary - gifDuration += frameDuration(from: gifInfo) - } - - images.append(Kingfisher.image(cgImage: imageRef, scale: scale, refImage: nil)) - - if onlyFirstFrame { break } - } - - return (images, gifDuration) - } - - // Start of kf.animatedImageWithGIFData - let options: NSDictionary = [kCGImageSourceShouldCache as String: true, kCGImageSourceTypeIdentifierHint as String: kUTTypeGIF] - guard let imageSource = CGImageSourceCreateWithData(data as CFData, options) else { - return nil - } - - #if os(macOS) - guard let (images, gifDuration) = decode(from: imageSource, for: options) else { - return nil - } - let image: Image? - if onlyFirstFrame { - image = images.first - } else { - image = Image(data: data) - image?.kf.images = images - image?.kf.duration = gifDuration - } - image?.kf.animatedImageData = data - return image - #else - - let image: Image? - if preloadAll || onlyFirstFrame { - guard let (images, gifDuration) = decode(from: imageSource, for: options) else { return nil } - image = onlyFirstFrame ? images.first : Kingfisher.animated(with: images, forDuration: duration <= 0.0 ? gifDuration : duration) - } else { - image = Image(data: data) - image?.kf.imageSource = ImageSource(ref: imageSource) - } - image?.kf.animatedImageData = data - return image - #endif - } - - static func image(data: Data, scale: CGFloat, preloadAllAnimationData: Bool, onlyFirstFrame: Bool) -> Image? { - var image: Image? - - #if os(macOS) - switch data.kf.imageFormat { - case .JPEG: - image = Image(data: data) - case .PNG: - image = Image(data: data) - case .GIF: - image = Kingfisher.animated( - with: data, - scale: scale, - duration: 0.0, - preloadAll: preloadAllAnimationData, - onlyFirstFrame: onlyFirstFrame) - case .unknown: - image = Image(data: data) - } - #else - switch data.kf.imageFormat { - case .JPEG: - image = Image(data: data, scale: scale) - case .PNG: - image = Image(data: data, scale: scale) - case .GIF: - image = Kingfisher.animated( - with: data, - scale: scale, - duration: 0.0, - preloadAll: preloadAllAnimationData, - onlyFirstFrame: onlyFirstFrame) - case .unknown: - image = Image(data: data, scale: scale) - } - #endif - - return image - } -} - -// MARK: - Image Transforming -extension Kingfisher where Base: Image { - - // MARK: - Round Corner - /// Create a round corner image based on `self`. - /// - /// - parameter radius: The round corner radius of creating image. - /// - parameter size: The target size of creating image. - /// - parameter corners: The target corners which will be applied rounding. - /// - parameter backgroundColor: The background color for the output image - /// - /// - returns: An image with round corner of `self`. - /// - /// - Note: This method only works for CG-based image. - public func image(withRoundRadius radius: CGFloat, - fit size: CGSize, - roundingCorners corners: RectCorner = .all, - backgroundColor: Color? = nil) -> Image - { - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Round corner image only works for CG-based image.") - return base - } - - let rect = CGRect(origin: CGPoint(x: 0, y: 0), size: size) - return draw(cgImage: cgImage, to: size) { - #if os(macOS) - if let backgroundColor = backgroundColor { - let rectPath = NSBezierPath(rect: rect) - backgroundColor.setFill() - rectPath.fill() - } - - let path = NSBezierPath(roundedRect: rect, byRoundingCorners: corners, radius: radius) - path.windingRule = .evenOddWindingRule - path.addClip() - base.draw(in: rect) - #else - guard let context = UIGraphicsGetCurrentContext() else { - assertionFailure("[Kingfisher] Failed to create CG context for image.") - return - } - - if let backgroundColor = backgroundColor { - let rectPath = UIBezierPath(rect: rect) - backgroundColor.setFill() - rectPath.fill() - } - - let path = UIBezierPath(roundedRect: rect, - byRoundingCorners: corners.uiRectCorner, - cornerRadii: CGSize(width: radius, height: radius)).cgPath - context.addPath(path) - context.clip() - base.draw(in: rect) - #endif - } - } - - #if os(iOS) || os(tvOS) - func resize(to size: CGSize, for contentMode: UIView.ContentMode) -> Image { - switch contentMode { - case .scaleAspectFit: - return resize(to: size, for: .aspectFit) - case .scaleAspectFill: - return resize(to: size, for: .aspectFill) - default: - return resize(to: size) - } - } - #endif - - // MARK: - Resize - /// Resize `self` to an image of new size. - /// - /// - parameter size: The target size. - /// - /// - returns: An image with new size. - /// - /// - Note: This method only works for CG-based image. - public func resize(to size: CGSize) -> Image { - - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Resize only works for CG-based image.") - return base - } - - let rect = CGRect(origin: CGPoint(x: 0, y: 0), size: size) - return draw(cgImage: cgImage, to: size) { - #if os(macOS) - base.draw(in: rect, from: NSRect.zero, operation: .copy, fraction: 1.0) - #else - base.draw(in: rect) - #endif - } - } - - /// Resize `self` to an image of new size, respecting the content mode. - /// - /// - Parameters: - /// - size: The target size. - /// - contentMode: Content mode of output image should be. - /// - Returns: An image with new size. - public func resize(to size: CGSize, for contentMode: ContentMode) -> Image { - switch contentMode { - case .aspectFit: - let newSize = self.size.kf.constrained(size) - return resize(to: newSize) - case .aspectFill: - let newSize = self.size.kf.filling(size) - return resize(to: newSize) - default: - return resize(to: size) - } - } - - public func crop(to size: CGSize, anchorOn anchor: CGPoint) -> Image { - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Crop only works for CG-based image.") - return base - } - - let rect = self.size.kf.constrainedRect(for: size, anchor: anchor) - guard let image = cgImage.cropping(to: rect.scaled(scale)) else { - assertionFailure("[Kingfisher] Cropping image failed.") - return base - } - - return Kingfisher.image(cgImage: image, scale: scale, refImage: base) - } - - // MARK: - Blur - - /// Create an image with blur effect based on `self`. - /// - /// - parameter radius: The blur radius should be used when creating blur effect. - /// - /// - returns: An image with blur effect applied. - /// - /// - Note: This method only works for CG-based image. - public func blurred(withRadius radius: CGFloat) -> Image { - #if os(watchOS) - return base - #else - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Blur only works for CG-based image.") - return base - } - - // http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement - // let d = floor(s * 3*sqrt(2*pi)/4 + 0.5) - // if d is odd, use three box-blurs of size 'd', centered on the output pixel. - let s = Float(max(radius, 2.0)) - // We will do blur on a resized image (*0.5), so the blur radius could be half as well. - - // Fix the slow compiling time for Swift 3. - // See https://github.com/onevcat/Kingfisher/issues/611 - let pi2 = 2 * Float.pi - let sqrtPi2 = sqrt(pi2) - var targetRadius = floor(s * 3.0 * sqrtPi2 / 4.0 + 0.5) - - if targetRadius.isEven { - targetRadius += 1 - } - - let iterations: Int - if radius < 0.5 { - iterations = 1 - } else if radius < 1.5 { - iterations = 2 - } else { - iterations = 3 - } - - let w = Int(size.width) - let h = Int(size.height) - let rowBytes = Int(CGFloat(cgImage.bytesPerRow)) - - func createEffectBuffer(_ context: CGContext) -> vImage_Buffer { - let data = context.data - let width = vImagePixelCount(context.width) - let height = vImagePixelCount(context.height) - let rowBytes = context.bytesPerRow - - return vImage_Buffer(data: data, height: height, width: width, rowBytes: rowBytes) - } - - guard let context = beginContext(size: size, scale: scale) else { - assertionFailure("[Kingfisher] Failed to create CG context for blurring image.") - return base - } - defer { endContext() } - - context.draw(cgImage, in: CGRect(x: 0, y: 0, width: w, height: h)) - - var inBuffer = createEffectBuffer(context) - - guard let outContext = beginContext(size: size, scale: scale) else { - assertionFailure("[Kingfisher] Failed to create CG context for blurring image.") - return base - } - defer { endContext() } - var outBuffer = createEffectBuffer(outContext) - - for _ in 0 ..< iterations { - vImageBoxConvolve_ARGB8888(&inBuffer, &outBuffer, nil, 0, 0, UInt32(targetRadius), UInt32(targetRadius), nil, vImage_Flags(kvImageEdgeExtend)) - (inBuffer, outBuffer) = (outBuffer, inBuffer) - } - - #if os(macOS) - let result = outContext.makeImage().flatMap { fixedForRetinaPixel(cgImage: $0, to: size) } - #else - let result = outContext.makeImage().flatMap { Image(cgImage: $0, scale: base.scale, orientation: base.imageOrientation) } - #endif - guard let blurredImage = result else { - assertionFailure("[Kingfisher] Can not make an blurred image within this context.") - return base - } - - return blurredImage - #endif - } - - // MARK: - Overlay - - /// Create an image from `self` with a color overlay layer. - /// - /// - parameter color: The color should be use to overlay. - /// - parameter fraction: Fraction of input color. From 0.0 to 1.0. 0.0 means solid color, 1.0 means transparent overlay. - /// - /// - returns: An image with a color overlay applied. - /// - /// - Note: This method only works for CG-based image. - public func overlaying(with color: Color, fraction: CGFloat) -> Image { - - guard let cgImage = cgImage else { - assertionFailure("[Kingfisher] Overlaying only works for CG-based image.") - return base - } - - let rect = CGRect(x: 0, y: 0, width: size.width, height: size.height) - return draw(cgImage: cgImage, to: rect.size) { - #if os(macOS) - base.draw(in: rect) - if fraction > 0 { - color.withAlphaComponent(1 - fraction).set() - rect.fill(using: .sourceAtop) - } - #else - color.set() - UIRectFill(rect) - base.draw(in: rect, blendMode: .destinationIn, alpha: 1.0) - - if fraction > 0 { - base.draw(in: rect, blendMode: .sourceAtop, alpha: fraction) - } - #endif - } - } - - // MARK: - Tint - - /// Create an image from `self` with a color tint. - /// - /// - parameter color: The color should be used to tint `self` - /// - /// - returns: An image with a color tint applied. - public func tinted(with color: Color) -> Image { - #if os(watchOS) - return base - #else - return apply(.tint(color)) - #endif - } - - // MARK: - Color Control - - /// Create an image from `self` with color control. - /// - /// - parameter brightness: Brightness changing to image. - /// - parameter contrast: Contrast changing to image. - /// - parameter saturation: Saturation changing to image. - /// - parameter inputEV: InputEV changing to image. - /// - /// - returns: An image with color control applied. - public func adjusted(brightness: CGFloat, contrast: CGFloat, saturation: CGFloat, inputEV: CGFloat) -> Image { - #if os(watchOS) - return base - #else - return apply(.colorControl((brightness, contrast, saturation, inputEV))) - #endif - } -} - -// MARK: - Decode -extension Kingfisher where Base: Image { - var decoded: Image { - return decoded(scale: scale) - } - - func decoded(scale: CGFloat) -> Image { - // prevent animated image (GIF) lose it's images - #if os(iOS) - if imageSource != nil { return base } - #else - if images != nil { return base } - #endif - - guard let imageRef = self.cgImage else { - assertionFailure("[Kingfisher] Decoding only works for CG-based image.") - return base - } - - // Draw CGImage in a plain context with scale of 1.0. - guard let context = beginContext(size: CGSize(width: imageRef.width, height: imageRef.height), scale: 1.0) else { - assertionFailure("[Kingfisher] Decoding fails to create a valid context.") - return base - } - - defer { endContext() } - - let rect = CGRect(x: 0, y: 0, width: CGFloat(imageRef.width), height: CGFloat(imageRef.height)) - context.draw(imageRef, in: rect) - let decompressedImageRef = context.makeImage() - return Kingfisher.image(cgImage: decompressedImageRef!, scale: scale, refImage: base) - } -} - -/// Reference the source image reference -class ImageSource { - var imageRef: CGImageSource? - init(ref: CGImageSource) { - self.imageRef = ref - } -} - -// MARK: - Image format -private struct ImageHeaderData { - static var PNG: [UInt8] = [0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A] - static var JPEG_SOI: [UInt8] = [0xFF, 0xD8] - static var JPEG_IF: [UInt8] = [0xFF] - static var GIF: [UInt8] = [0x47, 0x49, 0x46] -} - -enum ImageFormat { - case unknown, PNG, JPEG, GIF -} - - -// MARK: - Misc Helpers -public struct DataProxy { - fileprivate let base: Data - init(proxy: Data) { - base = proxy - } -} - -extension Data: KingfisherCompatible { - public typealias CompatibleType = DataProxy - public var kf: DataProxy { - return DataProxy(proxy: self) - } -} - -extension DataProxy { - var imageFormat: ImageFormat { - var buffer = [UInt8](repeating: 0, count: 8) - (base as NSData).getBytes(&buffer, length: 8) - if buffer == ImageHeaderData.PNG { - return .PNG - } else if buffer[0] == ImageHeaderData.JPEG_SOI[0] && - buffer[1] == ImageHeaderData.JPEG_SOI[1] && - buffer[2] == ImageHeaderData.JPEG_IF[0] - { - return .JPEG - } else if buffer[0] == ImageHeaderData.GIF[0] && - buffer[1] == ImageHeaderData.GIF[1] && - buffer[2] == ImageHeaderData.GIF[2] - { - return .GIF - } - - return .unknown - } -} - -public struct CGSizeProxy { - fileprivate let base: CGSize - init(proxy: CGSize) { - base = proxy - } -} - -extension CGSize: KingfisherCompatible { - public typealias CompatibleType = CGSizeProxy - public var kf: CGSizeProxy { - return CGSizeProxy(proxy: self) - } -} - -extension CGSizeProxy { - func constrained(_ size: CGSize) -> CGSize { - let aspectWidth = round(aspectRatio * size.height) - let aspectHeight = round(size.width / aspectRatio) - - return aspectWidth > size.width ? CGSize(width: size.width, height: aspectHeight) : CGSize(width: aspectWidth, height: size.height) - } - - func filling(_ size: CGSize) -> CGSize { - let aspectWidth = round(aspectRatio * size.height) - let aspectHeight = round(size.width / aspectRatio) - - return aspectWidth < size.width ? CGSize(width: size.width, height: aspectHeight) : CGSize(width: aspectWidth, height: size.height) - } - - private var aspectRatio: CGFloat { - return base.height == 0.0 ? 1.0 : base.width / base.height - } - - - func constrainedRect(for size: CGSize, anchor: CGPoint) -> CGRect { - - let unifiedAnchor = CGPoint(x: anchor.x.clamped(to: 0.0...1.0), - y: anchor.y.clamped(to: 0.0...1.0)) - - let x = unifiedAnchor.x * base.width - unifiedAnchor.x * size.width - let y = unifiedAnchor.y * base.height - unifiedAnchor.y * size.height - let r = CGRect(x: x, y: y, width: size.width, height: size.height) - - let ori = CGRect(origin: CGPoint.zero, size: base) - return ori.intersection(r) - } -} - -extension CGRect { - func scaled(_ scale: CGFloat) -> CGRect { - return CGRect(x: origin.x * scale, y: origin.y * scale, - width: size.width * scale, height: size.height * scale) - } -} - -extension Comparable { - func clamped(to limits: ClosedRange) -> Self { - return min(max(self, limits.lowerBound), limits.upperBound) - } -} - -extension Kingfisher where Base: Image { - - func beginContext(size: CGSize, scale: CGFloat) -> CGContext? { - #if os(macOS) - guard let rep = NSBitmapImageRep( - bitmapDataPlanes: nil, - pixelsWide: Int(size.width), - pixelsHigh: Int(size.height), - bitsPerSample: cgImage?.bitsPerComponent ?? 8, - samplesPerPixel: 4, - hasAlpha: true, - isPlanar: false, - colorSpaceName: .calibratedRGB, - bytesPerRow: 0, - bitsPerPixel: 0) else - { - assertionFailure("[Kingfisher] Image representation cannot be created.") - return nil - } - rep.size = size - NSGraphicsContext.saveGraphicsState() - guard let context = NSGraphicsContext(bitmapImageRep: rep) else { - assertionFailure("[Kingfisher] Image contenxt cannot be created.") - return nil - } - - NSGraphicsContext.current = context - return context.cgContext - #else - UIGraphicsBeginImageContextWithOptions(size, false, scale) - let context = UIGraphicsGetCurrentContext() - context?.scaleBy(x: 1.0, y: -1.0) - context?.translateBy(x: 0, y: -size.height) - return context - #endif - } - - func endContext() { - #if os(macOS) - NSGraphicsContext.restoreGraphicsState() - #else - UIGraphicsEndImageContext() - #endif - } - - func draw(cgImage: CGImage?, to size: CGSize, draw: ()->()) -> Image { - #if os(macOS) - guard let rep = NSBitmapImageRep( - bitmapDataPlanes: nil, - pixelsWide: Int(size.width), - pixelsHigh: Int(size.height), - bitsPerSample: cgImage?.bitsPerComponent ?? 8, - samplesPerPixel: 4, - hasAlpha: true, - isPlanar: false, - colorSpaceName: .calibratedRGB, - bytesPerRow: 0, - bitsPerPixel: 0) else - { - assertionFailure("[Kingfisher] Image representation cannot be created.") - return base - } - rep.size = size - - NSGraphicsContext.saveGraphicsState() - - let context = NSGraphicsContext(bitmapImageRep: rep) - NSGraphicsContext.current = context - draw() - NSGraphicsContext.restoreGraphicsState() - - let outputImage = Image(size: size) - outputImage.addRepresentation(rep) - return outputImage - #else - - UIGraphicsBeginImageContextWithOptions(size, false, scale) - defer { UIGraphicsEndImageContext() } - draw() - return UIGraphicsGetImageFromCurrentImageContext() ?? base - - #endif - } - - #if os(macOS) - func fixedForRetinaPixel(cgImage: CGImage, to size: CGSize) -> Image { - - let image = Image(cgImage: cgImage, size: base.size) - let rect = CGRect(origin: CGPoint(x: 0, y: 0), size: size) - - return draw(cgImage: cgImage, to: self.size) { - image.draw(in: rect, from: NSRect.zero, operation: .copy, fraction: 1.0) - } - } - #endif -} - -extension Float { - var isEven: Bool { - return truncatingRemainder(dividingBy: 2.0) == 0 - } -} - -#if os(macOS) -extension NSBezierPath { - convenience init(roundedRect rect: NSRect, topLeftRadius: CGFloat, topRightRadius: CGFloat, - bottomLeftRadius: CGFloat, bottomRightRadius: CGFloat) - { - self.init() - - let maxCorner = min(rect.width, rect.height) / 2 - - let radiusTopLeft = min(maxCorner, max(0, topLeftRadius)) - let radiustopRight = min(maxCorner, max(0, topRightRadius)) - let radiusbottomLeft = min(maxCorner, max(0, bottomLeftRadius)) - let radiusbottomRight = min(maxCorner, max(0, bottomRightRadius)) - - guard !NSIsEmptyRect(rect) else { - return - } - - let topLeft = NSMakePoint(NSMinX(rect), NSMaxY(rect)); - let topRight = NSMakePoint(NSMaxX(rect), NSMaxY(rect)); - let bottomRight = NSMakePoint(NSMaxX(rect), NSMinY(rect)); - - move(to: NSMakePoint(NSMidX(rect), NSMaxY(rect))) - appendArc(from: topLeft, to: rect.origin, radius: radiusTopLeft) - appendArc(from: rect.origin, to: bottomRight, radius: radiusbottomLeft) - appendArc(from: bottomRight, to: topRight, radius: radiusbottomRight) - appendArc(from: topRight, to: topLeft, radius: radiustopRight) - close() - } - - convenience init(roundedRect rect: NSRect, byRoundingCorners corners: RectCorner, radius: CGFloat) { - let radiusTopLeft = corners.contains(.topLeft) ? radius : 0 - let radiusTopRight = corners.contains(.topRight) ? radius : 0 - let radiusBottomLeft = corners.contains(.bottomLeft) ? radius : 0 - let radiusBottomRight = corners.contains(.bottomRight) ? radius : 0 - - self.init(roundedRect: rect, topLeftRadius: radiusTopLeft, topRightRadius: radiusTopRight, - bottomLeftRadius: radiusBottomLeft, bottomRightRadius: radiusBottomRight) - } -} - -#else -extension RectCorner { - var uiRectCorner: UIRectCorner { - - var result: UIRectCorner = [] - - if self.contains(.topLeft) { result.insert(.topLeft) } - if self.contains(.topRight) { result.insert(.topRight) } - if self.contains(.bottomLeft) { result.insert(.bottomLeft) } - if self.contains(.bottomRight) { result.insert(.bottomRight) } - - return result - } -} -#endif - diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageCache.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageCache.swift deleted file mode 100755 index 5c347de..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageCache.swift +++ /dev/null @@ -1,722 +0,0 @@ -// -// ImageCache.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -public extension Notification.Name { - /** - This notification will be sent when the disk cache got cleaned either there are cached files expired or the total size exceeding the max allowed size. The manually invoking of `clearDiskCache` method will not trigger this notification. - - The `object` of this notification is the `ImageCache` object which sends the notification. - - A list of removed hashes (files) could be retrieved by accessing the array under `KingfisherDiskCacheCleanedHashKey` key in `userInfo` of the notification object you received. By checking the array, you could know the hash codes of files are removed. - - The main purpose of this notification is supplying a chance to maintain some necessary information on the cached files. See [this wiki](https://github.com/onevcat/Kingfisher/wiki/How-to-implement-ETag-based-304-(Not-Modified)-handling-in-Kingfisher) for a use case on it. - */ - public static var KingfisherDidCleanDiskCache = Notification.Name.init("com.onevcat.Kingfisher.KingfisherDidCleanDiskCache") -} - -/** -Key for array of cleaned hashes in `userInfo` of `KingfisherDidCleanDiskCacheNotification`. -*/ -public let KingfisherDiskCacheCleanedHashKey = "com.onevcat.Kingfisher.cleanedHash" - -/// It represents a task of retrieving image. You can call `cancel` on it to stop the process. -public typealias RetrieveImageDiskTask = DispatchWorkItem - -/** -Cache type of a cached image. - -- None: The image is not cached yet when retrieving it. -- Memory: The image is cached in memory. -- Disk: The image is cached in disk. -*/ -public enum CacheType { - case none, memory, disk - - public var cached: Bool { - switch self { - case .memory, .disk: return true - case .none: return false - } - } -} - -/// `ImageCache` represents both the memory and disk cache system of Kingfisher. -/// While a default image cache object will be used if you prefer the extension methods of Kingfisher, -/// you can create your own cache object and configure it as your need. You could use an `ImageCache` -/// object to manipulate memory and disk cache for Kingfisher. -open class ImageCache { - - //Memory - fileprivate let memoryCache = NSCache() - - /// The largest cache cost of memory cache. The total cost is pixel count of - /// all cached images in memory. - /// Default is unlimited. Memory cache will be purged automatically when a - /// memory warning notification is received. - open var maxMemoryCost: UInt = 0 { - didSet { - self.memoryCache.totalCostLimit = Int(maxMemoryCost) - } - } - - //Disk - fileprivate let ioQueue: DispatchQueue - fileprivate var fileManager: FileManager! - - ///The disk cache location. - open let diskCachePath: String - - /// The default file extension appended to cached files. - open var pathExtension: String? - - /// The longest time duration in second of the cache being stored in disk. - /// Default is 1 week (60 * 60 * 24 * 7 seconds). - /// Setting this to a negative value will make the disk cache never expiring. - open var maxCachePeriodInSecond: TimeInterval = 60 * 60 * 24 * 7 //Cache exists for 1 week - - /// The largest disk size can be taken for the cache. It is the total - /// allocated size of cached files in bytes. - /// Default is no limit. - open var maxDiskCacheSize: UInt = 0 - - fileprivate let processQueue: DispatchQueue - - /// The default cache. - public static let `default` = ImageCache(name: "default") - - /// Closure that defines the disk cache path from a given path and cacheName. - public typealias DiskCachePathClosure = (String?, String) -> String - - /// The default DiskCachePathClosure - public final class func defaultDiskCachePathClosure(path: String?, cacheName: String) -> String { - let dstPath = path ?? NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true).first! - return (dstPath as NSString).appendingPathComponent(cacheName) - } - - /** - Init method. Passing a name for the cache. It represents a cache folder in the memory and disk. - - - parameter name: Name of the cache. It will be used as the memory cache name and the disk cache folder name - appending to the cache path. This value should not be an empty string. - - parameter path: Optional - Location of cache path on disk. If `nil` is passed in (the default value), - the `.cachesDirectory` in of your app will be used. - - parameter diskCachePathClosure: Closure that takes in an optional initial path string and generates - the final disk cache path. You could use it to fully customize your cache path. - - - returns: The cache object. - */ - public init(name: String, - path: String? = nil, - diskCachePathClosure: DiskCachePathClosure = ImageCache.defaultDiskCachePathClosure) - { - - if name.isEmpty { - fatalError("[Kingfisher] You should specify a name for the cache. A cache with empty name is not permitted.") - } - - let cacheName = "com.onevcat.Kingfisher.ImageCache.\(name)" - memoryCache.name = cacheName - - diskCachePath = diskCachePathClosure(path, cacheName) - - let ioQueueName = "com.onevcat.Kingfisher.ImageCache.ioQueue.\(name)" - ioQueue = DispatchQueue(label: ioQueueName) - - let processQueueName = "com.onevcat.Kingfisher.ImageCache.processQueue.\(name)" - processQueue = DispatchQueue(label: processQueueName, attributes: .concurrent) - - ioQueue.sync { fileManager = FileManager() } - -#if !os(macOS) && !os(watchOS) - NotificationCenter.default.addObserver( - self, selector: #selector(clearMemoryCache), name: UIApplication.didReceiveMemoryWarningNotification, object: nil) - NotificationCenter.default.addObserver( - self, selector: #selector(cleanExpiredDiskCache), name: UIApplication.willTerminateNotification, object: nil) - NotificationCenter.default.addObserver( - self, selector: #selector(backgroundCleanExpiredDiskCache), name: UIApplication.didEnterBackgroundNotification, object: nil) -#endif - } - - deinit { - NotificationCenter.default.removeObserver(self) - } - - - // MARK: - Store & Remove - - /** - Store an image to cache. It will be saved to both memory and disk. It is an async operation. - - - parameter image: The image to be stored. - - parameter original: The original data of the image. - Kingfisher will use it to check the format of the image and optimize cache size on disk. - If `nil` is supplied, the image data will be saved as a normalized PNG file. - It is strongly suggested to supply it whenever possible, to get a better performance and disk usage. - - parameter key: Key for the image. - - parameter identifier: The identifier of processor used. If you are using a processor for the image, pass the identifier of - processor to it. - This identifier will be used to generate a corresponding key for the combination of `key` and processor. - - parameter toDisk: Whether this image should be cached to disk or not. If false, the image will be only cached in memory. - - parameter completionHandler: Called when store operation completes. - */ - open func store(_ image: Image, - original: Data? = nil, - forKey key: String, - processorIdentifier identifier: String = "", - cacheSerializer serializer: CacheSerializer = DefaultCacheSerializer.default, - toDisk: Bool = true, - completionHandler: (() -> Void)? = nil) - { - - let computedKey = key.computedKey(with: identifier) - memoryCache.setObject(image, forKey: computedKey as NSString, cost: image.kf.imageCost) - - func callHandlerInMainQueue() { - if let handler = completionHandler { - DispatchQueue.main.async { - handler() - } - } - } - - if toDisk { - ioQueue.async { - - if let data = serializer.data(with: image, original: original) { - if !self.fileManager.fileExists(atPath: self.diskCachePath) { - do { - try self.fileManager.createDirectory(atPath: self.diskCachePath, withIntermediateDirectories: true, attributes: nil) - } catch _ {} - } - - self.fileManager.createFile(atPath: self.cachePath(forComputedKey: computedKey), contents: data, attributes: nil) - } - callHandlerInMainQueue() - } - } else { - callHandlerInMainQueue() - } - } - - /** - Remove the image for key for the cache. It will be opted out from both memory and disk. - It is an async operation. - - - parameter key: Key for the image. - - parameter identifier: The identifier of processor used. If you are using a processor for the image, pass the identifier of processor to it. - This identifier will be used to generate a corresponding key for the combination of `key` and processor. - - parameter fromDisk: Whether this image should be removed from disk or not. If false, the image will be only removed from memory. - - parameter completionHandler: Called when removal operation completes. - */ - open func removeImage(forKey key: String, - processorIdentifier identifier: String = "", - fromDisk: Bool = true, - completionHandler: (() -> Void)? = nil) - { - let computedKey = key.computedKey(with: identifier) - memoryCache.removeObject(forKey: computedKey as NSString) - - func callHandlerInMainQueue() { - if let handler = completionHandler { - DispatchQueue.main.async { - handler() - } - } - } - - if fromDisk { - ioQueue.async{ - do { - try self.fileManager.removeItem(atPath: self.cachePath(forComputedKey: computedKey)) - } catch _ {} - callHandlerInMainQueue() - } - } else { - callHandlerInMainQueue() - } - } - - // MARK: - Get data from cache - - /** - Get an image for a key from memory or disk. - - - parameter key: Key for the image. - - parameter options: Options of retrieving image. If you need to retrieve an image which was - stored with a specified `ImageProcessor`, pass the processor in the option too. - - parameter completionHandler: Called when getting operation completes with image result and cached type of - this image. If there is no such key cached, the image will be `nil`. - - - returns: The retrieving task. - */ - @discardableResult - open func retrieveImage(forKey key: String, - options: KingfisherOptionsInfo?, - completionHandler: ((Image?, CacheType) -> ())?) -> RetrieveImageDiskTask? - { - // No completion handler. Not start working and early return. - guard let completionHandler = completionHandler else { - return nil - } - - var block: RetrieveImageDiskTask? - let options = options ?? KingfisherEmptyOptionsInfo - - if let image = self.retrieveImageInMemoryCache(forKey: key, options: options) { - options.callbackDispatchQueue.safeAsync { - completionHandler(image, .memory) - } - } else if options.fromMemoryCacheOrRefresh { // Only allows to get images from memory cache. - options.callbackDispatchQueue.safeAsync { - completionHandler(nil, .none) - } - } else { - var sSelf: ImageCache! = self - block = DispatchWorkItem(block: { - // Begin to load image from disk - if let image = sSelf.retrieveImageInDiskCache(forKey: key, options: options) { - if options.backgroundDecode { - sSelf.processQueue.async { - let result = image.kf.decoded - - sSelf.store(result, - forKey: key, - processorIdentifier: options.processor.identifier, - cacheSerializer: options.cacheSerializer, - toDisk: false, - completionHandler: nil) - options.callbackDispatchQueue.safeAsync { - completionHandler(result, .memory) - sSelf = nil - } - } - } else { - sSelf.store(image, - forKey: key, - processorIdentifier: options.processor.identifier, - cacheSerializer: options.cacheSerializer, - toDisk: false, - completionHandler: nil - ) - options.callbackDispatchQueue.safeAsync { - completionHandler(image, .disk) - sSelf = nil - } - } - } else { - // No image found from either memory or disk - options.callbackDispatchQueue.safeAsync { - completionHandler(nil, .none) - sSelf = nil - } - } - }) - - sSelf.ioQueue.async(execute: block!) - } - - return block - } - - /** - Get an image for a key from memory. - - - parameter key: Key for the image. - - parameter options: Options of retrieving image. If you need to retrieve an image which was - stored with a specified `ImageProcessor`, pass the processor in the option too. - - returns: The image object if it is cached, or `nil` if there is no such key in the cache. - */ - open func retrieveImageInMemoryCache(forKey key: String, options: KingfisherOptionsInfo? = nil) -> Image? { - - let options = options ?? KingfisherEmptyOptionsInfo - let computedKey = key.computedKey(with: options.processor.identifier) - - return memoryCache.object(forKey: computedKey as NSString) as? Image - } - - /** - Get an image for a key from disk. - - - parameter key: Key for the image. - - parameter options: Options of retrieving image. If you need to retrieve an image which was - stored with a specified `ImageProcessor`, pass the processor in the option too. - - - returns: The image object if it is cached, or `nil` if there is no such key in the cache. - */ - open func retrieveImageInDiskCache(forKey key: String, options: KingfisherOptionsInfo? = nil) -> Image? { - - let options = options ?? KingfisherEmptyOptionsInfo - let computedKey = key.computedKey(with: options.processor.identifier) - - return diskImage(forComputedKey: computedKey, serializer: options.cacheSerializer, options: options) - } - - - // MARK: - Clear & Clean - - /** - Clear memory cache. - */ - @objc public func clearMemoryCache() { - memoryCache.removeAllObjects() - } - - /** - Clear disk cache. This is an async operation. - - - parameter completionHander: Called after the operation completes. - */ - open func clearDiskCache(completion handler: (()->())? = nil) { - ioQueue.async { - do { - try self.fileManager.removeItem(atPath: self.diskCachePath) - try self.fileManager.createDirectory(atPath: self.diskCachePath, withIntermediateDirectories: true, attributes: nil) - } catch _ { } - - if let handler = handler { - DispatchQueue.main.async { - handler() - } - } - } - } - - /** - Clean expired disk cache. This is an async operation. - */ - @objc fileprivate func cleanExpiredDiskCache() { - cleanExpiredDiskCache(completion: nil) - } - - /** - Clean expired disk cache. This is an async operation. - - - parameter completionHandler: Called after the operation completes. - */ - open func cleanExpiredDiskCache(completion handler: (()->())? = nil) { - - // Do things in cocurrent io queue - ioQueue.async { - - var (URLsToDelete, diskCacheSize, cachedFiles) = self.travelCachedFiles(onlyForCacheSize: false) - - for fileURL in URLsToDelete { - do { - try self.fileManager.removeItem(at: fileURL) - } catch _ { } - } - - if self.maxDiskCacheSize > 0 && diskCacheSize > self.maxDiskCacheSize { - let targetSize = self.maxDiskCacheSize / 2 - - // Sort files by last modify date. We want to clean from the oldest files. - let sortedFiles = cachedFiles.keysSortedByValue { - resourceValue1, resourceValue2 -> Bool in - - if let date1 = resourceValue1.contentAccessDate, - let date2 = resourceValue2.contentAccessDate - { - return date1.compare(date2) == .orderedAscending - } - - // Not valid date information. This should not happen. Just in case. - return true - } - - for fileURL in sortedFiles { - - do { - try self.fileManager.removeItem(at: fileURL) - } catch { } - - URLsToDelete.append(fileURL) - - if let fileSize = cachedFiles[fileURL]?.totalFileAllocatedSize { - diskCacheSize -= UInt(fileSize) - } - - if diskCacheSize < targetSize { - break - } - } - } - - DispatchQueue.main.async { - - if URLsToDelete.count != 0 { - let cleanedHashes = URLsToDelete.map { $0.lastPathComponent } - NotificationCenter.default.post(name: .KingfisherDidCleanDiskCache, object: self, userInfo: [KingfisherDiskCacheCleanedHashKey: cleanedHashes]) - } - - handler?() - } - } - } - - fileprivate func travelCachedFiles(onlyForCacheSize: Bool) -> (urlsToDelete: [URL], diskCacheSize: UInt, cachedFiles: [URL: URLResourceValues]) { - - let diskCacheURL = URL(fileURLWithPath: diskCachePath) - let resourceKeys: Set = [.isDirectoryKey, .contentAccessDateKey, .totalFileAllocatedSizeKey] - let expiredDate: Date? = (maxCachePeriodInSecond < 0) ? nil : Date(timeIntervalSinceNow: -maxCachePeriodInSecond) - - var cachedFiles = [URL: URLResourceValues]() - var urlsToDelete = [URL]() - var diskCacheSize: UInt = 0 - - for fileUrl in (try? fileManager.contentsOfDirectory(at: diskCacheURL, includingPropertiesForKeys: Array(resourceKeys), options: .skipsHiddenFiles)) ?? [] { - - do { - let resourceValues = try fileUrl.resourceValues(forKeys: resourceKeys) - // If it is a Directory. Continue to next file URL. - if resourceValues.isDirectory == true { - continue - } - - // If this file is expired, add it to URLsToDelete - if !onlyForCacheSize, - let expiredDate = expiredDate, - let lastAccessData = resourceValues.contentAccessDate, - (lastAccessData as NSDate).laterDate(expiredDate) == expiredDate - { - urlsToDelete.append(fileUrl) - continue - } - - if let fileSize = resourceValues.totalFileAllocatedSize { - diskCacheSize += UInt(fileSize) - if !onlyForCacheSize { - cachedFiles[fileUrl] = resourceValues - } - } - } catch _ { } - } - - return (urlsToDelete, diskCacheSize, cachedFiles) - } - -#if !os(macOS) && !os(watchOS) - /** - Clean expired disk cache when app in background. This is an async operation. - In most cases, you should not call this method explicitly. - It will be called automatically when `UIApplicationDidEnterBackgroundNotification` received. - */ - @objc public func backgroundCleanExpiredDiskCache() { - // if 'sharedApplication()' is unavailable, then return - guard let sharedApplication = Kingfisher.shared else { return } - - func endBackgroundTask(_ task: inout UIBackgroundTaskIdentifier) { - sharedApplication.endBackgroundTask(task) - task = UIBackgroundTaskIdentifier.invalid - } - - var backgroundTask: UIBackgroundTaskIdentifier! - backgroundTask = sharedApplication.beginBackgroundTask { - endBackgroundTask(&backgroundTask!) - } - - cleanExpiredDiskCache { - endBackgroundTask(&backgroundTask!) - } - } -#endif - - - // MARK: - Check cache status - - /// Cache type for checking whether an image is cached for a key in current cache. - /// - /// - Parameters: - /// - key: Key for the image. - /// - identifier: Processor identifier which used for this image. Default is empty string. - /// - Returns: A `CacheType` instance which indicates the cache status. `.none` means the image is not in cache yet. - open func imageCachedType(forKey key: String, processorIdentifier identifier: String = "") -> CacheType { - let computedKey = key.computedKey(with: identifier) - - if memoryCache.object(forKey: computedKey as NSString) != nil { - return .memory - } - - let filePath = cachePath(forComputedKey: computedKey) - - var diskCached = false - ioQueue.sync { - diskCached = fileManager.fileExists(atPath: filePath) - } - - if diskCached { - return .disk - } - - return .none - } - - /** - Get the hash for the key. This could be used for matching files. - - - parameter key: The key which is used for caching. - - parameter identifier: The identifier of processor used. If you are using a processor for the image, pass the identifier of processor to it. - - - returns: Corresponding hash. - */ - open func hash(forKey key: String, processorIdentifier identifier: String = "") -> String { - let computedKey = key.computedKey(with: identifier) - return cacheFileName(forComputedKey: computedKey) - } - - /** - Calculate the disk size taken by cache. - It is the total allocated size of the cached files in bytes. - - - parameter completionHandler: Called with the calculated size when finishes. - */ - open func calculateDiskCacheSize(completion handler: @escaping ((_ size: UInt) -> ())) { - ioQueue.async { - let (_, diskCacheSize, _) = self.travelCachedFiles(onlyForCacheSize: true) - DispatchQueue.main.async { - handler(diskCacheSize) - } - } - } - - /** - Get the cache path for the key. - It is useful for projects with UIWebView or anyone that needs access to the local file path. - - i.e. Replace the `` tag in your HTML. - - - Note: This method does not guarantee there is an image already cached in the path. It just returns the path - that the image should be. - You could use `isImageCached(forKey:)` method to check whether the image is cached under that key. - */ - open func cachePath(forKey key: String, processorIdentifier identifier: String = "") -> String { - let computedKey = key.computedKey(with: identifier) - return cachePath(forComputedKey: computedKey) - } - - open func cachePath(forComputedKey key: String) -> String { - let fileName = cacheFileName(forComputedKey: key) - return (diskCachePath as NSString).appendingPathComponent(fileName) - } -} - -// MARK: - Internal Helper -extension ImageCache { - - func diskImage(forComputedKey key: String, serializer: CacheSerializer, options: KingfisherOptionsInfo) -> Image? { - if let data = diskImageData(forComputedKey: key) { - return serializer.image(with: data, options: options) - } else { - return nil - } - } - - func diskImageData(forComputedKey key: String) -> Data? { - let filePath = cachePath(forComputedKey: key) - return (try? Data(contentsOf: URL(fileURLWithPath: filePath))) - } - - func cacheFileName(forComputedKey key: String) -> String { - if let ext = self.pathExtension { - return (key.kf.md5 as NSString).appendingPathExtension(ext)! - } - return key.kf.md5 - } -} - -// MARK: - Deprecated -extension ImageCache { - /** - * Cache result for checking whether an image is cached for a key. - */ - @available(*, deprecated, - message: "CacheCheckResult is deprecated. Use imageCachedType(forKey:processorIdentifier:) API instead.") - public struct CacheCheckResult { - public let cached: Bool - public let cacheType: CacheType? - } - - /** - Check whether an image is cached for a key. - - - parameter key: Key for the image. - - - returns: The check result. - */ - @available(*, deprecated, - message: "Use imageCachedType(forKey:processorIdentifier:) instead. CacheCheckResult.none indicates not being cached.", - renamed: "imageCachedType(forKey:processorIdentifier:)") - open func isImageCached(forKey key: String, processorIdentifier identifier: String = "") -> CacheCheckResult { - let result = imageCachedType(forKey: key, processorIdentifier: identifier) - switch result { - case .memory, .disk: - return CacheCheckResult(cached: true, cacheType: result) - case .none: - return CacheCheckResult(cached: false, cacheType: nil) - } - } -} - -extension Kingfisher where Base: Image { - var imageCost: Int { - return images == nil ? - Int(size.height * size.width * scale * scale) : - Int(size.height * size.width * scale * scale) * images!.count - } -} - -extension Dictionary { - func keysSortedByValue(_ isOrderedBefore: (Value, Value) -> Bool) -> [Key] { - return Array(self).sorted{ isOrderedBefore($0.1, $1.1) }.map{ $0.0 } - } -} - -#if !os(macOS) && !os(watchOS) -// MARK: - For App Extensions -extension UIApplication: KingfisherCompatible { } -extension Kingfisher where Base: UIApplication { - public static var shared: UIApplication? { - let selector = NSSelectorFromString("sharedApplication") - guard Base.responds(to: selector) else { return nil } - return Base.perform(selector).takeUnretainedValue() as? UIApplication - } -} -#endif - -extension String { - func computedKey(with identifier: String) -> String { - if identifier.isEmpty { - return self - } else { - return appending("@\(identifier)") - } - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageDownloader.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageDownloader.swift deleted file mode 100755 index e318d59..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageDownloader.swift +++ /dev/null @@ -1,606 +0,0 @@ -// -// ImageDownloader.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -/// Progress update block of downloader. -public typealias ImageDownloaderProgressBlock = DownloadProgressBlock - -/// Completion block of downloader. -public typealias ImageDownloaderCompletionHandler = ((_ image: Image?, _ error: NSError?, _ url: URL?, _ originalData: Data?) -> ()) - -/// Download task. -public struct RetrieveImageDownloadTask { - let internalTask: URLSessionDataTask - - /// Downloader by which this task is intialized. - public private(set) weak var ownerDownloader: ImageDownloader? - - /** - Cancel this download task. It will trigger the completion handler with an NSURLErrorCancelled error. - */ - public func cancel() { - ownerDownloader?.cancelDownloadingTask(self) - } - - /// The original request URL of this download task. - public var url: URL? { - return internalTask.originalRequest?.url - } - - /// The relative priority of this download task. - /// It represents the `priority` property of the internal `NSURLSessionTask` of this download task. - /// The value for it is between 0.0~1.0. Default priority is value of 0.5. - /// See documentation on `priority` of `NSURLSessionTask` for more about it. - public var priority: Float { - get { - return internalTask.priority - } - set { - internalTask.priority = newValue - } - } -} - -///The code of errors which `ImageDownloader` might encountered. -public enum KingfisherError: Int { - - /// badData: The downloaded data is not an image or the data is corrupted. - case badData = 10000 - - /// notModified: The remote server responsed a 304 code. No image data downloaded. - case notModified = 10001 - - /// The HTTP status code in response is not valid. If an invalid - /// code error received, you could check the value under `KingfisherErrorStatusCodeKey` - /// in `userInfo` to see the code. - case invalidStatusCode = 10002 - - /// notCached: The image rquested is not in cache but .onlyFromCache is activated. - case notCached = 10003 - - /// The URL is invalid. - case invalidURL = 20000 - - /// The downloading task is cancelled before started. - case downloadCancelledBeforeStarting = 30000 -} - -/// Key will be used in the `userInfo` of `.invalidStatusCode` -public let KingfisherErrorStatusCodeKey = "statusCode" - -/// Protocol of `ImageDownloader`. -public protocol ImageDownloaderDelegate: class { - /** - Called when the `ImageDownloader` object successfully downloaded an image from specified URL. - - - parameter downloader: The `ImageDownloader` object finishes the downloading. - - parameter image: Downloaded image. - - parameter url: URL of the original request URL. - - parameter response: The response object of the downloading process. - */ - func imageDownloader(_ downloader: ImageDownloader, didDownload image: Image, for url: URL, with response: URLResponse?) - - /** - Called when the `ImageDownloader` object starts to download an image from specified URL. - - - parameter downloader: The `ImageDownloader` object starts the downloading. - - parameter url: URL of the original request. - - parameter response: The request object of the downloading process. - */ - func imageDownloader(_ downloader: ImageDownloader, willDownloadImageForURL url: URL, with request: URLRequest?) - - /** - Check if a received HTTP status code is valid or not. - By default, a status code between 200 to 400 (excluded) is considered as valid. - If an invalid code is received, the downloader will raise an .invalidStatusCode error. - It has a `userInfo` which includes this statusCode and localizedString error message. - - - parameter code: The received HTTP status code. - - parameter downloader: The `ImageDownloader` object asking for validate status code. - - - returns: Whether this HTTP status code is valid or not. - - - Note: If the default 200 to 400 valid code does not suit your need, - you can implement this method to change that behavior. - */ - func isValidStatusCode(_ code: Int, for downloader: ImageDownloader) -> Bool - - /** - Called when the `ImageDownloader` object successfully downloaded image data from specified URL. - - - parameter downloader: The `ImageDownloader` object finishes data downloading. - - parameter data: Downloaded data. - - parameter url: URL of the original request URL. - - - returns: The data from which Kingfisher should use to create an image. - - - Note: This callback can be used to preprocess raw image data - before creation of UIImage instance (i.e. decrypting or verification). - */ - func imageDownloader(_ downloader: ImageDownloader, didDownload data: Data, for url: URL) -> Data? -} - -extension ImageDownloaderDelegate { - public func imageDownloader(_ downloader: ImageDownloader, didDownload image: Image, for url: URL, with response: URLResponse?) {} - - public func imageDownloader(_ downloader: ImageDownloader, willDownloadImageForURL url: URL, with request: URLRequest?) {} - public func isValidStatusCode(_ code: Int, for downloader: ImageDownloader) -> Bool { - return (200..<400).contains(code) - } - public func imageDownloader(_ downloader: ImageDownloader, didDownload data: Data, for url: URL) -> Data? { - return data - } -} - -/// Protocol indicates that an authentication challenge could be handled. -public protocol AuthenticationChallengeResponsable: class { - /** - Called when an session level authentication challenge is received. - This method provide a chance to handle and response to the authentication challenge before downloading could start. - - - parameter downloader: The downloader which receives this challenge. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call. - - - Note: This method is a forward from `URLSessionDelegate.urlSession(:didReceiveChallenge:completionHandler:)`. Please refer to the document of it in `URLSessionDelegate`. - */ - func downloader(_ downloader: ImageDownloader, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) - - /** - Called when an session level authentication challenge is received. - This method provide a chance to handle and response to the authentication challenge before downloading could start. - - - parameter downloader: The downloader which receives this challenge. - - parameter task: The task whose request requires authentication. - - parameter challenge: An object that contains the request for authentication. - - parameter completionHandler: A handler that your delegate method must call. - - - Note: This method is a forward from `URLSessionTaskDelegate.urlSession(:task:didReceiveChallenge:completionHandler:)`. Please refer to the document of it in `URLSessionTaskDelegate`. - */ - func downloader(_ downloader: ImageDownloader, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) -} - -extension AuthenticationChallengeResponsable { - - func downloader(_ downloader: ImageDownloader, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { - - if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust { - if let trustedHosts = downloader.trustedHosts, trustedHosts.contains(challenge.protectionSpace.host) { - let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!) - completionHandler(.useCredential, credential) - return - } - } - - completionHandler(.performDefaultHandling, nil) - } - - func downloader(_ downloader: ImageDownloader, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { - - completionHandler(.performDefaultHandling, nil) - } - -} - -/// `ImageDownloader` represents a downloading manager for requesting the image with a URL from server. -open class ImageDownloader { - - class ImageFetchLoad { - var contents = [(callback: CallbackPair, options: KingfisherOptionsInfo)]() - var responseData = NSMutableData() - - var downloadTaskCount = 0 - var downloadTask: RetrieveImageDownloadTask? - var cancelSemaphore: DispatchSemaphore? - } - - // MARK: - Public property - /// The duration before the download is timeout. Default is 15 seconds. - open var downloadTimeout: TimeInterval = 15.0 - - /// A set of trusted hosts when receiving server trust challenges. A challenge with host name contained in this set will be ignored. - /// You can use this set to specify the self-signed site. It only will be used if you don't specify the `authenticationChallengeResponder`. - /// If `authenticationChallengeResponder` is set, this property will be ignored and the implemention of `authenticationChallengeResponder` will be used instead. - open var trustedHosts: Set? - - /// Use this to set supply a configuration for the downloader. By default, NSURLSessionConfiguration.ephemeralSessionConfiguration() will be used. - /// You could change the configuration before a downloaing task starts. A configuration without persistent storage for caches is requsted for downloader working correctly. - open var sessionConfiguration = URLSessionConfiguration.ephemeral { - didSet { - session?.invalidateAndCancel() - session = URLSession(configuration: sessionConfiguration, delegate: sessionHandler, delegateQueue: OperationQueue.main) - } - } - - /// Whether the download requests should use pipeling or not. Default is false. - open var requestsUsePipelining = false - - fileprivate let sessionHandler: ImageDownloaderSessionHandler - fileprivate var session: URLSession? - - /// Delegate of this `ImageDownloader` object. See `ImageDownloaderDelegate` protocol for more. - open weak var delegate: ImageDownloaderDelegate? - - /// A responder for authentication challenge. - /// Downloader will forward the received authentication challenge for the downloading session to this responder. - open weak var authenticationChallengeResponder: AuthenticationChallengeResponsable? - - // MARK: - Internal property - let barrierQueue: DispatchQueue - let processQueue: DispatchQueue - let cancelQueue: DispatchQueue - - typealias CallbackPair = (progressBlock: ImageDownloaderProgressBlock?, completionHandler: ImageDownloaderCompletionHandler?) - - var fetchLoads = [URL: ImageFetchLoad]() - - // MARK: - Public method - /// The default downloader. - public static let `default` = ImageDownloader(name: "default") - - /** - Init a downloader with name. - - - parameter name: The name for the downloader. It should not be empty. - - - returns: The downloader object. - */ - public init(name: String) { - if name.isEmpty { - fatalError("[Kingfisher] You should specify a name for the downloader. A downloader with empty name is not permitted.") - } - - barrierQueue = DispatchQueue(label: "com.onevcat.Kingfisher.ImageDownloader.Barrier.\(name)", attributes: .concurrent) - processQueue = DispatchQueue(label: "com.onevcat.Kingfisher.ImageDownloader.Process.\(name)", attributes: .concurrent) - cancelQueue = DispatchQueue(label: "com.onevcat.Kingfisher.ImageDownloader.Cancel.\(name)") - - sessionHandler = ImageDownloaderSessionHandler() - - // Provide a default implement for challenge responder. - authenticationChallengeResponder = sessionHandler - session = URLSession(configuration: sessionConfiguration, delegate: sessionHandler, delegateQueue: .main) - } - - deinit { - session?.invalidateAndCancel() - } - - func fetchLoad(for url: URL) -> ImageFetchLoad? { - var fetchLoad: ImageFetchLoad? - barrierQueue.sync(flags: .barrier) { fetchLoad = fetchLoads[url] } - return fetchLoad - } - - /** - Download an image with a URL and option. - - - parameter url: Target URL. - - parameter retrieveImageTask: The task to cooporate with cache. Pass `nil` if you are not trying to use downloader and cache. - - parameter options: The options could control download behavior. See `KingfisherOptionsInfo`. - - parameter progressBlock: Called when the download progress updated. - - parameter completionHandler: Called when the download progress finishes. - - - returns: A downloading task. You could call `cancel` on it to stop the downloading process. - */ - @discardableResult - open func downloadImage(with url: URL, - retrieveImageTask: RetrieveImageTask? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: ImageDownloaderProgressBlock? = nil, - completionHandler: ImageDownloaderCompletionHandler? = nil) -> RetrieveImageDownloadTask? - { - if let retrieveImageTask = retrieveImageTask, retrieveImageTask.cancelledBeforeDownloadStarting { - completionHandler?(nil, NSError(domain: KingfisherErrorDomain, code: KingfisherError.downloadCancelledBeforeStarting.rawValue, userInfo: nil), nil, nil) - return nil - } - - let timeout = self.downloadTimeout == 0.0 ? 15.0 : self.downloadTimeout - - // We need to set the URL as the load key. So before setup progress, we need to ask the `requestModifier` for a final URL. - var request = URLRequest(url: url, cachePolicy: .reloadIgnoringLocalCacheData, timeoutInterval: timeout) - request.httpShouldUsePipelining = requestsUsePipelining - - if let modifier = options?.modifier { - guard let r = modifier.modified(for: request) else { - completionHandler?(nil, NSError(domain: KingfisherErrorDomain, code: KingfisherError.downloadCancelledBeforeStarting.rawValue, userInfo: nil), nil, nil) - return nil - } - request = r - } - - // There is a possiblility that request modifier changed the url to `nil` or empty. - guard let url = request.url, !url.absoluteString.isEmpty else { - completionHandler?(nil, NSError(domain: KingfisherErrorDomain, code: KingfisherError.invalidURL.rawValue, userInfo: nil), nil, nil) - return nil - } - - var downloadTask: RetrieveImageDownloadTask? - setup(progressBlock: progressBlock, with: completionHandler, for: url, options: options) {(session, fetchLoad) -> Void in - if fetchLoad.downloadTask == nil { - let dataTask = session.dataTask(with: request) - - fetchLoad.downloadTask = RetrieveImageDownloadTask(internalTask: dataTask, ownerDownloader: self) - - dataTask.priority = options?.downloadPriority ?? URLSessionTask.defaultPriority - dataTask.resume() - self.delegate?.imageDownloader(self, willDownloadImageForURL: url, with: request) - - // Hold self while the task is executing. - self.sessionHandler.downloadHolder = self - } - - fetchLoad.downloadTaskCount += 1 - downloadTask = fetchLoad.downloadTask - - retrieveImageTask?.downloadTask = downloadTask - } - return downloadTask - } - -} - -// MARK: - Download method -extension ImageDownloader { - - // A single key may have multiple callbacks. Only download once. - func setup(progressBlock: ImageDownloaderProgressBlock?, with completionHandler: ImageDownloaderCompletionHandler?, for url: URL, options: KingfisherOptionsInfo?, started: @escaping ((URLSession, ImageFetchLoad) -> Void)) { - - func prepareFetchLoad() { - barrierQueue.sync(flags: .barrier) { - let loadObjectForURL = fetchLoads[url] ?? ImageFetchLoad() - let callbackPair = (progressBlock: progressBlock, completionHandler: completionHandler) - - loadObjectForURL.contents.append((callbackPair, options ?? KingfisherEmptyOptionsInfo)) - - fetchLoads[url] = loadObjectForURL - - if let session = session { - started(session, loadObjectForURL) - } - } - } - - if let fetchLoad = fetchLoad(for: url), fetchLoad.downloadTaskCount == 0 { - if fetchLoad.cancelSemaphore == nil { - fetchLoad.cancelSemaphore = DispatchSemaphore(value: 0) - } - cancelQueue.async { - _ = fetchLoad.cancelSemaphore?.wait(timeout: .distantFuture) - fetchLoad.cancelSemaphore = nil - prepareFetchLoad() - } - } else { - prepareFetchLoad() - } - } - - func cancelDownloadingTask(_ task: RetrieveImageDownloadTask) { - barrierQueue.sync(flags: .barrier) { - if let URL = task.internalTask.originalRequest?.url, let imageFetchLoad = self.fetchLoads[URL] { - imageFetchLoad.downloadTaskCount -= 1 - if imageFetchLoad.downloadTaskCount == 0 { - task.internalTask.cancel() - } - } - } - } -} - -// MARK: - NSURLSessionDataDelegate - -/// Delegate class for `NSURLSessionTaskDelegate`. -/// The session object will hold its delegate until it gets invalidated. -/// If we use `ImageDownloader` as the session delegate, it will not be released. -/// So we need an additional handler to break the retain cycle. -// See https://github.com/onevcat/Kingfisher/issues/235 -class ImageDownloaderSessionHandler: NSObject, URLSessionDataDelegate, AuthenticationChallengeResponsable { - - // The holder will keep downloader not released while a data task is being executed. - // It will be set when the task started, and reset when the task finished. - var downloadHolder: ImageDownloader? - - func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler: @escaping (URLSession.ResponseDisposition) -> Void) { - - guard let downloader = downloadHolder else { - completionHandler(.cancel) - return - } - - if let statusCode = (response as? HTTPURLResponse)?.statusCode, - let url = dataTask.originalRequest?.url, - !(downloader.delegate ?? downloader).isValidStatusCode(statusCode, for: downloader) - { - let error = NSError(domain: KingfisherErrorDomain, - code: KingfisherError.invalidStatusCode.rawValue, - userInfo: [KingfisherErrorStatusCodeKey: statusCode, NSLocalizedDescriptionKey: HTTPURLResponse.localizedString(forStatusCode: statusCode)]) - callCompletionHandlerFailure(error: error, url: url) - } - - completionHandler(.allow) - } - - func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive data: Data) { - - guard let downloader = downloadHolder else { - return - } - - if let url = dataTask.originalRequest?.url, let fetchLoad = downloader.fetchLoad(for: url) { - fetchLoad.responseData.append(data) - - if let expectedLength = dataTask.response?.expectedContentLength { - for content in fetchLoad.contents { - DispatchQueue.main.async { - content.callback.progressBlock?(Int64(fetchLoad.responseData.length), expectedLength) - } - } - } - } - } - - func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { - - guard let url = task.originalRequest?.url else { - return - } - - guard error == nil else { - callCompletionHandlerFailure(error: error!, url: url) - return - } - - processImage(for: task, url: url) - } - - /** - This method is exposed since the compiler requests. Do not call it. - */ - func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { - guard let downloader = downloadHolder else { - return - } - - downloader.authenticationChallengeResponder?.downloader(downloader, didReceive: challenge, completionHandler: completionHandler) - } - - func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { - guard let downloader = downloadHolder else { - return - } - - downloader.authenticationChallengeResponder?.downloader(downloader, task: task, didReceive: challenge, completionHandler: completionHandler) - } - - private func cleanFetchLoad(for url: URL) { - guard let downloader = downloadHolder else { - return - } - - downloader.barrierQueue.sync(flags: .barrier) { - downloader.fetchLoads.removeValue(forKey: url) - if downloader.fetchLoads.isEmpty { - downloadHolder = nil - } - } - } - - private func callCompletionHandlerFailure(error: Error, url: URL) { - guard let downloader = downloadHolder, let fetchLoad = downloader.fetchLoad(for: url) else { - return - } - - // We need to clean the fetch load first, before actually calling completion handler. - cleanFetchLoad(for: url) - - var leftSignal: Int - repeat { - leftSignal = fetchLoad.cancelSemaphore?.signal() ?? 0 - } while leftSignal != 0 - - for content in fetchLoad.contents { - content.options.callbackDispatchQueue.safeAsync { - content.callback.completionHandler?(nil, error as NSError, url, nil) - } - } - } - - private func processImage(for task: URLSessionTask, url: URL) { - - guard let downloader = downloadHolder else { - return - } - - // We are on main queue when receiving this. - downloader.processQueue.async { - - guard let fetchLoad = downloader.fetchLoad(for: url) else { - return - } - - self.cleanFetchLoad(for: url) - - let data: Data? - let fetchedData = fetchLoad.responseData as Data - - if let delegate = downloader.delegate { - data = delegate.imageDownloader(downloader, didDownload: fetchedData, for: url) - } else { - data = fetchedData - } - - // Cache the processed images. So we do not need to re-process the image if using the same processor. - // Key is the identifier of processor. - var imageCache: [String: Image] = [:] - for content in fetchLoad.contents { - - let options = content.options - let completionHandler = content.callback.completionHandler - let callbackQueue = options.callbackDispatchQueue - - let processor = options.processor - - var image = imageCache[processor.identifier] - if let data = data, image == nil { - image = processor.process(item: .data(data), options: options) - // Add the processed image to cache. - // If `image` is nil, nothing will happen (since the key is not existing before). - imageCache[processor.identifier] = image - } - - if let image = image { - - downloader.delegate?.imageDownloader(downloader, didDownload: image, for: url, with: task.response) - - if options.backgroundDecode { - let decodedImage = image.kf.decoded - callbackQueue.safeAsync { completionHandler?(decodedImage, nil, url, data) } - } else { - callbackQueue.safeAsync { completionHandler?(image, nil, url, data) } - } - - } else { - if let res = task.response as? HTTPURLResponse , res.statusCode == 304 { - let notModified = NSError(domain: KingfisherErrorDomain, code: KingfisherError.notModified.rawValue, userInfo: nil) - completionHandler?(nil, notModified, url, nil) - continue - } - - let badData = NSError(domain: KingfisherErrorDomain, code: KingfisherError.badData.rawValue, userInfo: nil) - callbackQueue.safeAsync { completionHandler?(nil, badData, url, nil) } - } - } - } - } -} - -// Placeholder. For retrieving extension methods of ImageDownloaderDelegate -extension ImageDownloader: ImageDownloaderDelegate {} - diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImagePrefetcher.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImagePrefetcher.swift deleted file mode 100755 index 558ddfa..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImagePrefetcher.swift +++ /dev/null @@ -1,264 +0,0 @@ -// -// ImagePrefetcher.swift -// Kingfisher -// -// Created by Claire Knight on 24/02/2016 -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - - -#if os(macOS) - import AppKit -#else - import UIKit -#endif - - -/// Progress update block of prefetcher. -/// -/// - `skippedResources`: An array of resources that are already cached before the prefetching starting. -/// - `failedResources`: An array of resources that fail to be downloaded. It could because of being cancelled while downloading, encountered an error when downloading or the download not being started at all. -/// - `completedResources`: An array of resources that are downloaded and cached successfully. -public typealias PrefetcherProgressBlock = ((_ skippedResources: [Resource], _ failedResources: [Resource], _ completedResources: [Resource]) -> ()) - -/// Completion block of prefetcher. -/// -/// - `skippedResources`: An array of resources that are already cached before the prefetching starting. -/// - `failedResources`: An array of resources that fail to be downloaded. It could because of being cancelled while downloading, encountered an error when downloading or the download not being started at all. -/// - `completedResources`: An array of resources that are downloaded and cached successfully. -public typealias PrefetcherCompletionHandler = ((_ skippedResources: [Resource], _ failedResources: [Resource], _ completedResources: [Resource]) -> ()) - -/// `ImagePrefetcher` represents a downloading manager for requesting many images via URLs, then caching them. -/// This is useful when you know a list of image resources and want to download them before showing. -public class ImagePrefetcher { - - /// The maximum concurrent downloads to use when prefetching images. Default is 5. - public var maxConcurrentDownloads = 5 - - private let prefetchResources: [Resource] - private let optionsInfo: KingfisherOptionsInfo - private var progressBlock: PrefetcherProgressBlock? - private var completionHandler: PrefetcherCompletionHandler? - - private var tasks = [URL: RetrieveImageDownloadTask]() - - private var pendingResources: ArraySlice - private var skippedResources = [Resource]() - private var completedResources = [Resource]() - private var failedResources = [Resource]() - - private var stopped = false - - // The created manager used for prefetch. We will use the helper method in manager. - private let manager: KingfisherManager - - private var finished: Bool { - return failedResources.count + skippedResources.count + completedResources.count == prefetchResources.count && self.tasks.isEmpty - } - - /** - Init an image prefetcher with an array of URLs. - - The prefetcher should be initiated with a list of prefetching targets. The URLs list is immutable. - After you get a valid `ImagePrefetcher` object, you could call `start()` on it to begin the prefetching process. - The images already cached will be skipped without downloading again. - - - parameter urls: The URLs which should be prefetched. - - parameter options: A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more. - - parameter progressBlock: Called every time an resource is downloaded, skipped or cancelled. - - parameter completionHandler: Called when the whole prefetching process finished. - - - returns: An `ImagePrefetcher` object. - - - Note: By default, the `ImageDownloader.defaultDownloader` and `ImageCache.defaultCache` will be used as - the downloader and cache target respectively. You can specify another downloader or cache by using a customized `KingfisherOptionsInfo`. - Both the progress and completion block will be invoked in main thread. The `CallbackDispatchQueue` in `optionsInfo` will be ignored in this method. - */ - public convenience init(urls: [URL], - options: KingfisherOptionsInfo? = nil, - progressBlock: PrefetcherProgressBlock? = nil, - completionHandler: PrefetcherCompletionHandler? = nil) - { - let resources: [Resource] = urls.map { $0 } - self.init(resources: resources, options: options, progressBlock: progressBlock, completionHandler: completionHandler) - } - - /** - Init an image prefetcher with an array of resources. - - The prefetcher should be initiated with a list of prefetching targets. The resources list is immutable. - After you get a valid `ImagePrefetcher` object, you could call `start()` on it to begin the prefetching process. - The images already cached will be skipped without downloading again. - - - parameter resources: The resources which should be prefetched. See `Resource` type for more. - - parameter options: A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more. - - parameter progressBlock: Called every time an resource is downloaded, skipped or cancelled. - - parameter completionHandler: Called when the whole prefetching process finished. - - - returns: An `ImagePrefetcher` object. - - - Note: By default, the `ImageDownloader.defaultDownloader` and `ImageCache.defaultCache` will be used as - the downloader and cache target respectively. You can specify another downloader or cache by using a customized `KingfisherOptionsInfo`. - Both the progress and completion block will be invoked in main thread. The `CallbackDispatchQueue` in `optionsInfo` will be ignored in this method. - */ - public init(resources: [Resource], - options: KingfisherOptionsInfo? = nil, - progressBlock: PrefetcherProgressBlock? = nil, - completionHandler: PrefetcherCompletionHandler? = nil) - { - prefetchResources = resources - pendingResources = ArraySlice(resources) - - // We want all callbacks from main queue, so we ignore the call back queue in options - let optionsInfoWithoutQueue = options?.removeAllMatchesIgnoringAssociatedValue(.callbackDispatchQueue(nil)) - self.optionsInfo = optionsInfoWithoutQueue ?? KingfisherEmptyOptionsInfo - - let cache = self.optionsInfo.targetCache - let downloader = self.optionsInfo.downloader - manager = KingfisherManager(downloader: downloader, cache: cache) - - self.progressBlock = progressBlock - self.completionHandler = completionHandler - } - - /** - Start to download the resources and cache them. This can be useful for background downloading - of assets that are required for later use in an app. This code will not try and update any UI - with the results of the process. - */ - public func start() - { - // Since we want to handle the resources cancellation in main thread only. - DispatchQueue.main.safeAsync { - - guard !self.stopped else { - assertionFailure("You can not restart the same prefetcher. Try to create a new prefetcher.") - self.handleComplete() - return - } - - guard self.maxConcurrentDownloads > 0 else { - assertionFailure("There should be concurrent downloads value should be at least 1.") - self.handleComplete() - return - } - - guard self.prefetchResources.count > 0 else { - self.handleComplete() - return - } - - let initialConcurentDownloads = min(self.prefetchResources.count, self.maxConcurrentDownloads) - for _ in 0 ..< initialConcurentDownloads { - if let resource = self.pendingResources.popFirst() { - self.startPrefetching(resource) - } - } - } - } - - - /** - Stop current downloading progress, and cancel any future prefetching activity that might be occuring. - */ - public func stop() { - DispatchQueue.main.safeAsync { - if self.finished { return } - self.stopped = true - self.tasks.values.forEach { $0.cancel() } - } - } - - func downloadAndCache(_ resource: Resource) { - - let downloadTaskCompletionHandler: CompletionHandler = { (image, error, _, _) -> () in - self.tasks.removeValue(forKey: resource.downloadURL) - if let _ = error { - self.failedResources.append(resource) - } else { - self.completedResources.append(resource) - } - - self.reportProgress() - if self.stopped { - if self.tasks.isEmpty { - self.failedResources.append(contentsOf: self.pendingResources) - self.handleComplete() - } - } else { - self.reportCompletionOrStartNext() - } - } - - let downloadTask = manager.downloadAndCacheImage( - with: resource.downloadURL, - forKey: resource.cacheKey, - retrieveImageTask: RetrieveImageTask(), - progressBlock: nil, - completionHandler: downloadTaskCompletionHandler, - options: optionsInfo) - - if let downloadTask = downloadTask { - tasks[resource.downloadURL] = downloadTask - } - } - - func append(cached resource: Resource) { - skippedResources.append(resource) - - reportProgress() - reportCompletionOrStartNext() - } - - func startPrefetching(_ resource: Resource) - { - if optionsInfo.forceRefresh { - downloadAndCache(resource) - } else { - let alreadyInCache = manager.cache.imageCachedType(forKey: resource.cacheKey, - processorIdentifier: optionsInfo.processor.identifier).cached - if alreadyInCache { - append(cached: resource) - } else { - downloadAndCache(resource) - } - } - } - - func reportProgress() { - progressBlock?(skippedResources, failedResources, completedResources) - } - - func reportCompletionOrStartNext() { - if let resource = pendingResources.popFirst() { - startPrefetching(resource) - } else { - guard tasks.isEmpty else { return } - handleComplete() - } - } - - func handleComplete() { - completionHandler?(skippedResources, failedResources, completedResources) - completionHandler = nil - progressBlock = nil - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageProcessor.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageProcessor.swift deleted file mode 100644 index e448802..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageProcessor.swift +++ /dev/null @@ -1,586 +0,0 @@ -// -// ImageProcessor.swift -// Kingfisher -// -// Created by Wei Wang on 2016/08/26. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -import Foundation -import CoreGraphics - -/// The item which could be processed by an `ImageProcessor` -/// -/// - image: Input image -/// - data: Input data -public enum ImageProcessItem { - case image(Image) - case data(Data) -} - -/// An `ImageProcessor` would be used to convert some downloaded data to an image. -public protocol ImageProcessor { - /// Identifier of the processor. It will be used to identify the processor when - /// caching and retriving an image. You might want to make sure that processors with - /// same properties/functionality have the same identifiers, so correct processed images - /// could be retrived with proper key. - /// - /// - Note: Do not supply an empty string for a customized processor, which is already taken by - /// the `DefaultImageProcessor`. It is recommended to use a reverse domain name notation - /// string of your own for the identifier. - var identifier: String { get } - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: The return value will be `nil` if processing failed while converting data to image. - /// If input item is already an image and there is any errors in processing, the input - /// image itself will be returned. - /// - Note: Most processor only supports CG-based images. - /// watchOS is not supported for processers containing filter, the input image will be returned directly on watchOS. - func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? -} - -typealias ProcessorImp = ((ImageProcessItem, KingfisherOptionsInfo) -> Image?) - -public extension ImageProcessor { - - /// Append an `ImageProcessor` to another. The identifier of the new `ImageProcessor` - /// will be "\(self.identifier)|>\(another.identifier)". - /// - /// - parameter another: An `ImageProcessor` you want to append to `self`. - /// - /// - returns: The new `ImageProcessor` will process the image in the order - /// of the two processors concatenated. - public func append(another: ImageProcessor) -> ImageProcessor { - let newIdentifier = identifier.appending("|>\(another.identifier)") - return GeneralProcessor(identifier: newIdentifier) { - item, options in - if let image = self.process(item: item, options: options) { - return another.process(item: .image(image), options: options) - } else { - return nil - } - } - } -} - -func ==(left: ImageProcessor, right: ImageProcessor) -> Bool { - return left.identifier == right.identifier -} - -func !=(left: ImageProcessor, right: ImageProcessor) -> Bool { - return !(left == right) -} - -fileprivate struct GeneralProcessor: ImageProcessor { - let identifier: String - let p: ProcessorImp - func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - return p(item, options) - } -} - -/// The default processor. It convert the input data to a valid image. -/// Images of .PNG, .JPEG and .GIF format are supported. -/// If an image is given, `DefaultImageProcessor` will do nothing on it and just return that image. -public struct DefaultImageProcessor: ImageProcessor { - - /// A default `DefaultImageProcessor` could be used across. - public static let `default` = DefaultImageProcessor() - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier = "" - - /// Initialize a `DefaultImageProcessor` - public init() {} - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - switch item { - case .image(let image): - return image - case .data(let data): - return Kingfisher.image( - data: data, - scale: options.scaleFactor, - preloadAllAnimationData: options.preloadAllAnimationData, - onlyFirstFrame: options.onlyLoadFirstFrame) - } - } -} - -public struct RectCorner: OptionSet { - public let rawValue: Int - public static let topLeft = RectCorner(rawValue: 1 << 0) - public static let topRight = RectCorner(rawValue: 1 << 1) - public static let bottomLeft = RectCorner(rawValue: 1 << 2) - public static let bottomRight = RectCorner(rawValue: 1 << 3) - public static let all: RectCorner = [.topLeft, .topRight, .bottomLeft, .bottomRight] - - public init(rawValue: Int) { - self.rawValue = rawValue - } - - var cornerIdentifier: String { - if self == .all { - return "" - } - return "_corner(\(rawValue))" - } -} - -/// Processor for making round corner images. Only CG-based images are supported in macOS, -/// if a non-CG image passed in, the processor will do nothing. -public struct RoundCornerImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Corner radius will be applied in processing. - public let cornerRadius: CGFloat - - /// The target corners which will be applied rounding. - public let roundingCorners: RectCorner - - /// Target size of output image should be. If `nil`, the image will keep its original size after processing. - public let targetSize: CGSize? - - /// Background color of the output image. If `nil`, it will stay transparent. - public let backgroundColor: Color? - - /// Initialize a `RoundCornerImageProcessor` - /// - /// - parameter cornerRadius: Corner radius will be applied in processing. - /// - parameter targetSize: Target size of output image should be. If `nil`, - /// the image will keep its original size after processing. - /// Default is `nil`. - /// - parameter corners: The target corners which will be applied rounding. Default is `.all`. - /// - parameter backgroundColor: Backgroud color to apply for the output image. Default is `nil`. - public init(cornerRadius: CGFloat, targetSize: CGSize? = nil, roundingCorners corners: RectCorner = .all, backgroundColor: Color? = nil) { - self.cornerRadius = cornerRadius - self.targetSize = targetSize - self.roundingCorners = corners - self.backgroundColor = backgroundColor - - self.identifier = { - var identifier = "" - - if let size = targetSize { - identifier = "com.onevcat.Kingfisher.RoundCornerImageProcessor(\(cornerRadius)_\(size)\(corners.cornerIdentifier))" - } else { - identifier = "com.onevcat.Kingfisher.RoundCornerImageProcessor(\(cornerRadius)\(corners.cornerIdentifier))" - } - if let backgroundColor = backgroundColor { - identifier += "_\(backgroundColor)" - } - - return identifier - }() - } - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - switch item { - case .image(let image): - let size = targetSize ?? image.kf.size - return image.kf.image(withRoundRadius: cornerRadius, fit: size, roundingCorners: roundingCorners, backgroundColor: backgroundColor) - case .data(_): - return (DefaultImageProcessor.default >> self).process(item: item, options: options) - } - } -} - - -/// Specify how a size adjusts itself to fit a target size. -/// -/// - none: Not scale the content. -/// - aspectFit: Scale the content to fit the size of the view by maintaining the aspect ratio. -/// - aspectFill: Scale the content to fill the size of the view -public enum ContentMode { - case none - case aspectFit - case aspectFill -} - -/// Processor for resizing images. Only CG-based images are supported in macOS. -public struct ResizingImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// The reference size for resizing operation. - public let referenceSize: CGSize - - /// Target content mode of output image should be. - /// Default to ContentMode.none - public let targetContentMode: ContentMode - - /// Initialize a `ResizingImageProcessor`. - /// - /// - Parameters: - /// - referenceSize: The reference size for resizing operation. - /// - mode: Target content mode of output image should be. - /// - /// - Note: - /// The instance of `ResizingImageProcessor` will follow its `mode` property - /// and try to resizing the input images to fit or fill the `referenceSize`. - /// That means if you are using a `mode` besides of `.none`, you may get an - /// image with its size not be the same as the `referenceSize`. - /// - /// **Example**: With input image size: {100, 200}, - /// `referenceSize`: {100, 100}, `mode`: `.aspectFit`, - /// you will get an output image with size of {50, 100}, which "fit"s - /// the `referenceSize`. - /// - /// If you need an output image exactly to be a specified size, append or use - /// a `CroppingImageProcessor`. - public init(referenceSize: CGSize, mode: ContentMode = .none) { - self.referenceSize = referenceSize - self.targetContentMode = mode - - if mode == .none { - self.identifier = "com.onevcat.Kingfisher.ResizingImageProcessor(\(referenceSize))" - } else { - self.identifier = "com.onevcat.Kingfisher.ResizingImageProcessor(\(referenceSize), \(mode))" - } - } - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - switch item { - case .image(let image): - return image.kf.resize(to: referenceSize, for: targetContentMode) - case .data(_): - return (DefaultImageProcessor.default >> self).process(item: item, options: options) - } - } -} - -/// Processor for adding blur effect to images. `Accelerate.framework` is used underhood for -/// a better performance. A simulated Gaussian blur with specified blur radius will be applied. -public struct BlurImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Blur radius for the simulated Gaussian blur. - public let blurRadius: CGFloat - - /// Initialize a `BlurImageProcessor` - /// - /// - parameter blurRadius: Blur radius for the simulated Gaussian blur. - public init(blurRadius: CGFloat) { - self.blurRadius = blurRadius - self.identifier = "com.onevcat.Kingfisher.BlurImageProcessor(\(blurRadius))" - } - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - switch item { - case .image(let image): - let radius = blurRadius * options.scaleFactor - return image.kf.blurred(withRadius: radius) - case .data(_): - return (DefaultImageProcessor.default >> self).process(item: item, options: options) - } - } -} - -/// Processor for adding an overlay to images. Only CG-based images are supported in macOS. -public struct OverlayImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Overlay color will be used to overlay the input image. - public let overlay: Color - - /// Fraction will be used when overlay the color to image. - public let fraction: CGFloat - - /// Initialize an `OverlayImageProcessor` - /// - /// - parameter overlay: Overlay color will be used to overlay the input image. - /// - parameter fraction: Fraction will be used when overlay the color to image. - /// From 0.0 to 1.0. 0.0 means solid color, 1.0 means transparent overlay. - public init(overlay: Color, fraction: CGFloat = 0.5) { - self.overlay = overlay - self.fraction = fraction - self.identifier = "com.onevcat.Kingfisher.OverlayImageProcessor(\(overlay.hex)_\(fraction))" - } - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - switch item { - case .image(let image): - return image.kf.overlaying(with: overlay, fraction: fraction) - case .data(_): - return (DefaultImageProcessor.default >> self).process(item: item, options: options) - } - } -} - -/// Processor for tint images with color. Only CG-based images are supported. -public struct TintImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Tint color will be used to tint the input image. - public let tint: Color - - /// Initialize a `TintImageProcessor` - /// - /// - parameter tint: Tint color will be used to tint the input image. - public init(tint: Color) { - self.tint = tint - self.identifier = "com.onevcat.Kingfisher.TintImageProcessor(\(tint.hex))" - } - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - switch item { - case .image(let image): - return image.kf.tinted(with: tint) - case .data(_): - return (DefaultImageProcessor.default >> self).process(item: item, options: options) - } - } -} - -/// Processor for applying some color control to images. Only CG-based images are supported. -/// watchOS is not supported. -public struct ColorControlsProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Brightness changing to image. - public let brightness: CGFloat - - /// Contrast changing to image. - public let contrast: CGFloat - - /// Saturation changing to image. - public let saturation: CGFloat - - /// InputEV changing to image. - public let inputEV: CGFloat - - /// Initialize a `ColorControlsProcessor` - /// - /// - parameter brightness: Brightness changing to image. - /// - parameter contrast: Contrast changing to image. - /// - parameter saturation: Saturation changing to image. - /// - parameter inputEV: InputEV changing to image. - public init(brightness: CGFloat, contrast: CGFloat, saturation: CGFloat, inputEV: CGFloat) { - self.brightness = brightness - self.contrast = contrast - self.saturation = saturation - self.inputEV = inputEV - self.identifier = "com.onevcat.Kingfisher.ColorControlsProcessor(\(brightness)_\(contrast)_\(saturation)_\(inputEV))" - } - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - switch item { - case .image(let image): - return image.kf.adjusted(brightness: brightness, contrast: contrast, saturation: saturation, inputEV: inputEV) - case .data(_): - return (DefaultImageProcessor.default >> self).process(item: item, options: options) - } - } -} - -/// Processor for applying black and white effect to images. Only CG-based images are supported. -/// watchOS is not supported. -public struct BlackWhiteProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier = "com.onevcat.Kingfisher.BlackWhiteProcessor" - - /// Initialize a `BlackWhiteProcessor` - public init() {} - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - return ColorControlsProcessor(brightness: 0.0, contrast: 1.0, saturation: 0.0, inputEV: 0.7) - .process(item: item, options: options) - } -} - -/// Processor for cropping an image. Only CG-based images are supported. -/// watchOS is not supported. -public struct CroppingImageProcessor: ImageProcessor { - - /// Identifier of the processor. - /// - Note: See documentation of `ImageProcessor` protocol for more. - public let identifier: String - - /// Target size of output image should be. - public let size: CGSize - - /// Anchor point from which the output size should be calculate. - /// The anchor point is consisted by two values between 0.0 and 1.0. - /// It indicates a related point in current image. - /// See `CroppingImageProcessor.init(size:anchor:)` for more. - public let anchor: CGPoint - - /// Initialize a `CroppingImageProcessor` - /// - /// - Parameters: - /// - size: Target size of output image should be. - /// - anchor: The anchor point from which the size should be calculated. - /// Default is `CGPoint(x: 0.5, y: 0.5)`, which means the center of input image. - /// - Note: - /// The anchor point is consisted by two values between 0.0 and 1.0. - /// It indicates a related point in current image, eg: (0.0, 0.0) for top-left - /// corner, (0.5, 0.5) for center and (1.0, 1.0) for bottom-right corner. - /// The `size` property of `CroppingImageProcessor` will be used along with - /// `anchor` to calculate a target rectange in the size of image. - /// - /// The target size will be automatically calculated with a reasonable behavior. - /// For example, when you have an image size of `CGSize(width: 100, height: 100)`, - /// and a target size of `CGSize(width: 20, height: 20)`: - /// - with a (0.0, 0.0) anchor (top-left), the crop rect will be `{0, 0, 20, 20}`; - /// - with a (0.5, 0.5) anchor (center), it will be `{40, 40, 20, 20}` - /// - while with a (1.0, 1.0) anchor (bottom-right), it will be `{80, 80, 20, 20}` - public init(size: CGSize, anchor: CGPoint = CGPoint(x: 0.5, y: 0.5)) { - self.size = size - self.anchor = anchor - self.identifier = "com.onevcat.Kingfisher.CroppingImageProcessor(\(size)_\(anchor))" - } - - /// Process an input `ImageProcessItem` item to an image for this processor. - /// - /// - parameter item: Input item which will be processed by `self` - /// - parameter options: Options when processing the item. - /// - /// - returns: The processed image. - /// - /// - Note: See documentation of `ImageProcessor` protocol for more. - public func process(item: ImageProcessItem, options: KingfisherOptionsInfo) -> Image? { - switch item { - case .image(let image): - return image.kf.crop(to: size, anchorOn: anchor) - case .data(_): return (DefaultImageProcessor.default >> self).process(item: item, options: options) - } - } -} - -/// Concatenate two `ImageProcessor`s. `ImageProcessor.appen(another:)` is used internally. -/// -/// - parameter left: First processor. -/// - parameter right: Second processor. -/// -/// - returns: The concatenated processor. -public func >>(left: ImageProcessor, right: ImageProcessor) -> ImageProcessor { - return left.append(another: right) -} - -fileprivate extension Color { - var hex: String { - var r: CGFloat = 0 - var g: CGFloat = 0 - var b: CGFloat = 0 - var a: CGFloat = 0 - - getRed(&r, green: &g, blue: &b, alpha: &a) - - let rInt = Int(r * 255) << 24 - let gInt = Int(g * 255) << 16 - let bInt = Int(b * 255) << 8 - let aInt = Int(a * 255) - - let rgba = rInt | gInt | bInt | aInt - - return String(format:"#%08x", rgba) - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageTransition.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageTransition.swift deleted file mode 100755 index 3fe894a..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageTransition.swift +++ /dev/null @@ -1,128 +0,0 @@ -// -// ImageTransition.swift -// Kingfisher -// -// Created by Wei Wang on 15/9/18. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -#if os(macOS) -// Not implemented for macOS and watchOS yet. - -import AppKit - -/// Image transition is not supported on macOS. -public enum ImageTransition { - case none - var duration: TimeInterval { - return 0 - } -} - -#elseif os(watchOS) -import UIKit -/// Image transition is not supported on watchOS. -public enum ImageTransition { - case none - var duration: TimeInterval { - return 0 - } -} -#else -import UIKit - -/** -Transition effect which will be used when an image downloaded and set by `UIImageView` extension API in Kingfisher. -You can assign an enum value with transition duration as an item in `KingfisherOptionsInfo` -to enable the animation transition. - -Apple's UIViewAnimationOptions is used under the hood. -For custom transition, you should specified your own transition options, animations and -comletion handler as well. -*/ -public enum ImageTransition { - /// No animation transistion. - case none - - /// Fade in the loaded image. - case fade(TimeInterval) - - /// Flip from left transition. - case flipFromLeft(TimeInterval) - - /// Flip from right transition. - case flipFromRight(TimeInterval) - - /// Flip from top transition. - case flipFromTop(TimeInterval) - - /// Flip from bottom transition. - case flipFromBottom(TimeInterval) - - /// Custom transition. - case custom(duration: TimeInterval, - options: UIView.AnimationOptions, - animations: ((UIImageView, UIImage) -> Void)?, - completion: ((Bool) -> Void)?) - - var duration: TimeInterval { - switch self { - case .none: return 0 - case .fade(let duration): return duration - - case .flipFromLeft(let duration): return duration - case .flipFromRight(let duration): return duration - case .flipFromTop(let duration): return duration - case .flipFromBottom(let duration): return duration - - case .custom(let duration, _, _, _): return duration - } - } - - var animationOptions: UIView.AnimationOptions { - switch self { - case .none: return [] - case .fade(_): return .transitionCrossDissolve - - case .flipFromLeft(_): return .transitionFlipFromLeft - case .flipFromRight(_): return .transitionFlipFromRight - case .flipFromTop(_): return .transitionFlipFromTop - case .flipFromBottom(_): return .transitionFlipFromBottom - - case .custom(_, let options, _, _): return options - } - } - - var animations: ((UIImageView, UIImage) -> Void)? { - switch self { - case .custom(_, _, let animations, _): return animations - default: return { $0.image = $1 } - } - } - - var completion: ((Bool) -> Void)? { - switch self { - case .custom(_, _, _, let completion): return completion - default: return nil - } - } -} -#endif diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageView+Kingfisher.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageView+Kingfisher.swift deleted file mode 100755 index b39bfae..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ImageView+Kingfisher.swift +++ /dev/null @@ -1,258 +0,0 @@ -// -// ImageView+Kingfisher.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -// MARK: - Extension methods. -/** - * Set image to use from web. - */ -extension Kingfisher where Base: ImageView { - /** - Set an image with a resource, a placeholder image, options, progress handler and completion handler. - - - parameter resource: Resource object contains information such as `cacheKey` and `downloadURL`. - - parameter placeholder: A placeholder image when retrieving the image at URL. - - parameter options: A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more. - - parameter progressBlock: Called when the image downloading progress gets updated. - - parameter completionHandler: Called when the image retrieved and set. - - - returns: A task represents the retrieving process. - - - note: Both the `progressBlock` and `completionHandler` will be invoked in main thread. - The `CallbackDispatchQueue` specified in `optionsInfo` will not be used in callbacks of this method. - - If `resource` is `nil`, the `placeholder` image will be set and - `completionHandler` will be called with both `error` and `image` being `nil`. - */ - @discardableResult - public func setImage(with resource: Resource?, - placeholder: Placeholder? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: CompletionHandler? = nil) -> RetrieveImageTask - { - guard let resource = resource else { - self.placeholder = placeholder - setWebURL(nil) - completionHandler?(nil, nil, .none, nil) - return .empty - } - - var options = KingfisherManager.shared.defaultOptions + (options ?? KingfisherEmptyOptionsInfo) - let noImageOrPlaceholderSet = base.image == nil && self.placeholder == nil - - if !options.keepCurrentImageWhileLoading || noImageOrPlaceholderSet { // Always set placeholder while there is no image/placehoer yet. - self.placeholder = placeholder - } - - let maybeIndicator = indicator - maybeIndicator?.startAnimatingView() - - setWebURL(resource.downloadURL) - - if base.shouldPreloadAllAnimation() { - options.append(.preloadAllAnimationData) - } - - let task = KingfisherManager.shared.retrieveImage( - with: resource, - options: options, - progressBlock: { receivedSize, totalSize in - guard resource.downloadURL == self.webURL else { - return - } - if let progressBlock = progressBlock { - progressBlock(receivedSize, totalSize) - } - }, - completionHandler: {[weak base] image, error, cacheType, imageURL in - DispatchQueue.main.safeAsync { - maybeIndicator?.stopAnimatingView() - guard let strongBase = base, imageURL == self.webURL else { - completionHandler?(image, error, cacheType, imageURL) - return - } - - self.setImageTask(nil) - guard let image = image else { - completionHandler?(nil, error, cacheType, imageURL) - return - } - - guard let transitionItem = options.lastMatchIgnoringAssociatedValue(.transition(.none)), - case .transition(let transition) = transitionItem, ( options.forceTransition || cacheType == .none) else - { - self.placeholder = nil - strongBase.image = image - completionHandler?(image, error, cacheType, imageURL) - return - } - - #if !os(macOS) - UIView.transition(with: strongBase, duration: 0.0, options: [], - animations: { maybeIndicator?.stopAnimatingView() }, - completion: { _ in - - self.placeholder = nil - UIView.transition(with: strongBase, duration: transition.duration, - options: [transition.animationOptions, .allowUserInteraction], - animations: { - // Set image property in the animation. - transition.animations?(strongBase, image) - }, - completion: { finished in - transition.completion?(finished) - completionHandler?(image, error, cacheType, imageURL) - }) - }) - #endif - } - }) - - setImageTask(task) - - return task - } - - /** - Cancel the image download task bounded to the image view if it is running. - Nothing will happen if the downloading has already finished. - */ - public func cancelDownloadTask() { - imageTask?.cancel() - } -} - -// MARK: - Associated Object -private var lastURLKey: Void? -private var indicatorKey: Void? -private var indicatorTypeKey: Void? -private var placeholderKey: Void? -private var imageTaskKey: Void? - -extension Kingfisher where Base: ImageView { - /// Get the image URL binded to this image view. - public var webURL: URL? { - return objc_getAssociatedObject(base, &lastURLKey) as? URL - } - - fileprivate func setWebURL(_ url: URL?) { - objc_setAssociatedObject(base, &lastURLKey, url, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - - /// Holds which indicator type is going to be used. - /// Default is .none, means no indicator will be shown. - public var indicatorType: IndicatorType { - get { - let indicator = (objc_getAssociatedObject(base, &indicatorTypeKey) as? Box)?.value - return indicator ?? .none - } - - set { - switch newValue { - case .none: - indicator = nil - case .activity: - indicator = ActivityIndicator() - case .image(let data): - indicator = ImageIndicator(imageData: data) - case .custom(let anIndicator): - indicator = anIndicator - } - - objc_setAssociatedObject(base, &indicatorTypeKey, Box(value: newValue), .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - /// Holds any type that conforms to the protocol `Indicator`. - /// The protocol `Indicator` has a `view` property that will be shown when loading an image. - /// It will be `nil` if `indicatorType` is `.none`. - public fileprivate(set) var indicator: Indicator? { - get { - return (objc_getAssociatedObject(base, &indicatorKey) as? Box)?.value - } - - set { - // Remove previous - if let previousIndicator = indicator { - previousIndicator.view.removeFromSuperview() - } - - // Add new - if var newIndicator = newValue { - // Set default indicator frame if the view's frame not set. - if newIndicator.view.frame == .zero { - newIndicator.view.frame = base.frame - } - newIndicator.viewCenter = CGPoint(x: base.bounds.midX, y: base.bounds.midY) - newIndicator.view.isHidden = true - base.addSubview(newIndicator.view) - } - - // Save in associated object - objc_setAssociatedObject(base, &indicatorKey, Box(value: newValue), .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } - - fileprivate var imageTask: RetrieveImageTask? { - return objc_getAssociatedObject(base, &imageTaskKey) as? RetrieveImageTask - } - - fileprivate func setImageTask(_ task: RetrieveImageTask?) { - objc_setAssociatedObject(base, &imageTaskKey, task, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - - public fileprivate(set) var placeholder: Placeholder? { - get { - return (objc_getAssociatedObject(base, &placeholderKey) as? Box)?.value - } - - set { - if let previousPlaceholder = placeholder { - previousPlaceholder.remove(from: base) - } - - if let newPlaceholder = newValue { - newPlaceholder.add(to: base) - } else { - base.image = nil - } - - objc_setAssociatedObject(base, &placeholderKey, Box(value: newValue), .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - } -} - - -@objc extension ImageView { - func shouldPreloadAllAnimation() -> Bool { return true } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Indicator.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Indicator.swift deleted file mode 100644 index 2651676..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Indicator.swift +++ /dev/null @@ -1,199 +0,0 @@ -// -// Indicator.swift -// Kingfisher -// -// Created by João D. Moreira on 30/08/16. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -#if os(macOS) - import AppKit -#else - import UIKit -#endif - -#if os(macOS) - public typealias IndicatorView = NSView -#else - public typealias IndicatorView = UIView -#endif - -public enum IndicatorType { - /// No indicator. - case none - /// Use system activity indicator. - case activity - /// Use an image as indicator. GIF is supported. - case image(imageData: Data) - /// Use a custom indicator, which conforms to the `Indicator` protocol. - case custom(indicator: Indicator) -} - -// MARK: - Indicator Protocol -public protocol Indicator { - func startAnimatingView() - func stopAnimatingView() - - var viewCenter: CGPoint { get set } - var view: IndicatorView { get } -} - -extension Indicator { - #if os(macOS) - public var viewCenter: CGPoint { - get { - let frame = view.frame - return CGPoint(x: frame.origin.x + frame.size.width / 2.0, y: frame.origin.y + frame.size.height / 2.0 ) - } - set { - let frame = view.frame - let newFrame = CGRect(x: newValue.x - frame.size.width / 2.0, - y: newValue.y - frame.size.height / 2.0, - width: frame.size.width, - height: frame.size.height) - view.frame = newFrame - } - } - #else - public var viewCenter: CGPoint { - get { - return view.center - } - set { - view.center = newValue - } - } - #endif -} - -// MARK: - ActivityIndicator -// Displays a NSProgressIndicator / UIActivityIndicatorView -class ActivityIndicator: Indicator { - - #if os(macOS) - private let activityIndicatorView: NSProgressIndicator - #else - private let activityIndicatorView: UIActivityIndicatorView - #endif - private var animatingCount = 0 - - var view: IndicatorView { - return activityIndicatorView - } - - func startAnimatingView() { - animatingCount += 1 - // Alrady animating - if animatingCount == 1 { - #if os(macOS) - activityIndicatorView.startAnimation(nil) - #else - activityIndicatorView.startAnimating() - #endif - activityIndicatorView.isHidden = false - } - } - - func stopAnimatingView() { - animatingCount = max(animatingCount - 1, 0) - if animatingCount == 0 { - #if os(macOS) - activityIndicatorView.stopAnimation(nil) - #else - activityIndicatorView.stopAnimating() - #endif - activityIndicatorView.isHidden = true - } - } - - init() { - #if os(macOS) - activityIndicatorView = NSProgressIndicator(frame: CGRect(x: 0, y: 0, width: 16, height: 16)) - activityIndicatorView.controlSize = .small - activityIndicatorView.style = .spinning - #else - #if os(tvOS) - let indicatorStyle = UIActivityIndicatorViewStyle.white - #else - let indicatorStyle = UIActivityIndicatorView.Style.gray - #endif - activityIndicatorView = UIActivityIndicatorView(style:indicatorStyle) - activityIndicatorView.autoresizingMask = [.flexibleLeftMargin, .flexibleRightMargin, .flexibleBottomMargin, .flexibleTopMargin] - #endif - } -} - -// MARK: - ImageIndicator -// Displays an ImageView. Supports gif -class ImageIndicator: Indicator { - private let animatedImageIndicatorView: ImageView - - var view: IndicatorView { - return animatedImageIndicatorView - } - - init?(imageData data: Data, processor: ImageProcessor = DefaultImageProcessor.default, options: KingfisherOptionsInfo = KingfisherEmptyOptionsInfo) { - - var options = options - // Use normal image view to show animations, so we need to preload all animation data. - if !options.preloadAllAnimationData { - options.append(.preloadAllAnimationData) - } - - guard let image = processor.process(item: .data(data), options: options) else { - return nil - } - - animatedImageIndicatorView = ImageView() - animatedImageIndicatorView.image = image - animatedImageIndicatorView.frame = CGRect(x: 0, y: 0, width: image.size.width, height: image.size.height) - - #if os(macOS) - // Need for gif to animate on macOS - self.animatedImageIndicatorView.imageScaling = .scaleNone - self.animatedImageIndicatorView.canDrawSubviewsIntoLayer = true - #else - animatedImageIndicatorView.contentMode = .center - animatedImageIndicatorView.autoresizingMask = [.flexibleLeftMargin, - .flexibleRightMargin, - .flexibleBottomMargin, - .flexibleTopMargin] - #endif - } - - func startAnimatingView() { - #if os(macOS) - animatedImageIndicatorView.animates = true - #else - animatedImageIndicatorView.startAnimating() - #endif - animatedImageIndicatorView.isHidden = false - } - - func stopAnimatingView() { - #if os(macOS) - animatedImageIndicatorView.animates = false - #else - animatedImageIndicatorView.stopAnimating() - #endif - animatedImageIndicatorView.isHidden = true - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.h b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.h deleted file mode 100644 index aed591d..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// Kingfisher.h -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -#import - -//! Project version number for Kingfisher. -FOUNDATION_EXPORT double KingfisherVersionNumber; - -//! Project version string for Kingfisher. -FOUNDATION_EXPORT const unsigned char KingfisherVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.swift deleted file mode 100644 index c97818e..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Kingfisher.swift +++ /dev/null @@ -1,73 +0,0 @@ -// -// Kingfisher.swift -// Kingfisher -// -// Created by Wei Wang on 16/9/14. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -import Foundation -import ImageIO - -#if os(macOS) - import AppKit - public typealias Image = NSImage - public typealias View = NSView - public typealias Color = NSColor - public typealias ImageView = NSImageView - public typealias Button = NSButton -#else - import UIKit - public typealias Image = UIImage - public typealias Color = UIColor - #if !os(watchOS) - public typealias ImageView = UIImageView - public typealias View = UIView - public typealias Button = UIButton - #endif -#endif - -public final class Kingfisher { - public let base: Base - public init(_ base: Base) { - self.base = base - } -} - -/** - A type that has Kingfisher extensions. - */ -public protocol KingfisherCompatible { - associatedtype CompatibleType - var kf: CompatibleType { get } -} - -public extension KingfisherCompatible { - public var kf: Kingfisher { - get { return Kingfisher(self) } - } -} - -extension Image: KingfisherCompatible { } -#if !os(watchOS) -extension ImageView: KingfisherCompatible { } -extension Button: KingfisherCompatible { } -#endif diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherManager.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherManager.swift deleted file mode 100755 index 85503f5..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherManager.swift +++ /dev/null @@ -1,266 +0,0 @@ -// -// KingfisherManager.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - -public typealias DownloadProgressBlock = ((_ receivedSize: Int64, _ totalSize: Int64) -> ()) -public typealias CompletionHandler = ((_ image: Image?, _ error: NSError?, _ cacheType: CacheType, _ imageURL: URL?) -> ()) - -/// RetrieveImageTask represents a task of image retrieving process. -/// It contains an async task of getting image from disk and from network. -public class RetrieveImageTask { - - public static let empty = RetrieveImageTask() - - // If task is canceled before the download task started (which means the `downloadTask` is nil), - // the download task should not begin. - var cancelledBeforeDownloadStarting: Bool = false - - /// The network retrieve task in this image task. - public var downloadTask: RetrieveImageDownloadTask? - - /** - Cancel current task. If this task is already done, do nothing. - */ - public func cancel() { - if let downloadTask = downloadTask { - downloadTask.cancel() - } else { - cancelledBeforeDownloadStarting = true - } - } -} - -/// Error domain of Kingfisher -public let KingfisherErrorDomain = "com.onevcat.Kingfisher.Error" - -/// Main manager class of Kingfisher. It connects Kingfisher downloader and cache. -/// You can use this class to retrieve an image via a specified URL from web or cache. -public class KingfisherManager { - - /// Shared manager used by the extensions across Kingfisher. - public static let shared = KingfisherManager() - - /// Cache used by this manager - public var cache: ImageCache - - /// Downloader used by this manager - public var downloader: ImageDownloader - - /// Default options used by the manager. This option will be used in - /// Kingfisher manager related methods, including all image view and - /// button extension methods. You can also passing the options per image by - /// sending an `options` parameter to Kingfisher's APIs, the per image option - /// will overwrite the default ones if exist. - /// - /// - Note: This option will not be applied to independent using of `ImageDownloader` or `ImageCache`. - public var defaultOptions = KingfisherEmptyOptionsInfo - - var currentDefaultOptions: KingfisherOptionsInfo { - return [.downloader(downloader), .targetCache(cache)] + defaultOptions - } - - convenience init() { - self.init(downloader: .default, cache: .default) - } - - init(downloader: ImageDownloader, cache: ImageCache) { - self.downloader = downloader - self.cache = cache - } - - /** - Get an image with resource. - If KingfisherOptions.None is used as `options`, Kingfisher will seek the image in memory and disk first. - If not found, it will download the image at `resource.downloadURL` and cache it with `resource.cacheKey`. - These default behaviors could be adjusted by passing different options. See `KingfisherOptions` for more. - - - parameter resource: Resource object contains information such as `cacheKey` and `downloadURL`. - - parameter options: A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more. - - parameter progressBlock: Called every time downloaded data changed. This could be used as a progress UI. - - parameter completionHandler: Called when the whole retrieving process finished. - - - returns: A `RetrieveImageTask` task object. You can use this object to cancel the task. - */ - @discardableResult - public func retrieveImage(with resource: Resource, - options: KingfisherOptionsInfo?, - progressBlock: DownloadProgressBlock?, - completionHandler: CompletionHandler?) -> RetrieveImageTask - { - let task = RetrieveImageTask() - let options = currentDefaultOptions + (options ?? KingfisherEmptyOptionsInfo) - if options.forceRefresh { - _ = downloadAndCacheImage( - with: resource.downloadURL, - forKey: resource.cacheKey, - retrieveImageTask: task, - progressBlock: progressBlock, - completionHandler: completionHandler, - options: options) - } else { - tryToRetrieveImageFromCache( - forKey: resource.cacheKey, - with: resource.downloadURL, - retrieveImageTask: task, - progressBlock: progressBlock, - completionHandler: completionHandler, - options: options) - } - - return task - } - - @discardableResult - func downloadAndCacheImage(with url: URL, - forKey key: String, - retrieveImageTask: RetrieveImageTask, - progressBlock: DownloadProgressBlock?, - completionHandler: CompletionHandler?, - options: KingfisherOptionsInfo) -> RetrieveImageDownloadTask? - { - let downloader = options.downloader - return downloader.downloadImage(with: url, retrieveImageTask: retrieveImageTask, options: options, - progressBlock: { receivedSize, totalSize in - progressBlock?(receivedSize, totalSize) - }, - completionHandler: { image, error, imageURL, originalData in - - let targetCache = options.targetCache - if let error = error, error.code == KingfisherError.notModified.rawValue { - // Not modified. Try to find the image from cache. - // (The image should be in cache. It should be guaranteed by the framework users.) - targetCache.retrieveImage(forKey: key, options: options, completionHandler: { (cacheImage, cacheType) -> () in - completionHandler?(cacheImage, nil, cacheType, url) - }) - return - } - - if let image = image, let originalData = originalData { - targetCache.store(image, - original: originalData, - forKey: key, - processorIdentifier:options.processor.identifier, - cacheSerializer: options.cacheSerializer, - toDisk: !options.cacheMemoryOnly, - completionHandler: nil) - if options.cacheOriginalImage && options.processor != DefaultImageProcessor.default { - let originalCache = options.originalCache - let defaultProcessor = DefaultImageProcessor.default - if let originalImage = defaultProcessor.process(item: .data(originalData), options: options) { - originalCache.store(originalImage, - original: originalData, - forKey: key, - processorIdentifier: defaultProcessor.identifier, - cacheSerializer: options.cacheSerializer, - toDisk: !options.cacheMemoryOnly, - completionHandler: nil) - } - } - } - - completionHandler?(image, error, .none, url) - - }) - } - - func tryToRetrieveImageFromCache(forKey key: String, - with url: URL, - retrieveImageTask: RetrieveImageTask, - progressBlock: DownloadProgressBlock?, - completionHandler: CompletionHandler?, - options: KingfisherOptionsInfo) - { - - - let diskTaskCompletionHandler: CompletionHandler = { (image, error, cacheType, imageURL) -> () in - completionHandler?(image, error, cacheType, imageURL) - } - - func handleNoCache() { - if options.onlyFromCache { - let error = NSError(domain: KingfisherErrorDomain, code: KingfisherError.notCached.rawValue, userInfo: nil) - diskTaskCompletionHandler(nil, error, .none, url) - return - } - self.downloadAndCacheImage( - with: url, - forKey: key, - retrieveImageTask: retrieveImageTask, - progressBlock: progressBlock, - completionHandler: diskTaskCompletionHandler, - options: options) - - } - - let targetCache = options.targetCache - // First, try to get the exactly image from cache - targetCache.retrieveImage(forKey: key, options: options) { image, cacheType in - // If found, we could finish now. - if image != nil { - diskTaskCompletionHandler(image, nil, cacheType, url) - return - } - - // If not found, and we are using a default processor, download it! - let processor = options.processor - guard processor != DefaultImageProcessor.default else { - handleNoCache() - return - } - - // If processor is not the default one, we have a chance to check whether - // the original image is already in cache. - let originalCache = options.originalCache - let optionsWithoutProcessor = options.removeAllMatchesIgnoringAssociatedValue(.processor(processor)) - originalCache.retrieveImage(forKey: key, options: optionsWithoutProcessor) { image, cacheType in - // If we found the original image, there is no need to download it again. - // We could just apply processor to it now. - guard let image = image else { - handleNoCache() - return - } - - guard let processedImage = processor.process(item: .image(image), options: options) else { - diskTaskCompletionHandler(nil, nil, .none, url) - return - } - targetCache.store(processedImage, - original: nil, - forKey: key, - processorIdentifier:options.processor.identifier, - cacheSerializer: options.cacheSerializer, - toDisk: !options.cacheMemoryOnly, - completionHandler: nil) - diskTaskCompletionHandler(processedImage, nil, .none, url) - } - } - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherOptionsInfo.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherOptionsInfo.swift deleted file mode 100755 index 1d275dc..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/KingfisherOptionsInfo.swift +++ /dev/null @@ -1,335 +0,0 @@ -// -// KingfisherOptionsInfo.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/23. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -#if os(macOS) -import AppKit -#else -import UIKit -#endif - - -/** -* KingfisherOptionsInfo is a typealias for [KingfisherOptionsInfoItem]. You can use the enum of option item with value to control some behaviors of Kingfisher. -*/ -public typealias KingfisherOptionsInfo = [KingfisherOptionsInfoItem] -let KingfisherEmptyOptionsInfo = [KingfisherOptionsInfoItem]() - -/** -Items could be added into KingfisherOptionsInfo. -*/ -public enum KingfisherOptionsInfoItem { - /// The associated value of this member should be an ImageCache object. Kingfisher will use the specified - /// cache object when handling related operations, including trying to retrieve the cached images and store - /// the downloaded image to it. - case targetCache(ImageCache) - - /// Cache for storing and retrieving original image. - /// Preferred prior to targetCache for storing and retrieving original images if specified. - /// Only used if a non-default image processor is involved. - case originalCache(ImageCache) - - /// The associated value of this member should be an ImageDownloader object. Kingfisher will use this - /// downloader to download the images. - case downloader(ImageDownloader) - - /// Member for animation transition when using UIImageView. Kingfisher will use the `ImageTransition` of - /// this enum to animate the image in if it is downloaded from web. The transition will not happen when the - /// image is retrieved from either memory or disk cache by default. If you need to do the transition even when - /// the image being retrieved from cache, set `ForceTransition` as well. - case transition(ImageTransition) - - /// Associated `Float` value will be set as the priority of image download task. The value for it should be - /// between 0.0~1.0. If this option not set, the default value (`NSURLSessionTaskPriorityDefault`) will be used. - case downloadPriority(Float) - - /// If set, `Kingfisher` will ignore the cache and try to fire a download task for the resource. - case forceRefresh - - /// If set, `Kingfisher` will try to retrieve the image from memory cache first. If the image is not in memory - /// cache, then it will ignore the disk cache but download the image again from network. This is useful when - /// you want to display a changeable image behind the same url, while avoiding download it again and again. - case fromMemoryCacheOrRefresh - - /// If set, setting the image to an image view will happen with transition even when retrieved from cache. - /// See `Transition` option for more. - case forceTransition - - /// If set, `Kingfisher` will only cache the value in memory but not in disk. - case cacheMemoryOnly - - /// If set, `Kingfisher` will only try to retrieve the image from cache not from network. - case onlyFromCache - - /// Decode the image in background thread before using. - case backgroundDecode - - /// The associated value of this member will be used as the target queue of dispatch callbacks when - /// retrieving images from cache. If not set, `Kingfisher` will use main quese for callbacks. - case callbackDispatchQueue(DispatchQueue?) - - /// The associated value of this member will be used as the scale factor when converting retrieved data to an image. - /// It is the image scale, instead of your screen scale. You may need to specify the correct scale when you dealing - /// with 2x or 3x retina images. - case scaleFactor(CGFloat) - - /// Whether all the animated image data should be preloaded. Default it false, which means following frames will be - /// loaded on need. If true, all the animated image data will be loaded and decoded into memory. This option is mainly - /// used for back compatibility internally. You should not set it directly. `AnimatedImageView` will not preload - /// all data, while a normal image view (`UIImageView` or `NSImageView`) will load all data. Choose to use - /// corresponding image view type instead of setting this option. - case preloadAllAnimationData - - /// The `ImageDownloadRequestModifier` contained will be used to change the request before it being sent. - /// This is the last chance you can modify the request. You can modify the request for some customizing purpose, - /// such as adding auth token to the header, do basic HTTP auth or something like url mapping. The original request - /// will be sent without any modification by default. - case requestModifier(ImageDownloadRequestModifier) - - /// Processor for processing when the downloading finishes, a processor will convert the downloaded data to an image - /// and/or apply some filter on it. If a cache is connected to the downloader (it happenes when you are using - /// KingfisherManager or the image extension methods), the converted image will also be sent to cache as well as the - /// image view. `DefaultImageProcessor.default` will be used by default. - case processor(ImageProcessor) - - /// Supply an `CacheSerializer` to convert some data to an image object for - /// retrieving from disk cache or vice versa for storing to disk cache. - /// `DefaultCacheSerializer.default` will be used by default. - case cacheSerializer(CacheSerializer) - - /// Keep the existing image while setting another image to an image view. - /// By setting this option, the placeholder image parameter of imageview extension method - /// will be ignored and the current image will be kept while loading or downloading the new image. - case keepCurrentImageWhileLoading - - /// If set, Kingfisher will only load the first frame from a animated image data file as a single image. - /// Loading a lot of animated images may take too much memory. It will be useful when you want to display a - /// static preview of the first frame from a animated image. - /// This option will be ignored if the target image is not animated image data. - case onlyLoadFirstFrame - - /// If set and an `ImageProcessor` is used, Kingfisher will try to cache both - /// the final result and original image. Kingfisher will have a chance to use - /// the original image when another processor is applied to the same resouce, - /// instead of downloading it again. - case cacheOriginalImage -} - -precedencegroup ItemComparisonPrecedence { - associativity: none - higherThan: LogicalConjunctionPrecedence -} - -infix operator <== : ItemComparisonPrecedence - -// This operator returns true if two `KingfisherOptionsInfoItem` enum is the same, without considering the associated values. -func <== (lhs: KingfisherOptionsInfoItem, rhs: KingfisherOptionsInfoItem) -> Bool { - switch (lhs, rhs) { - case (.targetCache(_), .targetCache(_)): return true - case (.originalCache(_), .originalCache(_)): return true - case (.downloader(_), .downloader(_)): return true - case (.transition(_), .transition(_)): return true - case (.downloadPriority(_), .downloadPriority(_)): return true - case (.forceRefresh, .forceRefresh): return true - case (.fromMemoryCacheOrRefresh, .fromMemoryCacheOrRefresh): return true - case (.forceTransition, .forceTransition): return true - case (.cacheMemoryOnly, .cacheMemoryOnly): return true - case (.onlyFromCache, .onlyFromCache): return true - case (.backgroundDecode, .backgroundDecode): return true - case (.callbackDispatchQueue(_), .callbackDispatchQueue(_)): return true - case (.scaleFactor(_), .scaleFactor(_)): return true - case (.preloadAllAnimationData, .preloadAllAnimationData): return true - case (.requestModifier(_), .requestModifier(_)): return true - case (.processor(_), .processor(_)): return true - case (.cacheSerializer(_), .cacheSerializer(_)): return true - case (.keepCurrentImageWhileLoading, .keepCurrentImageWhileLoading): return true - case (.onlyLoadFirstFrame, .onlyLoadFirstFrame): return true - case (.cacheOriginalImage, .cacheOriginalImage): return true - default: return false - } -} - - -extension Collection where Iterator.Element == KingfisherOptionsInfoItem { - func lastMatchIgnoringAssociatedValue(_ target: Iterator.Element) -> Iterator.Element? { - return reversed().first { $0 <== target } - } - - func removeAllMatchesIgnoringAssociatedValue(_ target: Iterator.Element) -> [Iterator.Element] { - return filter { !($0 <== target) } - } -} - -public extension Collection where Iterator.Element == KingfisherOptionsInfoItem { - /// The target `ImageCache` which is used. - public var targetCache: ImageCache { - if let item = lastMatchIgnoringAssociatedValue(.targetCache(.default)), - case .targetCache(let cache) = item - { - return cache - } - return ImageCache.default - } - - /// The original `ImageCache` which is used. - public var originalCache: ImageCache { - if let item = lastMatchIgnoringAssociatedValue(.originalCache(.default)), - case .originalCache(let cache) = item - { - return cache - } - return targetCache - } - - /// The `ImageDownloader` which is specified. - public var downloader: ImageDownloader { - if let item = lastMatchIgnoringAssociatedValue(.downloader(.default)), - case .downloader(let downloader) = item - { - return downloader - } - return ImageDownloader.default - } - - /// Member for animation transition when using UIImageView. - public var transition: ImageTransition { - if let item = lastMatchIgnoringAssociatedValue(.transition(.none)), - case .transition(let transition) = item - { - return transition - } - return ImageTransition.none - } - - /// A `Float` value set as the priority of image download task. The value for it should be - /// between 0.0~1.0. - public var downloadPriority: Float { - if let item = lastMatchIgnoringAssociatedValue(.downloadPriority(0)), - case .downloadPriority(let priority) = item - { - return priority - } - return URLSessionTask.defaultPriority - } - - /// Whether an image will be always downloaded again or not. - public var forceRefresh: Bool { - return contains{ $0 <== .forceRefresh } - } - - /// Whether an image should be got only from memory cache or download. - public var fromMemoryCacheOrRefresh: Bool { - return contains{ $0 <== .fromMemoryCacheOrRefresh } - } - - /// Whether the transition should always happen or not. - public var forceTransition: Bool { - return contains{ $0 <== .forceTransition } - } - - /// Whether cache the image only in memory or not. - public var cacheMemoryOnly: Bool { - return contains{ $0 <== .cacheMemoryOnly } - } - - /// Whether only load the images from cache or not. - public var onlyFromCache: Bool { - return contains{ $0 <== .onlyFromCache } - } - - /// Whether the image should be decoded in background or not. - public var backgroundDecode: Bool { - return contains{ $0 <== .backgroundDecode } - } - - /// Whether the image data should be all loaded at once if it is an animated image. - public var preloadAllAnimationData: Bool { - return contains { $0 <== .preloadAllAnimationData } - } - - /// The queue of callbacks should happen from Kingfisher. - public var callbackDispatchQueue: DispatchQueue { - if let item = lastMatchIgnoringAssociatedValue(.callbackDispatchQueue(nil)), - case .callbackDispatchQueue(let queue) = item - { - return queue ?? DispatchQueue.main - } - return DispatchQueue.main - } - - /// The scale factor which should be used for the image. - public var scaleFactor: CGFloat { - if let item = lastMatchIgnoringAssociatedValue(.scaleFactor(0)), - case .scaleFactor(let scale) = item - { - return scale - } - return 1.0 - } - - /// The `ImageDownloadRequestModifier` will be used before sending a download request. - public var modifier: ImageDownloadRequestModifier { - if let item = lastMatchIgnoringAssociatedValue(.requestModifier(NoModifier.default)), - case .requestModifier(let modifier) = item - { - return modifier - } - return NoModifier.default - } - - /// `ImageProcessor` for processing when the downloading finishes. - public var processor: ImageProcessor { - if let item = lastMatchIgnoringAssociatedValue(.processor(DefaultImageProcessor.default)), - case .processor(let processor) = item - { - return processor - } - return DefaultImageProcessor.default - } - - /// `CacheSerializer` to convert image to data for storing in cache. - public var cacheSerializer: CacheSerializer { - if let item = lastMatchIgnoringAssociatedValue(.cacheSerializer(DefaultCacheSerializer.default)), - case .cacheSerializer(let cacheSerializer) = item - { - return cacheSerializer - } - return DefaultCacheSerializer.default - } - - /// Keep the existing image while setting another image to an image view. - /// Or the placeholder will be used while downloading. - public var keepCurrentImageWhileLoading: Bool { - return contains { $0 <== .keepCurrentImageWhileLoading } - } - - public var onlyLoadFirstFrame: Bool { - return contains { $0 <== .onlyLoadFirstFrame } - } - - public var cacheOriginalImage: Bool { - return contains { $0 <== .cacheOriginalImage } - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Placeholder.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Placeholder.swift deleted file mode 100755 index b6076b5..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Placeholder.swift +++ /dev/null @@ -1,82 +0,0 @@ -// -// Placeholder.swift -// Kingfisher -// -// Created by Tieme van Veen on 28/08/2017. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -#if os(macOS) - import AppKit -#else - import UIKit -#endif - - -/// Represent a placeholder type which could be set while loading as well as -/// loading finished without getting an image. -public protocol Placeholder { - - /// How the placeholder should be added to a given image view. - func add(to imageView: ImageView) - - /// How the placeholder should be removed from a given image view. - func remove(from imageView: ImageView) -} - -/// Default implementation of an image placeholder. The image will be set or -/// reset directly for `image` property of the image view. -extension Placeholder where Self: Image { - - /// How the placeholder should be added to a given image view. - public func add(to imageView: ImageView) { imageView.image = self } - - /// How the placeholder should be removed from a given image view. - public func remove(from imageView: ImageView) { imageView.image = nil } -} - -extension Image: Placeholder {} - -/// Default implementation of an arbitrary view as placeholder. The view will be -/// added as a subview when adding and be removed from its super view when removing. -/// -/// To use your customize View type as placeholder, simply let it conforming to -/// `Placeholder` by `extension MyView: Placeholder {}`. -extension Placeholder where Self: View { - - /// How the placeholder should be added to a given image view. - public func add(to imageView: ImageView) { - imageView.addSubview(self) - - self.translatesAutoresizingMaskIntoConstraints = false - NSLayoutConstraint.activate([ - NSLayoutConstraint(item: self, attribute: .centerX, relatedBy: .equal, toItem: imageView, attribute: .centerX, multiplier: 1, constant: 0), - NSLayoutConstraint(item: self, attribute: .centerY, relatedBy: .equal, toItem: imageView, attribute: .centerY, multiplier: 1, constant: 0), - NSLayoutConstraint(item: self, attribute: .height, relatedBy: .equal, toItem: imageView, attribute: .height, multiplier: 1, constant: 0), - NSLayoutConstraint(item: self, attribute: .width, relatedBy: .equal, toItem: imageView, attribute: .width, multiplier: 1, constant: 0) - ]) - } - - /// How the placeholder should be removed from a given image view. - public func remove(from imageView: ImageView) { - self.removeFromSuperview() - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/RequestModifier.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/RequestModifier.swift deleted file mode 100644 index 13d655a..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/RequestModifier.swift +++ /dev/null @@ -1,53 +0,0 @@ -// -// RequestModifier.swift -// Kingfisher -// -// Created by Wei Wang on 2016/09/05. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -import Foundation - -/// Request modifier of image downloader. -public protocol ImageDownloadRequestModifier { - func modified(for request: URLRequest) -> URLRequest? -} - -struct NoModifier: ImageDownloadRequestModifier { - static let `default` = NoModifier() - private init() {} - func modified(for request: URLRequest) -> URLRequest? { - return request - } -} - -public struct AnyModifier: ImageDownloadRequestModifier { - - let block: (URLRequest) -> URLRequest? - - public func modified(for request: URLRequest) -> URLRequest? { - return block(request) - } - - public init(modify: @escaping (URLRequest) -> URLRequest? ) { - block = modify - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Resource.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Resource.swift deleted file mode 100755 index c95691a..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/Resource.swift +++ /dev/null @@ -1,74 +0,0 @@ -// -// Resource.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/6. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -import Foundation - - -/// `Resource` protocol defines how to download and cache a resource from network. -public protocol Resource { - /// The key used in cache. - var cacheKey: String { get } - - /// The target image URL. - var downloadURL: URL { get } -} - -/** - ImageResource is a simple combination of `downloadURL` and `cacheKey`. - - When passed to image view set methods, Kingfisher will try to download the target - image from the `downloadURL`, and then store it with the `cacheKey` as the key in cache. - */ -public struct ImageResource: Resource { - /// The key used in cache. - public let cacheKey: String - - /// The target image URL. - public let downloadURL: URL - - /** - Create a resource. - - - parameter downloadURL: The target image URL. - - parameter cacheKey: The cache key. If `nil`, Kingfisher will use the `absoluteString` of `downloadURL` as the key. - - - returns: A resource. - */ - public init(downloadURL: URL, cacheKey: String? = nil) { - self.downloadURL = downloadURL - self.cacheKey = cacheKey ?? downloadURL.absoluteString - } -} - -/** - URL conforms to `Resource` in Kingfisher. - The `absoluteString` of this URL is used as `cacheKey`. And the URL itself will be used as `downloadURL`. - If you need customize the url and/or cache key, use `ImageResource` instead. - */ -extension URL: Resource { - public var cacheKey: String { return absoluteString } - public var downloadURL: URL { return self } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/String+MD5.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/String+MD5.swift deleted file mode 100755 index 5563fa1..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/String+MD5.swift +++ /dev/null @@ -1,292 +0,0 @@ -// -// String+MD5.swift -// Kingfisher -// -// To date, adding CommonCrypto to a Swift framework is problematic. See: -// http://stackoverflow.com/questions/25248598/importing-commoncrypto-in-a-swift-framework -// We're using a subset and modified version of CryptoSwift as an alternative. -// The following is an altered source version that only includes MD5. The original software can be found at: -// https://github.com/krzyzanowskim/CryptoSwift -// This is the original copyright notice: - -/* -Copyright (C) 2014 Marcin Krzyżanowski -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose,including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -- The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation is required. -- Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -- This notice may not be removed or altered from any source or binary distribution. -*/ - -import Foundation - -public struct StringProxy { - fileprivate let base: String - init(proxy: String) { - base = proxy - } -} - -extension String: KingfisherCompatible { - public typealias CompatibleType = StringProxy - public var kf: CompatibleType { - return StringProxy(proxy: self) - } -} - -extension StringProxy { - var md5: String { - if let data = base.data(using: .utf8, allowLossyConversion: true) { - - let message = data.withUnsafeBytes { bytes -> [UInt8] in - return Array(UnsafeBufferPointer(start: bytes, count: data.count)) - } - - let MD5Calculator = MD5(message) - let MD5Data = MD5Calculator.calculate() - - var MD5String = String() - for c in MD5Data { - MD5String += String(format: "%02x", c) - } - return MD5String - - } else { - return base - } - } -} - - -/** array of bytes, little-endian representation */ -func arrayOfBytes(_ value: T, length: Int? = nil) -> [UInt8] { - let totalBytes = length ?? (MemoryLayout.size * 8) - - let valuePointer = UnsafeMutablePointer.allocate(capacity: 1) - valuePointer.pointee = value - - let bytes = valuePointer.withMemoryRebound(to: UInt8.self, capacity: totalBytes) { (bytesPointer) -> [UInt8] in - var bytes = [UInt8](repeating: 0, count: totalBytes) - for j in 0...size, totalBytes) { - bytes[totalBytes - 1 - j] = (bytesPointer + j).pointee - } - return bytes - } - - valuePointer.deinitialize() - valuePointer.deallocate(capacity: 1) - - return bytes -} - -extension Int { - /** Array of bytes with optional padding (little-endian) */ - func bytes(_ totalBytes: Int = MemoryLayout.size) -> [UInt8] { - return arrayOfBytes(self, length: totalBytes) - } - -} - -extension NSMutableData { - - /** Convenient way to append bytes */ - func appendBytes(_ arrayOfBytes: [UInt8]) { - append(arrayOfBytes, length: arrayOfBytes.count) - } - -} - -protocol HashProtocol { - var message: Array { get } - - /** Common part for hash calculation. Prepare header data. */ - func prepare(_ len: Int) -> Array -} - -extension HashProtocol { - - func prepare(_ len: Int) -> Array { - var tmpMessage = message - - // Step 1. Append Padding Bits - tmpMessage.append(0x80) // append one bit (UInt8 with one bit) to message - - // append "0" bit until message length in bits ≡ 448 (mod 512) - var msgLength = tmpMessage.count - var counter = 0 - - while msgLength % len != (len - 8) { - counter += 1 - msgLength += 1 - } - - tmpMessage += Array(repeating: 0, count: counter) - return tmpMessage - } -} - -func toUInt32Array(_ slice: ArraySlice) -> Array { - var result = Array() - result.reserveCapacity(16) - - for idx in stride(from: slice.startIndex, to: slice.endIndex, by: MemoryLayout.size) { - let d0 = UInt32(slice[idx.advanced(by: 3)]) << 24 - let d1 = UInt32(slice[idx.advanced(by: 2)]) << 16 - let d2 = UInt32(slice[idx.advanced(by: 1)]) << 8 - let d3 = UInt32(slice[idx]) - let val: UInt32 = d0 | d1 | d2 | d3 - - result.append(val) - } - return result -} - -struct BytesIterator: IteratorProtocol { - - let chunkSize: Int - let data: [UInt8] - - init(chunkSize: Int, data: [UInt8]) { - self.chunkSize = chunkSize - self.data = data - } - - var offset = 0 - - mutating func next() -> ArraySlice? { - let end = min(chunkSize, data.count - offset) - let result = data[offset.. 0 ? result : nil - } -} - -struct BytesSequence: Sequence { - let chunkSize: Int - let data: [UInt8] - - func makeIterator() -> BytesIterator { - return BytesIterator(chunkSize: chunkSize, data: data) - } -} - -func rotateLeft(_ value: UInt32, bits: UInt32) -> UInt32 { - return ((value << bits) & 0xFFFFFFFF) | (value >> (32 - bits)) -} - -class MD5: HashProtocol { - - static let size = 16 // 128 / 8 - let message: [UInt8] - - init (_ message: [UInt8]) { - self.message = message - } - - /** specifies the per-round shift amounts */ - private let shifts: [UInt32] = [7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, - 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, - 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, - 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21] - - /** binary integer part of the sines of integers (Radians) */ - private let sines: [UInt32] = [0xd76aa478, 0xe8c7b756, 0x242070db, 0xc1bdceee, - 0xf57c0faf, 0x4787c62a, 0xa8304613, 0xfd469501, - 0x698098d8, 0x8b44f7af, 0xffff5bb1, 0x895cd7be, - 0x6b901122, 0xfd987193, 0xa679438e, 0x49b40821, - 0xf61e2562, 0xc040b340, 0x265e5a51, 0xe9b6c7aa, - 0xd62f105d, 0x02441453, 0xd8a1e681, 0xe7d3fbc8, - 0x21e1cde6, 0xc33707d6, 0xf4d50d87, 0x455a14ed, - 0xa9e3e905, 0xfcefa3f8, 0x676f02d9, 0x8d2a4c8a, - 0xfffa3942, 0x8771f681, 0x6d9d6122, 0xfde5380c, - 0xa4beea44, 0x4bdecfa9, 0xf6bb4b60, 0xbebfbc70, - 0x289b7ec6, 0xeaa127fa, 0xd4ef3085, 0x4881d05, - 0xd9d4d039, 0xe6db99e5, 0x1fa27cf8, 0xc4ac5665, - 0xf4292244, 0x432aff97, 0xab9423a7, 0xfc93a039, - 0x655b59c3, 0x8f0ccc92, 0xffeff47d, 0x85845dd1, - 0x6fa87e4f, 0xfe2ce6e0, 0xa3014314, 0x4e0811a1, - 0xf7537e82, 0xbd3af235, 0x2ad7d2bb, 0xeb86d391] - - private let hashes: [UInt32] = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476] - - func calculate() -> [UInt8] { - var tmpMessage = prepare(64) - tmpMessage.reserveCapacity(tmpMessage.count + 4) - - // hash values - var hh = hashes - - // Step 2. Append Length a 64-bit representation of lengthInBits - let lengthInBits = (message.count * 8) - let lengthBytes = lengthInBits.bytes(64 / 8) - tmpMessage += lengthBytes.reversed() - - // Process the message in successive 512-bit chunks: - let chunkSizeBytes = 512 / 8 // 64 - - for chunk in BytesSequence(chunkSize: chunkSizeBytes, data: tmpMessage) { - // break chunk into sixteen 32-bit words M[j], 0 ≤ j ≤ 15 - var M = toUInt32Array(chunk) - assert(M.count == 16, "Invalid array") - - // Initialize hash value for this chunk: - var A: UInt32 = hh[0] - var B: UInt32 = hh[1] - var C: UInt32 = hh[2] - var D: UInt32 = hh[3] - - var dTemp: UInt32 = 0 - - // Main loop - for j in 0 ..< sines.count { - var g = 0 - var F: UInt32 = 0 - - switch j { - case 0...15: - F = (B & C) | ((~B) & D) - g = j - break - case 16...31: - F = (D & B) | (~D & C) - g = (5 * j + 1) % 16 - break - case 32...47: - F = B ^ C ^ D - g = (3 * j + 5) % 16 - break - case 48...63: - F = C ^ (B | (~D)) - g = (7 * j) % 16 - break - default: - break - } - dTemp = D - D = C - C = B - B = B &+ rotateLeft((A &+ F &+ sines[j] &+ M[g]), bits: shifts[j]) - A = dTemp - } - - hh[0] = hh[0] &+ A - hh[1] = hh[1] &+ B - hh[2] = hh[2] &+ C - hh[3] = hh[3] &+ D - } - - var result = [UInt8]() - result.reserveCapacity(hh.count / 4) - - hh.forEach { - let itemLE = $0.littleEndian - let r1 = UInt8(itemLE & 0xff) - let r2 = UInt8((itemLE >> 8) & 0xff) - let r3 = UInt8((itemLE >> 16) & 0xff) - let r4 = UInt8((itemLE >> 24) & 0xff) - result += [r1, r2, r3, r4] - } - return result - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ThreadHelper.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ThreadHelper.swift deleted file mode 100755 index f0742cd..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/ThreadHelper.swift +++ /dev/null @@ -1,40 +0,0 @@ -// -// ThreadHelper.swift -// Kingfisher -// -// Created by Wei Wang on 15/10/9. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -import Foundation - -extension DispatchQueue { - // This method will dispatch the `block` to self. - // If `self` is the main queue, and current thread is main thread, the block - // will be invoked immediately instead of being dispatched. - func safeAsync(_ block: @escaping ()->()) { - if self === DispatchQueue.main && Thread.isMainThread { - block() - } else { - async { block() } - } - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/UIButton+Kingfisher.swift b/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/UIButton+Kingfisher.swift deleted file mode 100755 index 2b56423..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/Kingfisher/UIButton+Kingfisher.swift +++ /dev/null @@ -1,274 +0,0 @@ -// -// UIButton+Kingfisher.swift -// Kingfisher -// -// Created by Wei Wang on 15/4/13. -// -// Copyright (c) 2017 Wei Wang -// -// 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: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// 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. - -import UIKit - -// MARK: - Set Images -/** - * Set image to use in button from web for a specified state. - */ -extension Kingfisher where Base: UIButton { - /** - Set an image to use for a specified state with a resource, a placeholder image, options, progress handler and - completion handler. - - - parameter resource: Resource object contains information such as `cacheKey` and `downloadURL`. - - parameter state: The state that uses the specified image. - - parameter placeholder: A placeholder image when retrieving the image at URL. - - parameter options: A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more. - - parameter progressBlock: Called when the image downloading progress gets updated. - - parameter completionHandler: Called when the image retrieved and set. - - - returns: A task represents the retrieving process. - - - note: Both the `progressBlock` and `completionHandler` will be invoked in main thread. - The `CallbackDispatchQueue` specified in `optionsInfo` will not be used in callbacks of this method. - - If `resource` is `nil`, the `placeholder` image will be set and - `completionHandler` will be called with both `error` and `image` being `nil`. - */ - @discardableResult - public func setImage(with resource: Resource?, - for state: UIControl.State, - placeholder: UIImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: CompletionHandler? = nil) -> RetrieveImageTask - { - guard let resource = resource else { - base.setImage(placeholder, for: state) - setWebURL(nil, for: state) - completionHandler?(nil, nil, .none, nil) - return .empty - } - - let options = KingfisherManager.shared.defaultOptions + (options ?? KingfisherEmptyOptionsInfo) - if !options.keepCurrentImageWhileLoading { - base.setImage(placeholder, for: state) - } - - setWebURL(resource.downloadURL, for: state) - let task = KingfisherManager.shared.retrieveImage( - with: resource, - options: options, - progressBlock: { receivedSize, totalSize in - guard resource.downloadURL == self.webURL(for: state) else { - return - } - if let progressBlock = progressBlock { - progressBlock(receivedSize, totalSize) - } - }, - completionHandler: {[weak base] image, error, cacheType, imageURL in - DispatchQueue.main.safeAsync { - guard let strongBase = base, imageURL == self.webURL(for: state) else { - completionHandler?(image, error, cacheType, imageURL) - return - } - self.setImageTask(nil) - if image != nil { - strongBase.setImage(image, for: state) - } - - completionHandler?(image, error, cacheType, imageURL) - } - }) - - setImageTask(task) - return task - } - - /** - Cancel the image download task bounded to the image view if it is running. - Nothing will happen if the downloading has already finished. - */ - public func cancelImageDownloadTask() { - imageTask?.cancel() - } - - /** - Set the background image to use for a specified state with a resource, - a placeholder image, options progress handler and completion handler. - - - parameter resource: Resource object contains information such as `cacheKey` and `downloadURL`. - - parameter state: The state that uses the specified image. - - parameter placeholder: A placeholder image when retrieving the image at URL. - - parameter options: A dictionary could control some behaviors. See `KingfisherOptionsInfo` for more. - - parameter progressBlock: Called when the image downloading progress gets updated. - - parameter completionHandler: Called when the image retrieved and set. - - - returns: A task represents the retrieving process. - - - note: Both the `progressBlock` and `completionHandler` will be invoked in main thread. - The `CallbackDispatchQueue` specified in `optionsInfo` will not be used in callbacks of this method. - - If `resource` is `nil`, the `placeholder` image will be set and - `completionHandler` will be called with both `error` and `image` being `nil`. - */ - @discardableResult - public func setBackgroundImage(with resource: Resource?, - for state: UIControl.State, - placeholder: UIImage? = nil, - options: KingfisherOptionsInfo? = nil, - progressBlock: DownloadProgressBlock? = nil, - completionHandler: CompletionHandler? = nil) -> RetrieveImageTask - { - guard let resource = resource else { - base.setBackgroundImage(placeholder, for: state) - setBackgroundWebURL(nil, for: state) - completionHandler?(nil, nil, .none, nil) - return .empty - } - - let options = KingfisherManager.shared.defaultOptions + (options ?? KingfisherEmptyOptionsInfo) - if !options.keepCurrentImageWhileLoading { - base.setBackgroundImage(placeholder, for: state) - } - - setBackgroundWebURL(resource.downloadURL, for: state) - let task = KingfisherManager.shared.retrieveImage( - with: resource, - options: options, - progressBlock: { receivedSize, totalSize in - guard resource.downloadURL == self.backgroundWebURL(for: state) else { - return - } - if let progressBlock = progressBlock { - progressBlock(receivedSize, totalSize) - } - }, - completionHandler: { [weak base] image, error, cacheType, imageURL in - DispatchQueue.main.safeAsync { - guard let strongBase = base, imageURL == self.backgroundWebURL(for: state) else { - completionHandler?(image, error, cacheType, imageURL) - return - } - self.setBackgroundImageTask(nil) - if image != nil { - strongBase.setBackgroundImage(image, for: state) - } - completionHandler?(image, error, cacheType, imageURL) - } - }) - - setBackgroundImageTask(task) - return task - } - - /** - Cancel the background image download task bounded to the image view if it is running. - Nothing will happen if the downloading has already finished. - */ - public func cancelBackgroundImageDownloadTask() { - backgroundImageTask?.cancel() - } - -} - -// MARK: - Associated Object -private var lastURLKey: Void? -private var imageTaskKey: Void? - -extension Kingfisher where Base: UIButton { - /** - Get the image URL binded to this button for a specified state. - - - parameter state: The state that uses the specified image. - - - returns: Current URL for image. - */ - public func webURL(for state: UIControl.State) -> URL? { - return webURLs[NSNumber(value:state.rawValue)] as? URL - } - - fileprivate func setWebURL(_ url: URL?, for state: UIControl.State) { - webURLs[NSNumber(value:state.rawValue)] = url - } - - fileprivate var webURLs: NSMutableDictionary { - var dictionary = objc_getAssociatedObject(base, &lastURLKey) as? NSMutableDictionary - if dictionary == nil { - dictionary = NSMutableDictionary() - setWebURLs(dictionary!) - } - return dictionary! - } - - fileprivate func setWebURLs(_ URLs: NSMutableDictionary) { - objc_setAssociatedObject(base, &lastURLKey, URLs, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - - fileprivate var imageTask: RetrieveImageTask? { - return objc_getAssociatedObject(base, &imageTaskKey) as? RetrieveImageTask - } - - fileprivate func setImageTask(_ task: RetrieveImageTask?) { - objc_setAssociatedObject(base, &imageTaskKey, task, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } -} - - -private var lastBackgroundURLKey: Void? -private var backgroundImageTaskKey: Void? - - -extension Kingfisher where Base: UIButton { - /** - Get the background image URL binded to this button for a specified state. - - - parameter state: The state that uses the specified background image. - - - returns: Current URL for background image. - */ - public func backgroundWebURL(for state: UIControl.State) -> URL? { - return backgroundWebURLs[NSNumber(value:state.rawValue)] as? URL - } - - fileprivate func setBackgroundWebURL(_ url: URL?, for state: UIControl.State) { - backgroundWebURLs[NSNumber(value:state.rawValue)] = url - } - - fileprivate var backgroundWebURLs: NSMutableDictionary { - var dictionary = objc_getAssociatedObject(base, &lastBackgroundURLKey) as? NSMutableDictionary - if dictionary == nil { - dictionary = NSMutableDictionary() - setBackgroundWebURLs(dictionary!) - } - return dictionary! - } - - fileprivate func setBackgroundWebURLs(_ URLs: NSMutableDictionary) { - objc_setAssociatedObject(base, &lastBackgroundURLKey, URLs, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } - - fileprivate var backgroundImageTask: RetrieveImageTask? { - return objc_getAssociatedObject(base, &backgroundImageTaskKey) as? RetrieveImageTask - } - - fileprivate func setBackgroundImageTask(_ task: RetrieveImageTask?) { - objc_setAssociatedObject(base, &backgroundImageTaskKey, task, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) - } -} diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleCell.swift b/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleCell.swift deleted file mode 100644 index 49c0403..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleCell.swift +++ /dev/null @@ -1,149 +0,0 @@ -// -// WRCycleCell.swift -// WRCycleScrollViewDemo -// -// Created by wangrui on 2017/5/12. -// Copyright © 2017年 wangrui. All rights reserved. -// -// Github地址:https://github.com/wangrui460/WRCycleScrollView - -import UIKit - -class WRCycleCell: UICollectionViewCell -{ -//======================================================= -// MARK: 对外提供的属性 -//======================================================= - var imgSource:ImgSource = ImgSource.LOCAL(name: "placeholder") { - didSet { - switch imgSource { - case let .SERVER(url): - imgView.kf.setImage(with: url) - case let .LOCAL(name): - imgView.image = UIImage(named: name) - } - } - } - - var descText:String? { - didSet { - descLabel.isHidden = (descText == nil) ? true : false - bottomView.isHidden = (descText == nil) ? true : false - descLabel.text = descText - } - } - - override var frame: CGRect { - didSet { - bounds.size = frame.size - } - } - - var descLabelFont: UIFont = UIFont(name: "Helvetica-Bold", size: 18)! { - didSet { - descLabel.font = descLabelFont - } - } - var descLabelTextColor: UIColor = UIColor.white { - didSet { - descLabel.textColor = descLabelTextColor - } - } - var descLabelHeight: CGFloat = 60 { - didSet { - descLabel.frame.size.height = descLabelHeight - } - } - var descLabelTextAlignment:NSTextAlignment = .left { - didSet { - descLabel.textAlignment = descLabelTextAlignment - } - } - var bottomViewBackgroundColor: UIColor = UIColor.black.withAlphaComponent(0.5) { - didSet { - bottomView.backgroundColor = bottomViewBackgroundColor - } - } - -//======================================================= -// MARK: 内部属性 -//======================================================= - fileprivate var imgView:UIImageView! - fileprivate var descLabel:UILabel! - fileprivate var bottomView:UIView! - -//======================================================= -// MARK: 构造方法 -//======================================================= - override init(frame: CGRect) - { - super.init(frame: frame) - backgroundColor = UIColor.white - setupImgView() - setupDescLabel() - setupBottomView() - } - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - deinit { - print("WRCycleCell deinit") - } - - -//======================================================= -// MARK: 内部方法(layoutSubviews) -//======================================================= - override func layoutSubviews() - { - super.layoutSubviews() - imgView.frame = self.bounds - - if let _ = descText - { - let margin:CGFloat = 16 - let labelWidth = imgView.bounds.width - 2 * margin - let labelHeight = descLabelHeight - let labelY = bounds.height - labelHeight - descLabel.frame = CGRect(x: margin, y: labelY, width: labelWidth, height: labelHeight) - bottomView.frame = CGRect(x: 0, y: labelY, width: imgView.bounds.width, height: labelHeight) - bringSubviewToFront(descLabel) - } - } -} - -//======================================================= -// MARK: - 基本控件(图片、描述文字、底部view) -//======================================================= -extension WRCycleCell -{ - fileprivate func setupImgView() - { - imgView = UIImageView() - imgView.contentMode = .scaleAspectFill - imgView.clipsToBounds = true - addSubview(imgView) - } - - fileprivate func setupDescLabel() - { - descLabel = UILabel() - descLabel.text = descText - descLabel.numberOfLines = 0 - descLabel.font = descLabelFont - descLabel.textColor = descLabelTextColor - descLabel.frame.size.height = descLabelHeight - descLabel.textAlignment = descLabelTextAlignment - addSubview(descLabel) - descLabel.isHidden = true - } - - fileprivate func setupBottomView() - { - bottomView = UIView() - bottomView.backgroundColor = bottomViewBackgroundColor - addSubview(bottomView) - bottomView.isHidden = true - } -} - diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleScrollView.swift b/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleScrollView.swift deleted file mode 100644 index b6c99d2..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/WRCycleScrollView.swift +++ /dev/null @@ -1,376 +0,0 @@ -// -// WRCycleScrollView.swift -// WRCycleScrollViewDemo -// -// Created by wangrui on 2017/5/12. -// Copyright © 2017年 wangrui. All rights reserved. -// -// Github地址:https://github.com/wangrui460/WRCycleScrollView - -import UIKit - -private let KEndlessScrollTimes = 128 - -@objc protocol WRCycleScrollViewDelegate -{ - /// 点击图片回调 - @objc optional func cycleScrollViewDidSelect(at index:Int, cycleScrollView:WRCycleScrollView) - /// 图片滚动回调 - @objc optional func cycleScrollViewDidScroll(to index:Int, cycleScrollView:WRCycleScrollView) -} - -class WRCycleScrollView: UIView -{ -//======================================================= -// MARK: 对外提供的属性 -//======================================================= - weak var delegate:WRCycleScrollViewDelegate? - -/// 数据相关 - var imgsType:ImgType = .SERVER - var localImgArray :[String]? { - didSet { - if let local = localImgArray { - proxy = Proxy(type: .LOCAL, array: local) - reloadData() - } - } - } - var serverImgArray:[String]? { - didSet { - if let server = serverImgArray { - proxy = Proxy(type: .SERVER, array: server) - reloadData() - } - } - } - var descTextArray :[String]? - -/// WRCycleCell相关 - var descLabelFont: UIFont? - var descLabelTextColor: UIColor? - var descLabelHeight: CGFloat? - var descLabelTextAlignment:NSTextAlignment? - var bottomViewBackgroundColor: UIColor? - -/// 主要功能需求相关 - override var frame: CGRect { - didSet { - flowLayout?.itemSize = frame.size - collectionView?.frame = bounds - } - } - var isAutoScroll:Bool = true { - didSet { - timer?.invalidate() - timer = nil - if isAutoScroll == true { - setupTimer() - } - } - } - var isEndlessScroll:Bool = true { - didSet { - reloadData() - } - } - var autoScrollInterval: Double = 1.5 - -/// pageControl相关 - var showPageControl: Bool = true { - didSet { - setupPageControl() - } - } - var currentDotColor: UIColor = UIColor.orange { - didSet { - self.pageControl?.currentPageIndicatorTintColor = currentDotColor - } - } - var otherDotColor: UIColor = UIColor.gray { - didSet { - self.pageControl?.pageIndicatorTintColor = otherDotColor - } - } - -//======================================================= -// MARK: 对外提供的方法 -//======================================================= - func reloadData() - { - timer?.invalidate() - timer = nil - collectionView?.reloadData() - - setupPageControl() - changeToFirstCycleCell(animated: false) - if isAutoScroll == true { - setupTimer() - } - } - - -//======================================================= -// MARK: 内部属性 -//======================================================= - fileprivate var imgsCount:Int { - return (isEndlessScroll == true) ? (itemsInSection / KEndlessScrollTimes) : itemsInSection - } - fileprivate var itemsInSection:Int { - guard let imgs = proxy?.imgArray else { - return 0 - } - return (isEndlessScroll == true) ? (imgs.count * KEndlessScrollTimes) : imgs.count - } - fileprivate var firstItem:Int { - return (isEndlessScroll == true) ? (itemsInSection / 2) : 0 - } - fileprivate var canChangeCycleCell:Bool { - guard itemsInSection != 0 , - let _ = collectionView, - let _ = flowLayout else { - return false - } - return true - } - fileprivate var indexOnPageControl:Int { - var curIndex = Int((collectionView!.contentOffset.x + flowLayout!.itemSize.width * 0.5) / flowLayout!.itemSize.width) - curIndex = max(0, curIndex) - return curIndex % imgsCount - } - fileprivate var proxy:Proxy! - fileprivate var flowLayout:UICollectionViewFlowLayout? - fileprivate var collectionView:UICollectionView? - fileprivate let CellID = "WRCycleCell" - fileprivate var pageControl:UIPageControl? - fileprivate var timer:Timer? - // 标识子控件是否布局完成,布局完成后在layoutSubviews方法中就不执行 changeToFirstCycleCell 方法 - fileprivate var isLoadOver = false - - -//======================================================= -// MARK: 构造方法 -//======================================================= - /// 构造方法 - /// - /// - Parameters: - /// - frame: frame - /// - type: ImagesType default:Server - /// - imgs: localImgArray / serverImgArray default:nil - /// - descs: descTextArray default:nil - init(frame: CGRect, type:ImgType = .SERVER, imgs:[String]? = nil, descs:[String]? = nil) - { - super.init(frame: frame) - setupCollectionView() - imgsType = type - if imgsType == .SERVER { - if let server = imgs { - proxy = Proxy(type: .SERVER, array: server) - } - } - else { - if let local = imgs { - proxy = Proxy(type: .LOCAL, array: local) - } - } - - if let descTexts = descs { - descTextArray = descTexts - } - reloadData() - } - - required init?(coder aDecoder: NSCoder) { - fatalError("init(coder:) has not been implemented") - } - - deinit { - collectionView?.delegate = nil - print("WRCycleScrollView deinit") - } - -//======================================================= -// MARK: 内部方法(layoutSubviews、willMove) -//======================================================= - override func layoutSubviews() - { - super.layoutSubviews() - // 解决WRCycleCell自动偏移问题 - collectionView?.contentInset = .zero - if isLoadOver == false { - changeToFirstCycleCell(animated: false) - } - if showPageControl == true { - setupPageControlFrame() - } - } - - override func willMove(toSuperview newSuperview: UIView?) - { // 解决定时器导致的循环引用 - super.willMove(toSuperview: newSuperview) - // 展现的时候newSuper不为nil,离开的时候newSuper为nil - guard let _ = newSuperview else { - timer?.invalidate() - timer = nil - return - } - } -} - -//======================================================= -// MARK: - 无限轮播相关(定时器、切换图片、scrollView代理方法) -//======================================================= -extension WRCycleScrollView -{ - func setupTimer() - { - timer = Timer(timeInterval: autoScrollInterval, target: self, selector: #selector(changeCycleCell), userInfo: nil, repeats: true) - RunLoop.main.add(timer!, forMode: RunLoop.Mode.common) - } - - fileprivate func changeToFirstCycleCell(animated:Bool) - { - if canChangeCycleCell == true { - let indexPath = IndexPath(item: firstItem, section: 0) - collectionView!.scrollToItem(at: indexPath, at: .init(rawValue: 0), animated: animated) - } - } - - // 执行这个方法的前提是 isAutoScroll = true - @objc func changeCycleCell() - { - if canChangeCycleCell == true - { - let curItem = Int(collectionView!.contentOffset.x / flowLayout!.itemSize.width) - if curItem == itemsInSection - 1 - { - let animated = (isEndlessScroll == true) ? false : true - changeToFirstCycleCell(animated: animated) - } - else - { - let indexPath = IndexPath(item: curItem + 1, section: 0) - collectionView!.scrollToItem(at: indexPath, at: .init(rawValue: 0), animated: true) - } - } - } - - func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { - timer?.invalidate() - } - - func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) - { - if isAutoScroll == true { - setupTimer() - } - } - - func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { - scrollViewDidEndScrollingAnimation(scrollView) - } - - func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) - { - guard canChangeCycleCell else { - return - } - delegate?.cycleScrollViewDidScroll?(to: indexOnPageControl, cycleScrollView: self) - - if indexOnPageControl >= firstItem { - isLoadOver = true - } - } - - func scrollViewDidScroll(_ scrollView: UIScrollView) - { - guard canChangeCycleCell else { - return - } - pageControl?.currentPage = indexOnPageControl - } -} - -//======================================================= -// MARK: - pageControl页面 -//======================================================= -extension WRCycleScrollView -{ - fileprivate func setupPageControl() - { - pageControl?.removeFromSuperview() - if showPageControl == true - { - pageControl = UIPageControl() - pageControl?.numberOfPages = imgsCount - pageControl?.hidesForSinglePage = true - pageControl?.currentPageIndicatorTintColor = self.currentDotColor - pageControl?.pageIndicatorTintColor = self.otherDotColor - pageControl?.isUserInteractionEnabled = false - addSubview(pageControl!) - } - } - - fileprivate func setupPageControlFrame() - { - let pageW = bounds.width - let pageH:CGFloat = 20 - let pageX = bounds.origin.x - let pageY = bounds.height - pageH - self.pageControl?.frame = CGRect(x:pageX, y:pageY, width:pageW, height:pageH) - } -} - -//======================================================= -// MARK: - WRCycleCell 相关 -//======================================================= -extension WRCycleScrollView: UICollectionViewDelegate,UICollectionViewDataSource -{ - fileprivate func setupCollectionView() - { - flowLayout = UICollectionViewFlowLayout() - flowLayout?.itemSize = frame.size - flowLayout?.minimumLineSpacing = 0 - flowLayout?.scrollDirection = .horizontal - - collectionView = UICollectionView(frame: bounds, collectionViewLayout: flowLayout!) - collectionView?.register(WRCycleCell.self, forCellWithReuseIdentifier: CellID) - collectionView?.isPagingEnabled = true - collectionView?.bounces = false - collectionView?.showsVerticalScrollIndicator = false - collectionView?.showsHorizontalScrollIndicator = false - collectionView?.delegate = self - collectionView?.dataSource = self - addSubview(collectionView!) - } - - public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int - { - return itemsInSection - } - - public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell - { - let curIndex = indexPath.item % imgsCount - let cell = collectionView.dequeueReusableCell(withReuseIdentifier: CellID, for: indexPath) as! WRCycleCell - cell.imgSource = proxy[curIndex] - cell.descText = descTextArray?[curIndex] - - if let _ = descTextArray - { - cell.descLabelFont = (descLabelFont == nil) ? cell.descLabelFont : descLabelFont! - cell.descLabelTextColor = (descLabelTextColor == nil) ? cell.descLabelTextColor : descLabelTextColor! - cell.descLabelHeight = (descLabelHeight == nil) ? cell.descLabelHeight : descLabelHeight! - cell.descLabelTextAlignment = (descLabelTextAlignment == nil) ? cell.descLabelTextAlignment : descLabelTextAlignment! - cell.bottomViewBackgroundColor = (bottomViewBackgroundColor == nil) ? cell.bottomViewBackgroundColor : bottomViewBackgroundColor! - } - return cell - } - - public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) - { - delegate?.cycleScrollViewDidSelect?(at: indexOnPageControl, cycleScrollView: self) - } -} - - diff --git a/WRNavigationBar_swift/WRNavigationBar_swift/WRProxy.swift b/WRNavigationBar_swift/WRNavigationBar_swift/WRProxy.swift deleted file mode 100644 index fd76f44..0000000 --- a/WRNavigationBar_swift/WRNavigationBar_swift/WRProxy.swift +++ /dev/null @@ -1,52 +0,0 @@ -// -// WRProxy.swift -// WRCycleScrollViewDemo -// -// Created by wangrui on 2017/5/15. -// Copyright © 2017年 wangrui. All rights reserved. -// - -import UIKit - -// 图片资源 -enum ImgSource { - case SERVER(url:URL) - case LOCAL(name:String) -} - -// 图片类型 -enum ImgType:Int { - case SERVER = 0 // default - case LOCAL = 1 -} - -struct Proxy -{ - var imgType:ImgType = .SERVER - var imgArray:[ImgSource] = [ImgSource]() - - // 下标法获取imgArray中对应索引的ImgSource - subscript (index:Int) -> ImgSource { - get { - return imgArray[index] - } - } - - // 构造方法 - init(type:ImgType, array:[String]) - { - imgType = type - if imgType == .SERVER - { - imgArray = array.map({ (urlStr) -> ImgSource in - return ImgSource.SERVER(url: URL(string: urlStr)!) - }) - } - else - { - imgArray = array.map({ (name) -> ImgSource in - return ImgSource.LOCAL(name: name) - }) - } - } -} diff --git a/_Pods.xcodeproj b/_Pods.xcodeproj new file mode 120000 index 0000000..3c5a8e7 --- /dev/null +++ b/_Pods.xcodeproj @@ -0,0 +1 @@ +Example/Pods/Pods.xcodeproj \ No newline at end of file From a0527391cb2ef39b782ccb7dc392c283669f8b83 Mon Sep 17 00:00:00 2001 From: EyreFree Date: Wed, 16 Jan 2019 15:45:00 +0800 Subject: [PATCH 3/4] Make buttons public --- .../WRNavigationBar_swift.xcodeproj/project.pbxproj | 12 +++++------- .../Classes/WRCustomNavigationBar.swift | 4 ++-- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Example/WRNavigationBar_swift.xcodeproj/project.pbxproj b/Example/WRNavigationBar_swift.xcodeproj/project.pbxproj index d919c2b..959060b 100644 --- a/Example/WRNavigationBar_swift.xcodeproj/project.pbxproj +++ b/Example/WRNavigationBar_swift.xcodeproj/project.pbxproj @@ -79,7 +79,7 @@ 674BDFB6759A869CA78AA223 /* Pods_WRNavigationBar_swift_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WRNavigationBar_swift_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8A798F447A512F554761A078 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.release.xcconfig"; sourceTree = ""; }; 95AD45F4B1519FF22CE4A582 /* Pods-WRNavigationBar_swift_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WRNavigationBar_swift_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.debug.xcconfig"; sourceTree = ""; }; - B0BBA55420B4316A4E7F8CC6 /* WRNavigationBar_swift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = WRNavigationBar_swift.podspec; path = ../WRNavigationBar_swift.podspec; sourceTree = ""; }; + B0BBA55420B4316A4E7F8CC6 /* WRNavigationBar_swift.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = WRNavigationBar_swift.podspec; path = ../WRNavigationBar_swift.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; E04A31239948BC169A0C854F /* Pods_WRNavigationBar_swift_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_WRNavigationBar_swift_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -287,12 +287,10 @@ TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - DevelopmentTeam = P3X2725LYY; LastSwiftMigration = 0900; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - DevelopmentTeam = P3X2725LYY; LastSwiftMigration = 0900; TestTargetID = 607FACCF1AFB9204008FA782; }; @@ -567,7 +565,7 @@ baseConfigurationReference = 3C739D7B7E47049E273E27D6 /* Pods-WRNavigationBar_swift_Example.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = P3X2725LYY; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = WRNavigationBar_swift/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; @@ -583,7 +581,7 @@ baseConfigurationReference = 1CE6177B91612B092B9820D6 /* Pods-WRNavigationBar_swift_Example.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = P3X2725LYY; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = WRNavigationBar_swift/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; @@ -598,7 +596,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 95AD45F4B1519FF22CE4A582 /* Pods-WRNavigationBar_swift_Tests.debug.xcconfig */; buildSettings = { - DEVELOPMENT_TEAM = P3X2725LYY; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", @@ -621,7 +619,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 8A798F447A512F554761A078 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */; buildSettings = { - DEVELOPMENT_TEAM = P3X2725LYY; + DEVELOPMENT_TEAM = ""; FRAMEWORK_SEARCH_PATHS = ( "$(SDKROOT)/Developer/Library/Frameworks", "$(inherited)", diff --git a/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift b/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift index 0429b06..da32b27 100644 --- a/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift +++ b/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift @@ -112,7 +112,7 @@ public class WRCustomNavigationBar: UIView return label }() - fileprivate lazy var leftButton:UIButton = { + public lazy var leftButton:UIButton = { let button = UIButton() button.imageView?.contentMode = .center button.isHidden = true @@ -120,7 +120,7 @@ public class WRCustomNavigationBar: UIView return button }() - fileprivate lazy var rightButton:UIButton = { + public lazy var rightButton:UIButton = { let button = UIButton() button.imageView?.contentMode = .center button.isHidden = true From a409d9ccd7da731be32c20c559acfe874129525a Mon Sep 17 00:00:00 2001 From: EyreFree Date: Thu, 17 Jan 2019 11:54:31 +0800 Subject: [PATCH 4/4] Fix --- Example/Podfile.lock | 2 +- .../WRNavigationBar_swift.podspec.json | 3 +- Example/Pods/Manifest.lock | 2 +- Example/Pods/Pods.xcodeproj/project.pbxproj | 491 ++++++++++-------- WRNavigationBar_swift.podspec | 3 +- .../Classes/WRCustomNavigationBar.swift | 21 +- 6 files changed, 274 insertions(+), 248 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 52101f7..96f0889 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - WRNavigationBar_swift: ec68cfa6759f2f2a3815412ddca899ec2c7b17b5 + WRNavigationBar_swift: 2aa357390ecb7e3cc50dffb0b82c338e1dffad63 PODFILE CHECKSUM: b9c9e56e2153483fea864e416272c298196d42b7 diff --git a/Example/Pods/Local Podspecs/WRNavigationBar_swift.podspec.json b/Example/Pods/Local Podspecs/WRNavigationBar_swift.podspec.json index e9def69..44aaddc 100644 --- a/Example/Pods/Local Podspecs/WRNavigationBar_swift.podspec.json +++ b/Example/Pods/Local Podspecs/WRNavigationBar_swift.podspec.json @@ -9,12 +9,13 @@ "file": "LICENSE" }, "authors": { - "EyreFree": "eyrefree@eyrefree.org" + "wangrui460": "wangruidev@gmail.com" }, "source": { "git": "https://github.com/wangrui460/WRNavigationBar_swift.git", "tag": "0.1.0" }, + "swift_version": "4.2", "platforms": { "ios": "8.0" }, diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 52101f7..96f0889 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -9,7 +9,7 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - WRNavigationBar_swift: ec68cfa6759f2f2a3815412ddca899ec2c7b17b5 + WRNavigationBar_swift: 2aa357390ecb7e3cc50dffb0b82c338e1dffad63 PODFILE CHECKSUM: b9c9e56e2153483fea864e416272c298196d42b7 diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 9dc5df5..ff46866 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,32 +7,32 @@ objects = { /* Begin PBXBuildFile section */ - 0719EF6C5821D05F964CF2B2886F61B9 /* WRNavigationBar_swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5B1651DFC89238E5BC2C4A7D5796A9 /* WRNavigationBar_swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2844F6E28FE4D57E3E12897FFFB6BF93 /* Pods-WRNavigationBar_swift_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A220E8B831374E686270E39EFAA40192 /* Pods-WRNavigationBar_swift_Example-dummy.m */; }; - 2FD18F6E20CF2F088D400AA6790E3EF7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - 4E339A32B29342BC4C0B01368DD02B84 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - 6C6D80692A099EF54E27A092F951EB67 /* WRNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C59F1AB4AF8927F5A57EED90D422956 /* WRNavigationBar.swift */; }; - 81C5E3581239A25680037B1E661FE3AB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - 88568CBFB534E3ECD7A4E1112CCFFDA4 /* Pods-WRNavigationBar_swift_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6CF5616DD1A65C22BB3F8C9052B30ACF /* Pods-WRNavigationBar_swift_Tests-dummy.m */; }; - A51E01C223029C9F69B26884179AF5E3 /* Pods-WRNavigationBar_swift_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B76D2BC188CA1D9EB9B467575F2E5CE /* Pods-WRNavigationBar_swift_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AC6F7EBA157905D0CF3228305BAC0CC8 /* WRCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A08B83DBB3F1D2E9B30B96F89B36904 /* WRCustomNavigationBar.swift */; }; - D571EE690E7BC00590D902E16A7C70E5 /* Pods-WRNavigationBar_swift_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 57E8B3CEC6C8E348762C233480A3587F /* Pods-WRNavigationBar_swift_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - F22078882962C9D69FF0FABDC2C9586E /* WRNavigationBar_swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CA3E0C4DD52127AF023AB8C108CB0E6E /* WRNavigationBar_swift-dummy.m */; }; + 12DFA3AA280044168FC2E4B0565C0A54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6DFF15000AFE2A371BF499E7AFDA808 /* Foundation.framework */; }; + 492B9A6433A234E23AEDAFFA680E649E /* Pods-WRNavigationBar_swift_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A220E8B831374E686270E39EFAA40192 /* Pods-WRNavigationBar_swift_Example-dummy.m */; }; + 4DF8EE387FDE46BAAF4A15E679DD1871 /* Pods-WRNavigationBar_swift_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 57E8B3CEC6C8E348762C233480A3587F /* Pods-WRNavigationBar_swift_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 55B76EAB2B4B7C839BAEF5FD487A8076 /* WRNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C59F1AB4AF8927F5A57EED90D422956 /* WRNavigationBar.swift */; }; + 57AE918FC0BE5BBD8E98BA19E685F005 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6DFF15000AFE2A371BF499E7AFDA808 /* Foundation.framework */; }; + 5BE81AAC51D344B3B7FE03EE38D0E081 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6DFF15000AFE2A371BF499E7AFDA808 /* Foundation.framework */; }; + 6F14E18F7258244E5378D9CA487D141E /* WRNavigationBar_swift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C5B1651DFC89238E5BC2C4A7D5796A9 /* WRNavigationBar_swift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 731E3BD51A7BF1385A958ACD63AF6B75 /* WRCustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A08B83DBB3F1D2E9B30B96F89B36904 /* WRCustomNavigationBar.swift */; }; + 84CC6FABB10FAE1C8345FDB27E89504D /* Pods-WRNavigationBar_swift_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B76D2BC188CA1D9EB9B467575F2E5CE /* Pods-WRNavigationBar_swift_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 95CA39F008126A4670B570F5B2C692B0 /* WRNavigationBar_swift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CA3E0C4DD52127AF023AB8C108CB0E6E /* WRNavigationBar_swift-dummy.m */; }; + DAD252A874DB6E06512B08B4E900A468 /* Pods-WRNavigationBar_swift_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6CF5616DD1A65C22BB3F8C9052B30ACF /* Pods-WRNavigationBar_swift_Tests-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 8C54A5C9B38A7E81E6D2E86732CDF129 /* PBXContainerItemProxy */ = { + 029B46BEF350BA8353F6D25DF596AC00 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 777F87E1EDAD2F539CEA49C05C1567F8; + remoteGlobalIDString = 1E971BBB26C1EF439C409D7BA61CFA62; remoteInfo = WRNavigationBar_swift; }; - AC6B40231439C1E1DE2783CE68A9F569 /* PBXContainerItemProxy */ = { + 93825C78483D11FF800C66CD366509BD /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = F9ADB9B615006C52C138AD76187E5EAF; + remoteGlobalIDString = 6006A302CB37647D8E21C005B2F15D6B; remoteInfo = "Pods-WRNavigationBar_swift_Example"; }; /* End PBXContainerItemProxy section */ @@ -50,7 +50,6 @@ 508CA396CD0CDEB1126200868837EAD1 /* Pods-WRNavigationBar_swift_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-WRNavigationBar_swift_Example.modulemap"; sourceTree = ""; }; 57E8B3CEC6C8E348762C233480A3587F /* Pods-WRNavigationBar_swift_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-WRNavigationBar_swift_Example-umbrella.h"; sourceTree = ""; }; 5D6BC060D6923D654AC232DC8D36C473 /* Pods_WRNavigationBar_swift_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_WRNavigationBar_swift_Tests.framework; path = "Pods-WRNavigationBar_swift_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 68711F33FA5271BB868BA7F5C5F6D2ED /* Pods-WRNavigationBar_swift_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift_Tests-frameworks.sh"; sourceTree = ""; }; 68BCE43926B6E3C7C38AE96123877E6F /* Pods-WRNavigationBar_swift_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-WRNavigationBar_swift_Tests.modulemap"; sourceTree = ""; }; 6CF5616DD1A65C22BB3F8C9052B30ACF /* Pods-WRNavigationBar_swift_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-WRNavigationBar_swift_Tests-dummy.m"; sourceTree = ""; }; @@ -72,32 +71,33 @@ CD9D66E58AF7978C20D8AC84ACE81FCB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; D40F8C0BBD58E88B6B2B8F09B0AA1DD6 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-WRNavigationBar_swift_Tests.release.xcconfig"; sourceTree = ""; }; D5B9CD2CF1929DDAE3428882BBE38D33 /* Pods-WRNavigationBar_swift_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift_Example-frameworks.sh"; sourceTree = ""; }; + D6DFF15000AFE2A371BF499E7AFDA808 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; D942504DD0BE6A07B10A1621BB03DEEC /* Pods-WRNavigationBar_swift_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-WRNavigationBar_swift_Example-resources.sh"; sourceTree = ""; }; F34BEA3B2FF78CB4EA1ABCBAD8672164 /* WRNavigationBar_swift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = WRNavigationBar_swift.framework; path = WRNavigationBar_swift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 18522BD4FD73472CE435796384A7AA70 /* Frameworks */ = { + 5CE674380577C6317A25B4FB0C4F6478 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 4E339A32B29342BC4C0B01368DD02B84 /* Foundation.framework in Frameworks */, + 57AE918FC0BE5BBD8E98BA19E685F005 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 1AF4ACEC31080A1183417526DD7EAD79 /* Frameworks */ = { + 6E75F918745E4ABC82707F5CFB62792F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 81C5E3581239A25680037B1E661FE3AB /* Foundation.framework in Frameworks */, + 12DFA3AA280044168FC2E4B0565C0A54 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - FD048BA2B4000F5FB64ACAD45796D03C /* Frameworks */ = { + EC5FB2561CECF90A2D3F2680DE0AA38C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 2FD18F6E20CF2F088D400AA6790E3EF7 /* Foundation.framework in Frameworks */, + 5BE81AAC51D344B3B7FE03EE38D0E081 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -142,6 +142,14 @@ name = Products; sourceTree = ""; }; + 44D5347904CF754D6785B84253F2574A /* iOS */ = { + isa = PBXGroup; + children = ( + D6DFF15000AFE2A371BF499E7AFDA808 /* Foundation.framework */, + ); + name = iOS; + sourceTree = ""; + }; 485E4E620821677066507495826A2F5D /* WRNavigationBar_swift */ = { isa = PBXGroup; children = ( @@ -185,7 +193,7 @@ BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { isa = PBXGroup; children = ( - D35AF013A5F0BAD4F32504907A52519E /* iOS */, + 44D5347904CF754D6785B84253F2574A /* iOS */, ); name = Frameworks; sourceTree = ""; @@ -204,14 +212,6 @@ path = "Example/Pods/Target Support Files/WRNavigationBar_swift"; sourceTree = ""; }; - D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { - isa = PBXGroup; - children = ( - 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, - ); - name = iOS; - sourceTree = ""; - }; D6691E126CA8ED9D62913EB4BCD4ACE2 /* Pods-WRNavigationBar_swift_Tests */ = { isa = PBXGroup; children = ( @@ -233,40 +233,41 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 44000D3C5074C1378B89D1721EEC5849 /* Headers */ = { + 291366D31EC92DF0C30D462EECFC222E /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D571EE690E7BC00590D902E16A7C70E5 /* Pods-WRNavigationBar_swift_Example-umbrella.h in Headers */, + 4DF8EE387FDE46BAAF4A15E679DD1871 /* Pods-WRNavigationBar_swift_Example-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - D5B6D70CE20A76E0731274EBFA6081F8 /* Headers */ = { + 9416BD65383A9C235439328DADB3F95F /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - A51E01C223029C9F69B26884179AF5E3 /* Pods-WRNavigationBar_swift_Tests-umbrella.h in Headers */, + 6F14E18F7258244E5378D9CA487D141E /* WRNavigationBar_swift-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - E0698C8FB7E5CC37973FF2B22B869C31 /* Headers */ = { + F9C8307D50E417D10E437A9B0110D097 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 0719EF6C5821D05F964CF2B2886F61B9 /* WRNavigationBar_swift-umbrella.h in Headers */, + 84CC6FABB10FAE1C8345FDB27E89504D /* Pods-WRNavigationBar_swift_Tests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 777F87E1EDAD2F539CEA49C05C1567F8 /* WRNavigationBar_swift */ = { + 1E971BBB26C1EF439C409D7BA61CFA62 /* WRNavigationBar_swift */ = { isa = PBXNativeTarget; - buildConfigurationList = E6A96FDEF93EA23E002E980B577E71DB /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift" */; + buildConfigurationList = 121D313D6EF17BED438002616A5CE93E /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift" */; buildPhases = ( - 7DFC3E71E4364B5B9DA43423B4382CA4 /* Sources */, - 1AF4ACEC31080A1183417526DD7EAD79 /* Frameworks */, - E0698C8FB7E5CC37973FF2B22B869C31 /* Headers */, + 9416BD65383A9C235439328DADB3F95F /* Headers */, + ADB1529A1EC2D6925666562EEC9486F1 /* Sources */, + EC5FB2561CECF90A2D3F2680DE0AA38C /* Frameworks */, + 674438C47101DAEBBF1A07F9847001D0 /* Resources */, ); buildRules = ( ); @@ -277,40 +278,42 @@ productReference = F34BEA3B2FF78CB4EA1ABCBAD8672164 /* WRNavigationBar_swift.framework */; productType = "com.apple.product-type.framework"; }; - 8E85EDDB0A657AAAE8EF85FB6F22D8AE /* Pods-WRNavigationBar_swift_Tests */ = { + 6006A302CB37647D8E21C005B2F15D6B /* Pods-WRNavigationBar_swift_Example */ = { isa = PBXNativeTarget; - buildConfigurationList = FB9F8C72C32CB8A084D563ECA3ACCD9C /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Tests" */; + buildConfigurationList = 21C99A2AC3A090B987926ECAF901E75C /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Example" */; buildPhases = ( - 119F38F8774BFDC0455C2C2B2DAF75FE /* Sources */, - FD048BA2B4000F5FB64ACAD45796D03C /* Frameworks */, - D5B6D70CE20A76E0731274EBFA6081F8 /* Headers */, + 291366D31EC92DF0C30D462EECFC222E /* Headers */, + BE5D742391EDA7C09991D8E8327ABEEB /* Sources */, + 5CE674380577C6317A25B4FB0C4F6478 /* Frameworks */, + AC2393A23840F92ED0B0FAA3EE1192F5 /* Resources */, ); buildRules = ( ); dependencies = ( - 0216709A9DBB036A38700C87C96A4EA1 /* PBXTargetDependency */, + E4A93C6550CF8AD3EF6EA2327E083AAC /* PBXTargetDependency */, ); - name = "Pods-WRNavigationBar_swift_Tests"; - productName = "Pods-WRNavigationBar_swift_Tests"; - productReference = 5D6BC060D6923D654AC232DC8D36C473 /* Pods_WRNavigationBar_swift_Tests.framework */; + name = "Pods-WRNavigationBar_swift_Example"; + productName = "Pods-WRNavigationBar_swift_Example"; + productReference = C08A11C2C34A949A6425C92602564FC0 /* Pods_WRNavigationBar_swift_Example.framework */; productType = "com.apple.product-type.framework"; }; - F9ADB9B615006C52C138AD76187E5EAF /* Pods-WRNavigationBar_swift_Example */ = { + D61233705A3945CD790EE9615AA03EE3 /* Pods-WRNavigationBar_swift_Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = C2F96B402B6E1167483FA91D8148066B /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Example" */; + buildConfigurationList = 6BA7697D6027FECE8423401E6E75D2FC /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Tests" */; buildPhases = ( - 8B547BD0A0D069F8C3B8537AE2958FCA /* Sources */, - 18522BD4FD73472CE435796384A7AA70 /* Frameworks */, - 44000D3C5074C1378B89D1721EEC5849 /* Headers */, + F9C8307D50E417D10E437A9B0110D097 /* Headers */, + 645BA541F8A549B56BD8454912939317 /* Sources */, + 6E75F918745E4ABC82707F5CFB62792F /* Frameworks */, + F37911F2FDA5BDABF3CCA1849679AE58 /* Resources */, ); buildRules = ( ); dependencies = ( - 5702C38EC04A58EA36C1651AEB76929D /* PBXTargetDependency */, + 283C40C039951C87867C1C58AFC8CD53 /* PBXTargetDependency */, ); - name = "Pods-WRNavigationBar_swift_Example"; - productName = "Pods-WRNavigationBar_swift_Example"; - productReference = C08A11C2C34A949A6425C92602564FC0 /* Pods_WRNavigationBar_swift_Example.framework */; + name = "Pods-WRNavigationBar_swift_Tests"; + productName = "Pods-WRNavigationBar_swift_Tests"; + productReference = 5D6BC060D6923D654AC232DC8D36C473 /* Pods_WRNavigationBar_swift_Tests.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ @@ -334,91 +337,83 @@ projectDirPath = ""; projectRoot = ""; targets = ( - F9ADB9B615006C52C138AD76187E5EAF /* Pods-WRNavigationBar_swift_Example */, - 8E85EDDB0A657AAAE8EF85FB6F22D8AE /* Pods-WRNavigationBar_swift_Tests */, - 777F87E1EDAD2F539CEA49C05C1567F8 /* WRNavigationBar_swift */, + 6006A302CB37647D8E21C005B2F15D6B /* Pods-WRNavigationBar_swift_Example */, + D61233705A3945CD790EE9615AA03EE3 /* Pods-WRNavigationBar_swift_Tests */, + 1E971BBB26C1EF439C409D7BA61CFA62 /* WRNavigationBar_swift */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 674438C47101DAEBBF1A07F9847001D0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + AC2393A23840F92ED0B0FAA3EE1192F5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F37911F2FDA5BDABF3CCA1849679AE58 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ - 119F38F8774BFDC0455C2C2B2DAF75FE /* Sources */ = { + 645BA541F8A549B56BD8454912939317 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 88568CBFB534E3ECD7A4E1112CCFFDA4 /* Pods-WRNavigationBar_swift_Tests-dummy.m in Sources */, + DAD252A874DB6E06512B08B4E900A468 /* Pods-WRNavigationBar_swift_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7DFC3E71E4364B5B9DA43423B4382CA4 /* Sources */ = { + ADB1529A1EC2D6925666562EEC9486F1 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - AC6F7EBA157905D0CF3228305BAC0CC8 /* WRCustomNavigationBar.swift in Sources */, - 6C6D80692A099EF54E27A092F951EB67 /* WRNavigationBar.swift in Sources */, - F22078882962C9D69FF0FABDC2C9586E /* WRNavigationBar_swift-dummy.m in Sources */, + 731E3BD51A7BF1385A958ACD63AF6B75 /* WRCustomNavigationBar.swift in Sources */, + 55B76EAB2B4B7C839BAEF5FD487A8076 /* WRNavigationBar.swift in Sources */, + 95CA39F008126A4670B570F5B2C692B0 /* WRNavigationBar_swift-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 8B547BD0A0D069F8C3B8537AE2958FCA /* Sources */ = { + BE5D742391EDA7C09991D8E8327ABEEB /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2844F6E28FE4D57E3E12897FFFB6BF93 /* Pods-WRNavigationBar_swift_Example-dummy.m in Sources */, + 492B9A6433A234E23AEDAFFA680E649E /* Pods-WRNavigationBar_swift_Example-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 0216709A9DBB036A38700C87C96A4EA1 /* PBXTargetDependency */ = { + 283C40C039951C87867C1C58AFC8CD53 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = "Pods-WRNavigationBar_swift_Example"; - target = F9ADB9B615006C52C138AD76187E5EAF /* Pods-WRNavigationBar_swift_Example */; - targetProxy = AC6B40231439C1E1DE2783CE68A9F569 /* PBXContainerItemProxy */; + target = 6006A302CB37647D8E21C005B2F15D6B /* Pods-WRNavigationBar_swift_Example */; + targetProxy = 93825C78483D11FF800C66CD366509BD /* PBXContainerItemProxy */; }; - 5702C38EC04A58EA36C1651AEB76929D /* PBXTargetDependency */ = { + E4A93C6550CF8AD3EF6EA2327E083AAC /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = WRNavigationBar_swift; - target = 777F87E1EDAD2F539CEA49C05C1567F8 /* WRNavigationBar_swift */; - targetProxy = 8C54A5C9B38A7E81E6D2E86732CDF129 /* PBXContainerItemProxy */; + target = 1E971BBB26C1EF439C409D7BA61CFA62 /* WRNavigationBar_swift */; + targetProxy = 029B46BEF350BA8353F6D25DF596AC00 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 05797DAF083C477FDAB03052DC0D3ED9 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = B45CB8D4E36A91FD20D745DC09B18794 /* WRNavigationBar_swift.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/WRNavigationBar_swift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.modulemap"; - PRODUCT_MODULE_NAME = WRNavigationBar_swift; - PRODUCT_NAME = WRNavigationBar_swift; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 4.2; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 125B85936036B33F3CF531E8C0334A23 /* Release */ = { + 33D65004D03E0F58077E976EF847EAFF /* Release */ = { isa = XCBuildConfiguration; baseConfigurationReference = B45CB8D4E36A91FD20D745DC09B18794 /* WRNavigationBar_swift.xcconfig */; buildSettings = { @@ -442,7 +437,6 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; @@ -451,111 +445,7 @@ }; name = Release; }; - 1C620BB134BA5B4556C6A6ABAC2A2252 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 27FB9858EC497F84631FA0DB3FEFB4A0 /* Pods-WRNavigationBar_swift_Example.debug.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - 4CA2EB678B9E6D1C3ABC1B535B548B10 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = A910EFE6F17AED68F486FF1F1F7EE26A /* Pods-WRNavigationBar_swift_Example.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 528C9B31BDE312E97240A31093C37E2E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D40F8C0BBD58E88B6B2B8F09B0AA1DD6 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */; - buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Tests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 8B33C5230DE4A9DFA6D8F46505DD7AF7 /* Debug */ = { + 50646285DD9FD95AF390BDA3FB1948EA /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -609,16 +499,53 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; - MTL_ENABLE_DEBUG_INFO = YES; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - B42B54097A876E8A982CBF5DAA91B1AB /* Release */ = { + 55B658CE7A7EDEB872DBF2078BA161D4 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A910EFE6F17AED68F486FF1F1F7EE26A /* Pods-WRNavigationBar_swift_Example.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 58DCB2BA7C34E84C00C38CEF18A96D11 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -670,13 +597,48 @@ GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 9.3; MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + SWIFT_VERSION = 4.2; SYMROOT = "${SRCROOT}/../build"; }; name = Release; }; - EABD53A18E3950E15ED50B9175D43E95 /* Debug */ = { + 74BF5DA12AF2629EFEF39C4A5553F35C /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B45CB8D4E36A91FD20D745DC09B18794 /* WRNavigationBar_swift.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/WRNavigationBar_swift/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/WRNavigationBar_swift/WRNavigationBar_swift.modulemap"; + PRODUCT_MODULE_NAME = WRNavigationBar_swift; + PRODUCT_NAME = WRNavigationBar_swift; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + A02AADCA9AD25B2F1AFD7C97F07B1D53 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = AA27BDDDD9B4C4B45D6607EBA6D9D1AF /* Pods-WRNavigationBar_swift_Tests.debug.xcconfig */; buildSettings = { @@ -709,41 +671,108 @@ }; name = Debug; }; + D65619BE36A641470E3F767067DE29AA /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 27FB9858EC497F84631FA0DB3FEFB4A0 /* Pods-WRNavigationBar_swift_Example.debug.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Example/Pods-WRNavigationBar_swift_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + D961B9D4F4D1C6C42D1C1B3C19172782 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D40F8C0BBD58E88B6B2B8F09B0AA1DD6 /* Pods-WRNavigationBar_swift_Tests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Tests/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-WRNavigationBar_swift_Tests/Pods-WRNavigationBar_swift_Tests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 121D313D6EF17BED438002616A5CE93E /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8B33C5230DE4A9DFA6D8F46505DD7AF7 /* Debug */, - B42B54097A876E8A982CBF5DAA91B1AB /* Release */, + 74BF5DA12AF2629EFEF39C4A5553F35C /* Debug */, + 33D65004D03E0F58077E976EF847EAFF /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - C2F96B402B6E1167483FA91D8148066B /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Example" */ = { + 21C99A2AC3A090B987926ECAF901E75C /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 1C620BB134BA5B4556C6A6ABAC2A2252 /* Debug */, - 4CA2EB678B9E6D1C3ABC1B535B548B10 /* Release */, + D65619BE36A641470E3F767067DE29AA /* Debug */, + 55B658CE7A7EDEB872DBF2078BA161D4 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E6A96FDEF93EA23E002E980B577E71DB /* Build configuration list for PBXNativeTarget "WRNavigationBar_swift" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 05797DAF083C477FDAB03052DC0D3ED9 /* Debug */, - 125B85936036B33F3CF531E8C0334A23 /* Release */, + 50646285DD9FD95AF390BDA3FB1948EA /* Debug */, + 58DCB2BA7C34E84C00C38CEF18A96D11 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - FB9F8C72C32CB8A084D563ECA3ACCD9C /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Tests" */ = { + 6BA7697D6027FECE8423401E6E75D2FC /* Build configuration list for PBXNativeTarget "Pods-WRNavigationBar_swift_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - EABD53A18E3950E15ED50B9175D43E95 /* Debug */, - 528C9B31BDE312E97240A31093C37E2E /* Release */, + A02AADCA9AD25B2F1AFD7C97F07B1D53 /* Debug */, + D961B9D4F4D1C6C42D1C1B3C19172782 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/WRNavigationBar_swift.podspec b/WRNavigationBar_swift.podspec index 4993f20..12f6e19 100644 --- a/WRNavigationBar_swift.podspec +++ b/WRNavigationBar_swift.podspec @@ -10,10 +10,11 @@ WRNavigationBar which allows you to change NavigationBar's appearance dynamicall s.homepage = 'https://github.com/wangrui460/WRNavigationBar_swift' # s.screenshots = 'www.example.com/screenshots_1', 'www.example.com/screenshots_2' s.license = { :type => 'MIT', :file => 'LICENSE' } - s.author = { 'EyreFree' => 'eyrefree@eyrefree.org' } + s.author = { 'wangrui460' => 'wangruidev@gmail.com' } s.source = { :git => 'https://github.com/wangrui460/WRNavigationBar_swift.git', :tag => s.version.to_s } # s.social_media_url = 'https://twitter.com/' + s.swift_version = "4.2" s.ios.deployment_target = '8.0' s.source_files = 'WRNavigationBar_swift/Classes/**/*' diff --git a/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift b/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift index da32b27..d4f54cf 100644 --- a/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift +++ b/WRNavigationBar_swift/Classes/WRCustomNavigationBar.swift @@ -46,20 +46,15 @@ public extension UIViewController } } - class func wr_currentViewController(from fromVC:UIViewController) -> UIViewController + class func wr_currentViewController(from fromVC: UIViewController) -> UIViewController { - if fromVC.isKind(of: UINavigationController.self) { - let navigationController = fromVC as! UINavigationController - return wr_currentViewController(from: navigationController.viewControllers.last!) - } - else if fromVC.isKind(of: UITabBarController.self) { - let tabBarController = fromVC as! UITabBarController - return wr_currentViewController(from: tabBarController.selectedViewController!) - } - else if fromVC.presentedViewController != nil { - return wr_currentViewController(from:fromVC.presentingViewController!) - } - else { + if let navigationController = fromVC as? UINavigationController, let subViewController = navigationController.viewControllers.last { + return wr_currentViewController(from: subViewController) + } else if let tabBarController = fromVC as? UITabBarController, let subViewController = tabBarController.selectedViewController { + return wr_currentViewController(from: subViewController) + } else if let presentedViewController = fromVC.presentedViewController { + return wr_currentViewController(from: presentedViewController) + } else { return fromVC } }