Commit c1ce21a05e5f3f95d6db03ea36c510ffa3edb3b9
0 parents
导航栏 0.0.1
Showing
46 changed files
with
2730 additions
and
0 deletions
.gitignore
0 → 100644
| 1 | +++ a/.gitignore | |
| 1 | +# OS X | |
| 2 | +.DS_Store | |
| 3 | + | |
| 4 | +# Xcode | |
| 5 | +build/ | |
| 6 | +Products/ | |
| 7 | +*.pbxuser | |
| 8 | +!default.pbxuser | |
| 9 | +*.mode1v3 | |
| 10 | +!default.mode1v3 | |
| 11 | +*.mode2v3 | |
| 12 | +!default.mode2v3 | |
| 13 | +*.perspectivev3 | |
| 14 | +!default.perspectivev3 | |
| 15 | +xcuserdata/ | |
| 16 | +*.xccheckout | |
| 17 | +profile | |
| 18 | +*.moved-aside | |
| 19 | +DerivedData | |
| 20 | +*.hmap | |
| 21 | +*.ipa | |
| 22 | + | |
| 23 | +# Bundler | |
| 24 | +.bundle | |
| 25 | + | |
| 26 | +# Add this line if you want to avoid checking in source code from Carthage dependencies. | |
| 27 | +# Carthage/Checkouts | |
| 28 | + | |
| 29 | +Carthage/Build | |
| 30 | + | |
| 31 | +# We recommend against adding the Pods directory to your .gitignore. However | |
| 32 | +# you should judge for yourself, the pros and cons are mentioned at: | |
| 33 | +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control | |
| 34 | +# | |
| 35 | +# Note: if you ignore the Pods directory, make sure to uncomment | |
| 36 | +# `pod install` in .travis.yml | |
| 37 | +# | |
| 38 | +# Pods/ | ... | ... |
.travis.yml
0 → 100644
| 1 | +++ a/.travis.yml | |
| 1 | +# references: | |
| 2 | +# * https://www.objc.io/issues/6-build-tools/travis-ci/ | |
| 3 | +# * https://github.com/supermarin/xcpretty#usage | |
| 4 | + | |
| 5 | +osx_image: xcode7.3 | |
| 6 | +language: objective-c | |
| 7 | +# cache: cocoapods | |
| 8 | +# podfile: Example/Podfile | |
| 9 | +# before_install: | |
| 10 | +# - gem install cocoapods # Since Travis is not always on latest version | |
| 11 | +# - pod install --project-directory=Example | |
| 12 | +script: | |
| 13 | +- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/CNLiveNavigationClass.xcworkspace -scheme CNLiveNavigationClass-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty | |
| 14 | +- pod lib lint | ... | ... |
CNLiveNavigationClass.podspec
0 → 100644
| 1 | +++ a/CNLiveNavigationClass.podspec | |
| 1 | +# | |
| 2 | +# Be sure to run `pod lib lint CNLiveNavigationClass.podspec' to ensure this is a | |
| 3 | +# valid spec before submitting. | |
| 4 | +# | |
| 5 | +# Any lines starting with a # are optional, but their use is encouraged | |
| 6 | +# To learn more about a Podspec see https://guides.cocoapods.org/syntax/podspec.html | |
| 7 | +# | |
| 8 | + | |
| 9 | +Pod::Spec.new do |s| | |
| 10 | + s.name = 'CNLiveNavigationClass' | |
| 11 | + s.version = '0.0.1' | |
| 12 | + s.summary = '导航栏' | |
| 13 | + | |
| 14 | + s.description = <<-DESC | |
| 15 | +TODO: Add long description of the pod here. | |
| 16 | + DESC | |
| 17 | + | |
| 18 | + s.homepage = 'http://bj.gitlab.cnlive.com/ios-team/CNLiveNavigationClass' | |
| 19 | + s.license = { :type => 'MIT', :file => 'LICENSE' } | |
| 20 | + s.author = { 'dawanzi' => '1427945373@qq.com' } | |
| 21 | + s.source = { :git => 'http://bj.gitlab.cnlive.com/ios-team/CNLiveNavigationClass.git', :tag => s.version.to_s } | |
| 22 | + | |
| 23 | + s.ios.deployment_target = '9.0' | |
| 24 | + | |
| 25 | + s.subspec 'HKFloat' do |hkFloat| | |
| 26 | + hkFloat.source_files = 'CNLiveNavigationClass/Classes/HKFloat/*.{h,m}' | |
| 27 | + end | |
| 28 | + s.subspec 'CNNavigationController' do |nav| | |
| 29 | + nav.source_files = 'CNLiveNavigationClass/Classes/CNNavigationController/*.{h,m}' | |
| 30 | + nav.dependency 'CNLiveNavigationClass/HKFloat' | |
| 31 | + end | |
| 32 | +# s.source_files = 'CNLiveNavigationClass/Classes/**/*' | |
| 33 | + s.dependency 'CNLiveTripartiteManagement/QMUIKit' | |
| 34 | + s.dependency 'CNLiveBaseKit' | |
| 35 | + s.dependency 'CNLiveCommonCategory' | |
| 36 | + # s.resource_bundles = { | |
| 37 | + # 'CNLiveNavigationClass' => ['CNLiveNavigationClass/Assets/*.png'] | |
| 38 | + # } | |
| 39 | + s.frameworks = 'UIKit', 'Foundation' | |
| 40 | +end | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/CNLiveNavigationControllerDelegate.h
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/CNLiveNavigationControllerDelegate.h | |
| 1 | +// | |
| 2 | +// CNLiveNavigationControllerDelegate.h | |
| 3 | +// testIM | |
| 4 | +// | |
| 5 | +// Created by 流诗语 on 2018/11/2. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +NS_ASSUME_NONNULL_BEGIN | |
| 12 | + | |
| 13 | +@interface CNLiveNavigationControllerDelegate : NSObject<UINavigationControllerDelegate> | |
| 14 | + | |
| 15 | +@end | |
| 16 | + | |
| 17 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/CNLiveNavigationControllerDelegate.m
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/CNLiveNavigationControllerDelegate.m | |
| 1 | + | |
| 2 | + | |
| 3 | +// | |
| 4 | +// CNLiveNavigationControllerDelegate.m | |
| 5 | +// testIM | |
| 6 | +// | |
| 7 | +// Created by 流诗语 on 2018/11/2. | |
| 8 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 9 | +// | |
| 10 | + | |
| 11 | +#import "CNLiveNavigationControllerDelegate.h" | |
| 12 | +#import "HKFloatManager.h" | |
| 13 | +#import "HKTransitionPush.h" | |
| 14 | +#import "HKTransitionPop.h" | |
| 15 | + | |
| 16 | +@interface CNLiveNavigationControllerDelegate() | |
| 17 | +@property (nonatomic, strong) UIPercentDrivenInteractiveTransition *interactiveTransition; | |
| 18 | +@end | |
| 19 | + | |
| 20 | +@implementation CNLiveNavigationControllerDelegate | |
| 21 | + | |
| 22 | +- (UIPercentDrivenInteractiveTransition *)interactiveTransition { | |
| 23 | + if (!_interactiveTransition) { | |
| 24 | + _interactiveTransition = [UIPercentDrivenInteractiveTransition new]; | |
| 25 | + } | |
| 26 | + return _interactiveTransition; | |
| 27 | +} | |
| 28 | + | |
| 29 | +- (nullable id <UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController | |
| 30 | + animationControllerForOperation:(UINavigationControllerOperation)operation | |
| 31 | + fromViewController:(UIViewController *)fromVC | |
| 32 | + toViewController:(UIViewController *)toVC | |
| 33 | +{ | |
| 34 | + | |
| 35 | + UIViewController * vc = [HKFloatManager shared].floatViewController; | |
| 36 | + if (vc) { | |
| 37 | + if(operation==UINavigationControllerOperationPush){ | |
| 38 | + if (toVC != vc) { | |
| 39 | + return nil; | |
| 40 | + } | |
| 41 | + HKTransitionPush *transition = [[HKTransitionPush alloc]init]; | |
| 42 | + return transition; | |
| 43 | + }else if(operation==UINavigationControllerOperationPop){ | |
| 44 | + if (fromVC != vc) { | |
| 45 | + return nil; | |
| 46 | + } | |
| 47 | + HKTransitionPop *transition = [[HKTransitionPop alloc]init]; | |
| 48 | + return transition; | |
| 49 | + }else{ | |
| 50 | + return nil; | |
| 51 | + } | |
| 52 | + }else{ | |
| 53 | + return nil; | |
| 54 | + } | |
| 55 | +} | |
| 56 | + | |
| 57 | +@end | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/CNNavigationController.h
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/CNNavigationController.h | |
| 1 | +// | |
| 2 | +// CNNavigationController.h | |
| 3 | +// CNLiveNetAdd | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/12/30. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "QMUIKit.h" | |
| 10 | +#import "NavigationViewController.h" | |
| 11 | +@interface CNNavigationController : NavigationViewController | |
| 12 | + | |
| 13 | +@end | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/CNNavigationController.m
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/CNNavigationController.m | |
| 1 | +// | |
| 2 | +// CNNavigationController.m | |
| 3 | +// CNLiveNetAdd | |
| 4 | +// | |
| 5 | +// Created by 张旭 on 2017/12/30. | |
| 6 | +// Copyright © 2017年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "CNNavigationController.h" | |
| 10 | +#import "CNLiveNavigationControllerDelegate.h" | |
| 11 | + | |
| 12 | +@interface CNNavigationController () | |
| 13 | +@property (strong, nonatomic) CNLiveNavigationControllerDelegate * navigationDelegate; | |
| 14 | +@end | |
| 15 | + | |
| 16 | +@implementation CNNavigationController | |
| 17 | + | |
| 18 | +- (void)viewDidLoad { | |
| 19 | + [super viewDidLoad]; | |
| 20 | + // Do any additional setup after loading the view. | |
| 21 | + _navigationDelegate = [CNLiveNavigationControllerDelegate new]; | |
| 22 | + self.delegate = _navigationDelegate; | |
| 23 | + | |
| 24 | + self.navigationBar.barTintColor = [UIColor blackColor]; | |
| 25 | + self.navigationBar.tintColor = [UIColor blackColor]; | |
| 26 | + [self.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName : [UIColor blackColor]}]; | |
| 27 | + self.navigationBar.translucent = NO; | |
| 28 | + | |
| 29 | +} | |
| 30 | + | |
| 31 | +- (void)didReceiveMemoryWarning { | |
| 32 | + [super didReceiveMemoryWarning]; | |
| 33 | + // Dispose of any resources that can be recreated. | |
| 34 | +} | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | +@end | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/NavigationViewController.h
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/NavigationViewController.h | |
| 1 | +// | |
| 2 | +// NavigationViewController.h | |
| 3 | +// | |
| 4 | +// | |
| 5 | +// Created by Alexi on 13-7-3. | |
| 6 | +// Copyright (c) 2013年 . All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | +#import <QMUIKit/QMUIKit.h> | |
| 11 | +#import "UINavigationController+Transition.h" | |
| 12 | +@interface NavigationViewController : QMUINavigationController//UINavigationController | |
| 13 | + | |
| 14 | + | |
| 15 | +@property (nonatomic, assign) BOOL asChild; | |
| 16 | + | |
| 17 | +@property (nonatomic, assign) CGSize childSize; | |
| 18 | + | |
| 19 | +//- (void)setNavigationBarAppearance; | |
| 20 | + | |
| 21 | +- (void)layoutSubviewsFrame; | |
| 22 | + | |
| 23 | +@end | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/NavigationViewController.m
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/NavigationViewController.m | |
| 1 | +// | |
| 2 | +// NavigationViewController.m | |
| 3 | +// | |
| 4 | +// Created by Alexi on 13-7-3. | |
| 5 | +// Copyright (c) 2013年 . All rights reserved. | |
| 6 | +// | |
| 7 | + | |
| 8 | +#import "NavigationViewController.h" | |
| 9 | +#import <CNLiveBaseKit/CNLiveBaseKit.h> | |
| 10 | +@interface NavigationViewController () | |
| 11 | + | |
| 12 | +// 用户自定义的返回事件监听 | |
| 13 | +// pop的时候执行,其他时候置空不处理 | |
| 14 | +// 暂时无法使用,需要调研 | |
| 15 | +@property (nonatomic, copy) CommonVoidBlock backAction; | |
| 16 | + | |
| 17 | +@end | |
| 18 | + | |
| 19 | +@implementation NavigationViewController | |
| 20 | + | |
| 21 | +- (instancetype)initWithRootViewController:(UIViewController *)rootViewController | |
| 22 | +{ | |
| 23 | + if (self = [super initWithRootViewController:rootViewController]) | |
| 24 | + { | |
| 25 | + self.edgesForExtendedLayout = UIRectEdgeNone; | |
| 26 | + self.extendedLayoutIncludesOpaqueBars = NO; | |
| 27 | + } | |
| 28 | + return self; | |
| 29 | +} | |
| 30 | + | |
| 31 | +- (void)setNavigationBarAppearance | |
| 32 | +{ | |
| 33 | + | |
| 34 | + [self.navigationBar setTitleTextAttributes:@{ | |
| 35 | + NSForegroundColorAttributeName:kNavBarThemeColor, | |
| 36 | + NSFontAttributeName:[UIFont boldSystemFontOfSize:16] | |
| 37 | + }]; | |
| 38 | +} | |
| 39 | + | |
| 40 | + | |
| 41 | +- (BOOL)shouldAutorotate | |
| 42 | +{ | |
| 43 | + BOOL rorate = [self.viewControllers.lastObject shouldAutorotate]; | |
| 44 | + return rorate; | |
| 45 | +} | |
| 46 | + | |
| 47 | + | |
| 48 | +- (UIInterfaceOrientationMask)supportedInterfaceOrientations | |
| 49 | +{ | |
| 50 | + return [self.viewControllers.lastObject supportedInterfaceOrientations]; | |
| 51 | +} | |
| 52 | + | |
| 53 | +- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation | |
| 54 | +{ | |
| 55 | + return [self.viewControllers.lastObject preferredInterfaceOrientationForPresentation]; | |
| 56 | +} | |
| 57 | + | |
| 58 | + | |
| 59 | +//ios5.0 横竖屏 | |
| 60 | +- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation | |
| 61 | +{ | |
| 62 | + return [self shouldAutorotate]; | |
| 63 | +} | |
| 64 | + | |
| 65 | +- (void)viewWillLayoutSubviews | |
| 66 | +{ | |
| 67 | + if (![self asChild]) | |
| 68 | + { | |
| 69 | + [super viewWillLayoutSubviews]; | |
| 70 | + } | |
| 71 | + else | |
| 72 | + { | |
| 73 | + if (CGSizeEqualToSize(self.childSize, CGSizeZero)) { | |
| 74 | + [super viewWillLayoutSubviews]; | |
| 75 | + } | |
| 76 | + else | |
| 77 | + { | |
| 78 | + CGSize size = self.childSize; | |
| 79 | + self.view.bounds = CGRectMake(0, 0, size.width, size.height); | |
| 80 | + } | |
| 81 | + } | |
| 82 | +} | |
| 83 | + | |
| 84 | +- (void)pushAnimation:(UIViewController *)viewController | |
| 85 | +{ | |
| 86 | + [self.view.layer addAnimation:[self pushAnimation] forKey:kCATransition]; | |
| 87 | +} | |
| 88 | + | |
| 89 | +- (void)popAnimation:(UIViewController *)viewController | |
| 90 | +{ | |
| 91 | + [self.view.layer addAnimation:[self popAnimation] forKey:kCATransition]; | |
| 92 | +} | |
| 93 | + | |
| 94 | +- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated | |
| 95 | +{ | |
| 96 | + [self pushViewController:viewController withBackTitle:nil action:nil animated:animated]; | |
| 97 | +} | |
| 98 | + | |
| 99 | + | |
| 100 | +- (void)pushViewController:(UIViewController *)viewController withBackTitle:(NSString *)backTitle animated:(BOOL)animated | |
| 101 | +{ | |
| 102 | + [self pushViewController:viewController withBackTitle:backTitle action:nil animated:animated]; | |
| 103 | +} | |
| 104 | + | |
| 105 | +- (void)pushViewController:(UIViewController *)viewController withBackTitle:(NSString *)backTitle action:(CommonVoidBlock)backAction animated:(BOOL)animated | |
| 106 | +{ | |
| 107 | + if(backAction){ | |
| 108 | + _backAction = backAction; | |
| 109 | + } | |
| 110 | + | |
| 111 | + if (backTitle.length != 0 ) | |
| 112 | + { | |
| 113 | + UIBarButtonItem *backItem = [[UIBarButtonItem alloc] init]; | |
| 114 | + backItem.title = backTitle; | |
| 115 | + self.topViewController.navigationItem.backBarButtonItem = backItem; | |
| 116 | + } | |
| 117 | + | |
| 118 | + if (animated) | |
| 119 | + { | |
| 120 | + [super pushViewController:viewController animated:YES]; | |
| 121 | + return; | |
| 122 | + } | |
| 123 | + | |
| 124 | + UIViewController *pushV = (UIViewController *) self.topViewController; | |
| 125 | + if ([pushV respondsToSelector:@selector(pushAnimation:)]) | |
| 126 | + { | |
| 127 | + [pushV performSelector:@selector(pushAnimation:) withObject:viewController]; | |
| 128 | + [super pushViewController:viewController animated:NO]; | |
| 129 | + } | |
| 130 | + else | |
| 131 | + { | |
| 132 | + [super pushViewController:viewController animated:NO]; | |
| 133 | + [self pushAnimation:pushV]; | |
| 134 | + } | |
| 135 | +} | |
| 136 | + | |
| 137 | +- (void)popAnimationOver | |
| 138 | +{ | |
| 139 | + [super popViewControllerAnimated:NO]; | |
| 140 | +} | |
| 141 | + | |
| 142 | +- (UIViewController *)popViewControllerAnimated:(BOOL)animated | |
| 143 | +{ | |
| 144 | + if (self.backAction) | |
| 145 | + { | |
| 146 | + self.backAction(); | |
| 147 | + } | |
| 148 | + | |
| 149 | + if (animated) | |
| 150 | + { | |
| 151 | + return [super popViewControllerAnimated:YES]; | |
| 152 | + } | |
| 153 | + | |
| 154 | + UIViewController *popV = (UIViewController *) self.topViewController; | |
| 155 | + if ([popV respondsToSelector:@selector(popAnimation:)]) | |
| 156 | + { | |
| 157 | + [popV performSelector:@selector(popAnimation:) withObject:popV]; | |
| 158 | + return [super popViewControllerAnimated:NO]; | |
| 159 | + } | |
| 160 | + else | |
| 161 | + { | |
| 162 | + [self popAnimation:popV]; | |
| 163 | + return [super popViewControllerAnimated:NO]; | |
| 164 | + } | |
| 165 | +} | |
| 166 | + | |
| 167 | +- (NSArray *)popToRootViewControllerAnimated:(BOOL)animated | |
| 168 | +{ | |
| 169 | + self.backAction = nil; | |
| 170 | + if (animated) | |
| 171 | + { | |
| 172 | + return [super popToRootViewControllerAnimated:animated]; | |
| 173 | + } | |
| 174 | + [self.view.layer addAnimation:[self popAnimation] forKey:kCATransition]; | |
| 175 | + return [super popToRootViewControllerAnimated:NO]; | |
| 176 | +} | |
| 177 | + | |
| 178 | +- (void)pushViewControllerFromBottom:(UIViewController *)viewController animated:(BOOL)animated | |
| 179 | +{ | |
| 180 | + [super pushViewController:viewController animated:NO]; | |
| 181 | + | |
| 182 | + CATransition* transition = [CATransition animation]; | |
| 183 | + transition.duration = 0.3; | |
| 184 | + transition.type = kCATransitionMoveIn; | |
| 185 | + transition.subtype = kCATransitionFromTop; | |
| 186 | + transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; | |
| 187 | + transition.autoreverses = NO; | |
| 188 | + | |
| 189 | + [self.view.layer addAnimation:transition forKey:kCATransition]; | |
| 190 | +} | |
| 191 | + | |
| 192 | +- (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated | |
| 193 | +{ | |
| 194 | + self.backAction = nil; | |
| 195 | + if (!animated) | |
| 196 | + { | |
| 197 | + return [super popToViewController:viewController animated:animated]; | |
| 198 | + } | |
| 199 | + | |
| 200 | + UIViewController *popV = (UIViewController *) self.topViewController; | |
| 201 | + if ([popV respondsToSelector:@selector(popAnimation:)]) | |
| 202 | + { | |
| 203 | + [popV performSelector:@selector(popAnimation:) withObject:popV]; | |
| 204 | + return [super popToViewController:viewController animated:NO]; | |
| 205 | + } | |
| 206 | + else | |
| 207 | + { | |
| 208 | + [self popAnimation:popV]; | |
| 209 | + return [super popToViewController:viewController animated:NO]; | |
| 210 | + } | |
| 211 | +} | |
| 212 | + | |
| 213 | +//- (void)layoutSubviewsFrame | |
| 214 | +//{ | |
| 215 | +// [super layoutSubviewsFrame]; | |
| 216 | +// [self.topViewController layoutSubviewsFrame]; | |
| 217 | +//} | |
| 218 | + | |
| 219 | +- (UIStatusBarStyle)preferredStatusBarStyle | |
| 220 | +{ | |
| 221 | + return [self.topViewController preferredStatusBarStyle]; | |
| 222 | +} | |
| 223 | + | |
| 224 | +@end | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/QMUINavigationController+CNFloatManager.h
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/QMUINavigationController+CNFloatManager.h | |
| 1 | +// | |
| 2 | +// QMUINavigationController+CNFloatManager.h | |
| 3 | +// testIM | |
| 4 | +// | |
| 5 | +// Created by 流诗语 on 2018/11/2. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "QMUINavigationController.h" | |
| 10 | + | |
| 11 | +NS_ASSUME_NONNULL_BEGIN | |
| 12 | + | |
| 13 | +@interface QMUINavigationController (CNFloatManager)<UINavigationControllerDelegate> | |
| 14 | + | |
| 15 | +@end | |
| 16 | + | |
| 17 | +NS_ASSUME_NONNULL_END | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/QMUINavigationController+CNFloatManager.m
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/QMUINavigationController+CNFloatManager.m | |
| 1 | +// | |
| 2 | +// QMUINavigationController+CNFloatManager.m | |
| 3 | +// testIM | |
| 4 | +// | |
| 5 | +// Created by 流诗语 on 2018/11/2. | |
| 6 | +// Copyright © 2018年 cnlive. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "QMUINavigationController+CNFloatManager.h" | |
| 10 | +#import <objc/runtime.h> | |
| 11 | +#import "HKFloatManager.h" | |
| 12 | +#import "HKTransitionPush.h" | |
| 13 | +#import "HKTransitionPop.h" | |
| 14 | +#import "CNLiveNavigationControllerDelegate.h" | |
| 15 | + | |
| 16 | +@implementation QMUINavigationController (CNFloatManager) | |
| 17 | + | |
| 18 | ++ (void)load { | |
| 19 | + static dispatch_once_t onceToken; | |
| 20 | + dispatch_once(&onceToken, ^{ | |
| 21 | + ReplaceMethod([self class], @selector(viewDidLoad), @selector(CNLive_viewDidLoad)); | |
| 22 | + }); | |
| 23 | +} | |
| 24 | + | |
| 25 | +-(void)CNLive_viewDidLoad | |
| 26 | +{ | |
| 27 | + [self CNLive_viewDidLoad]; | |
| 28 | + self.interactivePopGestureRecognizer.delegate = (id<UIGestureRecognizerDelegate>)self; | |
| 29 | + [self.interactivePopGestureRecognizer addTarget:self action:@selector(handleInteractivePopGestureRecognizer:)]; | |
| 30 | +} | |
| 31 | +- (void)handleInteractivePopGestureRecognizer:(UIScreenEdgePanGestureRecognizer *)gestureRecognizer { | |
| 32 | + UIGestureRecognizerState state = gestureRecognizer.state; | |
| 33 | + if (state == UIGestureRecognizerStateBegan) { | |
| 34 | + | |
| 35 | + } else if (state == UIGestureRecognizerStateEnded) { | |
| 36 | + if (CGRectGetMinX(self.topViewController.view.superview.frame) < 0) { | |
| 37 | + [HKFloatManager shared].floatBall.alpha = 0; | |
| 38 | + | |
| 39 | + } else { | |
| 40 | + [HKFloatManager shared].floatBall.alpha = 1; | |
| 41 | + | |
| 42 | + } | |
| 43 | + }else{ | |
| 44 | + CGPoint point = [gestureRecognizer locationInView:self.view]; | |
| 45 | + [HKFloatManager shared].floatBall.alpha = point.x/(150); | |
| 46 | + } | |
| 47 | +} | |
| 48 | + | |
| 49 | +- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { | |
| 50 | + | |
| 51 | + [[HKFloatManager shared] beginScreenEdgePanBack:gestureRecognizer]; | |
| 52 | + return YES; | |
| 53 | +} | |
| 54 | + | |
| 55 | +CG_INLINE BOOL | |
| 56 | +ReplaceMethod(Class _class, SEL _originSelector, SEL _newSelector) { | |
| 57 | + Method oriMethod = class_getInstanceMethod(_class, _originSelector); | |
| 58 | + Method newMethod = class_getInstanceMethod(_class, _newSelector); | |
| 59 | + if (!newMethod) { | |
| 60 | + // class 里不存在该方法的实现 | |
| 61 | + return NO; | |
| 62 | + } | |
| 63 | + BOOL isAddedMethod = class_addMethod(_class, _originSelector, method_getImplementation(newMethod), method_getTypeEncoding(newMethod)); | |
| 64 | + if (isAddedMethod) { | |
| 65 | + class_replaceMethod(_class, _newSelector, method_getImplementation(oriMethod), method_getTypeEncoding(oriMethod)); | |
| 66 | + } else { | |
| 67 | + method_exchangeImplementations(oriMethod, newMethod); | |
| 68 | + } | |
| 69 | + return YES; | |
| 70 | +} | |
| 71 | +@end | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/UINavigationController+Transition.h
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/UINavigationController+Transition.h | |
| 1 | +// | |
| 2 | +// UINavigationController+Transition.h | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 3/18/14. | |
| 6 | +// Copyright (c) 2014 Alexi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | +#import <CNLiveCommonCategory/CNLiveCommonCategory.h> | |
| 11 | + | |
| 12 | +@interface UINavigationController (Transition) | |
| 13 | + | |
| 14 | +- (CATransition *)pushAnimation; | |
| 15 | +- (CATransition *)popAnimation; | |
| 16 | + | |
| 17 | +- (void)pushViewController:(UIViewController *)viewController withAnimation:(void (^)(void))animation duration:(CGFloat)duration; | |
| 18 | + | |
| 19 | +- (void)pushViewController:(UIViewController *)viewController withTransition:(CATransition *)transition; | |
| 20 | +- (void)popViewController:(UIViewController *)viewController withTransition:(CATransition *)transition; | |
| 21 | + | |
| 22 | +- (void)pushViewController:(UIViewController *)viewController withBackTitle:(NSString *)backTitle animated:(BOOL)animated; | |
| 23 | +- (void)pushViewController:(UIViewController *)viewController withBackTitle:(NSString *)backTitle action:(CommonVoidBlock)backAction animated:(BOOL)animated; | |
| 24 | + | |
| 25 | +- (UIViewController *)popViewControllerTransition:(CATransition *)transition; | |
| 26 | + | |
| 27 | +- (NSArray *)popToRootViewControllerTransition:(CATransition *)transition; | |
| 28 | + | |
| 29 | +- (NSArray *)popToViewController:(UIViewController *)viewController withTransition:(CATransition *)transition; | |
| 30 | + | |
| 31 | +@end | ... | ... |
CNLiveNavigationClass/Classes/CNNavigationController/UINavigationController+Transition.m
0 → 100644
| 1 | +++ a/CNLiveNavigationClass/Classes/CNNavigationController/UINavigationController+Transition.m | |
| 1 | +// | |
| 2 | +// UINavigationController+Transition.m | |
| 3 | +// CommonLibrary | |
| 4 | +// | |
| 5 | +// Created by Alexi on 3/18/14. | |
| 6 | +// Copyright (c) 2014 Alexi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "UINavigationController+Transition.h" | |
| 10 | + | |
| 11 | + | |
| 12 | +@implementation UINavigationController (Transition) | |
| 13 | + | |
| 14 | +- (CATransition *)pushAnimation | |
| 15 | +{ | |
| 16 | + CATransition* transition = [CATransition animation]; | |
| 17 | + transition.duration = 0.3; | |
| 18 | + transition.type = kCATransitionFade; | |
| 19 | + transition.subtype = kCATransitionFromBottom; | |
| 20 | + transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
| 21 | + transition.autoreverses = NO; | |
| 22 | + return transition; | |
| 23 | +} | |
| 24 | + | |
| 25 | +- (CATransition *)popAnimation | |
| 26 | +{ | |
| 27 | + CATransition* transition = [CATransition animation]; | |
| 28 | + transition.duration = 0.3; | |
| 29 | + transition.type = kCATransitionFade; | |
| 30 | + transition.subtype = kCATransitionFromTop; | |
| 31 | + transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
| 32 | + transition.autoreverses = NO; | |
| 33 | + return transition; | |
| 34 | +} | |
| 35 | + | |
| 36 | +- (void)pushViewController:(UIViewController *)viewController withAnimation:(void (^)(void))animation duration:(CGFloat)duration | |
| 37 | +{ | |
| 38 | + if (animation) | |
| 39 | + { | |
| 40 | + [self pushViewController:viewController animated:NO]; | |
| 41 | + [UIView animateWithDuration:duration animations:^{ | |
| 42 | + animation(); | |
| 43 | + }]; | |
| 44 | +// [self.view.layer addAnimation:transition forKey:kCATransition]; | |
| 45 | + } | |
| 46 | + else | |
| 47 | + { | |
| 48 | + [self pushViewController:viewController animated:YES]; | |
| 49 | + } | |
| 50 | +} | |
| 51 | + | |
| 52 | +- (void)pushViewController:(UIViewController *)viewController withTransition:(CATransition *)transition | |
| 53 | +{ | |
| 54 | + if (transition) | |
| 55 | + { viewController.hidesBottomBarWhenPushed = YES; | |
| 56 | + [self pushViewController:viewController animated:NO]; | |
| 57 | + [self.view.layer addAnimation:transition forKey:kCATransition]; | |
| 58 | + } | |
| 59 | + else | |
| 60 | + { | |
| 61 | + viewController.hidesBottomBarWhenPushed = YES; | |
| 62 | + [self pushViewController:viewController animated:YES]; | |
| 63 | + } | |
| 64 | +} | |
| 65 | + | |
| 66 | +- (void)popViewController:(UIViewController *)viewController withTransition:(CATransition *)transition | |
| 67 | +{ | |
| 68 | + if (transition) | |
| 69 | + { | |
| 70 | + [self popToViewController:viewController animated:NO]; | |
| 71 | + [self.view.layer addAnimation:transition forKey:kCATransition]; | |
| 72 | + } | |
| 73 | + else | |
| 74 | + { | |
| 75 | + [self popToViewController:viewController animated:YES]; | |
| 76 | + } | |
| 77 | +} | |
| 78 | + | |
| 79 | +- (void)pushViewController:(UIViewController *)viewController withBackTitle:(NSString *)backTitle animated:(BOOL)animated | |
| 80 | +{ | |
| 81 | + [self pushViewController:viewController animated:animated]; | |
| 82 | +} | |
| 83 | + | |
| 84 | +- (void)pushViewController:(UIViewController *)viewController withBackTitle:(NSString *)backTitle action:(CommonVoidBlock)backAction animated:(BOOL)animated | |
| 85 | +{ | |
| 86 | + [self pushViewController:viewController animated:animated]; | |
| 87 | +} | |
| 88 | + | |
| 89 | +- (UIViewController *)popViewControllerTransition:(CATransition *)transition | |
| 90 | +{ | |
| 91 | + if (transition) | |
| 92 | + { | |
| 93 | + [self.view.layer addAnimation:transition forKey:kCATransition]; | |
| 94 | + return [self popViewControllerAnimated:NO]; | |
| 95 | + } | |
| 96 | + else | |
| 97 | + { | |
| 98 | + return [self popViewControllerAnimated:YES]; | |
| 99 | + } | |
| 100 | +} | |
| 101 | + | |
| 102 | +- (NSArray *)popToRootViewControllerTransition:(CATransition *)transition | |
| 103 | +{ | |
| 104 | + if (transition) | |
| 105 | + { | |
| 106 | + [self.view.layer addAnimation:transition forKey:kCATransition]; | |
| 107 | + return [self popToRootViewControllerAnimated:NO]; | |
| 108 | + } | |
| 109 | + else | |
| 110 | + { | |
| 111 | + return [self popToRootViewControllerAnimated:YES]; | |
| 112 | + } | |
| 113 | +} | |
| 114 | + | |
| 115 | +- (NSArray *)popToViewController:(UIViewController *)viewController withTransition:(CATransition *)transition | |
| 116 | +{ | |
| 117 | + if (transition) | |
| 118 | + { | |
| 119 | + [self.view.layer addAnimation:transition forKey:kCATransition]; | |
| 120 | + return [self popToViewController:viewController animated:NO]; | |
| 121 | + } | |
| 122 | + else | |
| 123 | + { | |
| 124 | + return [self popToViewController:viewController animated:NO]; | |
| 125 | + } | |
| 126 | +} | |
| 127 | + | |
| 128 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKFloatAreaView.h
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKFloatAreaView.h | |
| 1 | +// | |
| 2 | +// HKFloatAreaView.h | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/4. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +typedef enum : NSUInteger { | |
| 12 | + HKFloatAreaViewStyle_default, | |
| 13 | + HKFloatAreaViewStyle_cancel, | |
| 14 | +}HKFloatAreaViewStyle; | |
| 15 | + | |
| 16 | + | |
| 17 | +@interface HKFloatAreaView : UIView | |
| 18 | +@property (nonatomic, assign) BOOL highlight; | |
| 19 | +@property (nonatomic, assign) HKFloatAreaViewStyle style; | |
| 20 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKFloatAreaView.m
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKFloatAreaView.m | |
| 1 | +// | |
| 2 | +// HKFloatAreaView.m | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/4. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "HKFloatAreaView.h" | |
| 10 | +@interface HKFloatAreaView() | |
| 11 | +@property (nonatomic, copy) NSString *title; | |
| 12 | +@property (nonatomic, assign) CGFloat radius_0; | |
| 13 | +@property (nonatomic, assign) CGFloat radius_1; | |
| 14 | +@property (nonatomic, assign) CGFloat kCoef; | |
| 15 | + | |
| 16 | +@end | |
| 17 | +@implementation HKFloatAreaView | |
| 18 | + | |
| 19 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 20 | +{ | |
| 21 | + self = [super initWithFrame:frame]; | |
| 22 | + if (self) { | |
| 23 | + self.backgroundColor = [UIColor colorWithRed:0.3 green:0.3 blue:0.3 alpha:0.8]; | |
| 24 | + self.title = @"拖动到此 开启浮窗"; | |
| 25 | + self.radius_0 = 18; | |
| 26 | + self.radius_1 = 10; | |
| 27 | + self.kCoef = 0.95; | |
| 28 | + } | |
| 29 | + return self; | |
| 30 | +} | |
| 31 | +-(void)drawRect:(CGRect)rect{ | |
| 32 | + [super drawRect:rect]; | |
| 33 | + | |
| 34 | + self.radius_0 = self.highlight ?20:18; | |
| 35 | + self.radius_1 = self.highlight ?12:10; | |
| 36 | + self.kCoef = self.highlight ?1:0.95; | |
| 37 | + | |
| 38 | + | |
| 39 | + UIBezierPath *maskPath = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.bounds.size.width, self.bounds.size.width) radius:self.bounds.size.width*self.kCoef startAngle:M_PI endAngle:M_PI *1.5 clockwise:1]; | |
| 40 | + [maskPath addLineToPoint:CGPointMake(self.bounds.size.width, self.bounds.size.width)]; | |
| 41 | + CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; | |
| 42 | + maskLayer.frame = self.bounds; | |
| 43 | + maskLayer.path = maskPath.CGPath; | |
| 44 | + self.layer.mask = maskLayer; | |
| 45 | + | |
| 46 | + NSMutableParagraphStyle *textStyle = [[NSMutableParagraphStyle alloc] init]; | |
| 47 | + textStyle.alignment = NSTextAlignmentCenter; | |
| 48 | + | |
| 49 | + NSDictionary * attributes = @{NSFontAttributeName:[UIFont systemFontOfSize:14],NSForegroundColorAttributeName:[UIColor whiteColor],NSParagraphStyleAttributeName:textStyle}; | |
| 50 | + [_title drawInRect:CGRectMake(0, self.bounds.size.height * 3/4, self.bounds.size.width, 20) withAttributes:attributes]; | |
| 51 | + | |
| 52 | + UIBezierPath *ring0 = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.bounds.size.width/2, self.bounds.size.height /2) radius:_radius_0 startAngle:0 endAngle:2*M_PI clockwise:YES]; | |
| 53 | + ring0.lineWidth = 3; | |
| 54 | + [ring0 stroke]; | |
| 55 | + | |
| 56 | + UIBezierPath *ring1 = [UIBezierPath bezierPathWithArcCenter:CGPointMake(self.bounds.size.width/2, self.bounds.size.height /2) radius:_radius_1 startAngle:0 endAngle:2*M_PI clockwise:YES]; | |
| 57 | + ring1.lineWidth = 3; | |
| 58 | + [ring1 stroke]; | |
| 59 | +} | |
| 60 | +-(void)setHighlight:(BOOL)highlight{ | |
| 61 | + _highlight = highlight; | |
| 62 | + [self setNeedsDisplay]; | |
| 63 | + if (highlight) { | |
| 64 | + UIImpactFeedbackGenerator*impactLight = [[UIImpactFeedbackGenerator alloc]initWithStyle:UIImpactFeedbackStyleMedium]; | |
| 65 | + [impactLight impactOccurred]; | |
| 66 | + } | |
| 67 | +} | |
| 68 | +-(void)setStyle:(HKFloatAreaViewStyle)style{ | |
| 69 | + _style = style; | |
| 70 | + if (style == HKFloatAreaViewStyle_default) { | |
| 71 | + self.backgroundColor = [UIColor colorWithRed:0.3 green:0.3 blue:0.3 alpha:0.8]; | |
| 72 | + self.title = self.highlight ? @"释放开启浮窗":@"拖动到此 开启浮窗"; | |
| 73 | + }else if (style == HKFloatAreaViewStyle_cancel){ | |
| 74 | + self.backgroundColor = [UIColor colorWithRed:1 green:0 blue:0 alpha:0.8]; | |
| 75 | + self.title = self.highlight ? @"释放关闭浮窗":@"拖动到此 关闭浮窗"; | |
| 76 | + } | |
| 77 | +} | |
| 78 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKFloatBall.h
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKFloatBall.h | |
| 1 | +// | |
| 2 | +// HKFloatBall.h | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/4. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | + | |
| 11 | +@class HKFloatBall; | |
| 12 | +@protocol HKFloatBallDelegate <NSObject> | |
| 13 | + | |
| 14 | +@optional | |
| 15 | +- (void)floatBallDidClick:(HKFloatBall *)floatBall; | |
| 16 | +- (void)floatBallBeginMove:(HKFloatBall *)floatBall; | |
| 17 | +- (void)floatBallEndMove:(HKFloatBall *)floatBall; | |
| 18 | +@end | |
| 19 | + | |
| 20 | +@interface HKFloatBall : UIView | |
| 21 | +@property (nonatomic, weak) id<HKFloatBallDelegate>delegate; | |
| 22 | +@property (nonatomic, strong) UIImageView *iconImageView; | |
| 23 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKFloatBall.m
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKFloatBall.m | |
| 1 | +// | |
| 2 | +// HKFloatBall.m | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/4. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "HKFloatBall.h" | |
| 10 | +#import <CNLiveBaseKit/CNLiveDefinesHeader.h> | |
| 11 | +#define margin 10 | |
| 12 | +@interface HKFloatBall() | |
| 13 | + | |
| 14 | + | |
| 15 | +@end | |
| 16 | +@implementation HKFloatBall | |
| 17 | + | |
| 18 | +- (instancetype)initWithFrame:(CGRect)frame | |
| 19 | +{ | |
| 20 | + self = [super initWithFrame:frame]; | |
| 21 | + if (self) { | |
| 22 | + [self addSubview:self.iconImageView]; | |
| 23 | + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tap:)]; | |
| 24 | + [self addGestureRecognizer:tap]; | |
| 25 | + } | |
| 26 | + return self; | |
| 27 | +} | |
| 28 | + | |
| 29 | +-(UIImageView *)iconImageView{ | |
| 30 | + if (!_iconImageView) { | |
| 31 | + _iconImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height)]; | |
| 32 | + _iconImageView.backgroundColor = [UIColor yellowColor]; | |
| 33 | +// _iconImageView.image = [UIImageMake([[[[NSBundle mainBundle] infoDictionary] valueForKeyPath:@"CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles"] lastObject]) imageByResizeToSize:CGSizeMake(self.frame.size.width, self.frame.size.height)]; | |
| 34 | +// _iconImageView.image = [UIImage imageNamed:@"icon"]; | |
| 35 | + _iconImageView.layer.borderWidth = 0; | |
| 36 | + _iconImageView.layer.borderColor = [UIColor grayColor].CGColor; | |
| 37 | + _iconImageView.layer.cornerRadius = self.bounds.size.width/2; | |
| 38 | + _iconImageView.layer.masksToBounds = YES; | |
| 39 | + }; | |
| 40 | + return _iconImageView; | |
| 41 | +} | |
| 42 | + | |
| 43 | +- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ | |
| 44 | + self.center = [touches.anyObject locationInView:[UIApplication sharedApplication].keyWindow]; | |
| 45 | + if ([self.delegate respondsToSelector:@selector(floatBallBeginMove:)]) { | |
| 46 | + [self.delegate floatBallBeginMove:self]; | |
| 47 | + } | |
| 48 | +} | |
| 49 | + | |
| 50 | +-(void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ | |
| 51 | + [self endTouch:[touches.anyObject locationInView:[UIApplication sharedApplication].keyWindow]]; | |
| 52 | + if ([self.delegate respondsToSelector:@selector(floatBallEndMove:)]) { | |
| 53 | + [self.delegate floatBallEndMove:self]; | |
| 54 | + } | |
| 55 | +} | |
| 56 | + | |
| 57 | +-(void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{ | |
| 58 | + [self endTouch:[touches.anyObject locationInView:[UIApplication sharedApplication].keyWindow]]; | |
| 59 | + if ([self.delegate respondsToSelector:@selector(floatBallEndMove:)]) { | |
| 60 | + [self.delegate floatBallEndMove:self]; | |
| 61 | + } | |
| 62 | +} | |
| 63 | + | |
| 64 | +- (void)endTouch:(CGPoint)point{ | |
| 65 | + CGRect frame = self.frame; | |
| 66 | + if (point.x > KScreenWidth / 2) { | |
| 67 | + frame.origin.x = KScreenWidth - frame.size.width -margin; | |
| 68 | + }else{ | |
| 69 | + frame.origin.x = margin; | |
| 70 | + } | |
| 71 | + if (frame.origin.y > KScreenHeight - 64) { | |
| 72 | + frame.origin.y = KScreenHeight -64; | |
| 73 | + }else if (frame.origin.y < 20) { | |
| 74 | + frame.origin.y = 20; | |
| 75 | + } | |
| 76 | + | |
| 77 | + [UIView animateWithDuration:0.3 animations:^{ | |
| 78 | + self.frame = frame; | |
| 79 | + }]; | |
| 80 | +} | |
| 81 | +- (void)tap:(UIGestureRecognizer *)tap{ | |
| 82 | + if ([self.delegate respondsToSelector:@selector(floatBallDidClick:)]) { | |
| 83 | + [self.delegate floatBallDidClick:self]; | |
| 84 | + } | |
| 85 | +} | |
| 86 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKFloatManager.h
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKFloatManager.h | |
| 1 | +// | |
| 2 | +// HKFloatManager.h | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/6. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <UIKit/UIKit.h> | |
| 10 | +#import <Foundation/Foundation.h> | |
| 11 | +#import "HKFloatBall.h" | |
| 12 | +#import "HKFloatAreaView.h" | |
| 13 | +@interface HKFloatManager : NSObject | |
| 14 | +@property (nonatomic, strong) HKFloatBall *floatBall; | |
| 15 | +@property (nonatomic, strong) HKFloatAreaView *floatArea; | |
| 16 | +@property (nonatomic, strong) UIViewController *floatViewController; | |
| 17 | + | |
| 18 | +@property (nonatomic, assign) BOOL showFloatBall; | |
| 19 | + | |
| 20 | +@property (assign, nonatomic) BOOL isShow; | |
| 21 | + | |
| 22 | ++ (instancetype)shared; | |
| 23 | ++ (void)addFloatVcs:(NSArray<NSString *>*)vcClass;//注意.在导航控制器实例化之后调用 | |
| 24 | +- (void)beginScreenEdgePanBack:(UIGestureRecognizer *)gestureRecognizer; | |
| 25 | +@end | |
| 26 | + | |
| 27 | +/*注:1 ****** 没有出现动画 ****** | |
| 28 | + 如遇到 navigationController.delegate 在别的地方被调用 | |
| 29 | + | |
| 30 | + 可在代理方法 | |
| 31 | + - (nullable id <UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController | |
| 32 | + animationControllerForOperation:(UINavigationControllerOperation)operation | |
| 33 | + fromViewController:(UIViewController *)fromVC | |
| 34 | + toViewController:(UIViewController *)toVC NS_AVAILABLE_IOS(7_0); | |
| 35 | + | |
| 36 | + 最前方插入下方代码 | |
| 37 | + | |
| 38 | +UIViewController *vc = self.floatViewController; | |
| 39 | +if (vc) { | |
| 40 | + if(operation==UINavigationControllerOperationPush){ | |
| 41 | + if (toVC != vc) { | |
| 42 | + return nil; | |
| 43 | + } | |
| 44 | + HKTransitionPush *transition = [[HKTransitionPush alloc]init]; | |
| 45 | + return transition; | |
| 46 | + }else if(operation==UINavigationControllerOperationPop){ | |
| 47 | + if (fromVC != vc) { | |
| 48 | + return nil; | |
| 49 | + } | |
| 50 | + HKTransitionPop *transition = [[HKTransitionPop alloc]init]; | |
| 51 | + return transition; | |
| 52 | + }else{ | |
| 53 | + return nil; | |
| 54 | + } | |
| 55 | +} | |
| 56 | + **/ | |
| 57 | + | |
| 58 | +/*注:2 ****** 不出现右下视图 ****** | |
| 59 | + 如其它牛逼第三方设置了 interactivePopGestureRecognizer | |
| 60 | + | |
| 61 | + 可以在interactivePopGestureRecognizer代理中调用该方法 并删除HKFloatManager.m 中的第45行 | |
| 62 | + | |
| 63 | + [[HKFloatManager shared] beginScreenEdgePanBack:gestureRecognizer]; | |
| 64 | + | |
| 65 | + 如FDFullscreenPopGesture | |
| 66 | + 可以在 UINavigationController+FDFullscreenPopGesture.m 的 | |
| 67 | + - (BOOL)gestureRecognizerShouldBegin:(UIPanGestureRecognizer *)gestureRecognizer 返回 YES 前 | |
| 68 | + 调用 [[HKFloatManager shared] beginScreenEdgePanBack:gestureRecognizer]; | |
| 69 | + 并删除本项目 HKFloatManager.m 第45行 | |
| 70 | + **/ | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKFloatManager.m
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKFloatManager.m | |
| 1 | +// | |
| 2 | +// HKFloatManager.m | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/6. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "HKFloatManager.h" | |
| 10 | +#import "HKTransitionPush.h" | |
| 11 | +#import "HKTransitionPop.h" | |
| 12 | +#import "NSObject+hkvc.h" | |
| 13 | +#import <objc/runtime.h> | |
| 14 | +#import <CNLiveBaseKit/CNLiveDefinesHeader.h> | |
| 15 | +#import <Foundation/Foundation.h> | |
| 16 | +#define kWindow [UIApplication sharedApplication].keyWindow | |
| 17 | +#define kFloatAreaR KScreenWidth * 0.45 | |
| 18 | +#define kFloatMargin 30 | |
| 19 | +#define kCoef 1.2 | |
| 20 | +#define kBallSizeR 60 | |
| 21 | + | |
| 22 | +@interface HKFloatManager()<HKFloatBallDelegate,UINavigationControllerDelegate,UIGestureRecognizerDelegate> | |
| 23 | + | |
| 24 | +@property (nonatomic, strong) HKFloatAreaView *cancelFloatArea; | |
| 25 | +@property (nonatomic, strong) UIViewController *tempFloatViewController; | |
| 26 | + | |
| 27 | +@property (nonatomic, strong) UIScreenEdgePanGestureRecognizer *edgePan; | |
| 28 | +@property (nonatomic, strong) CADisplayLink *link; | |
| 29 | +@property (nonatomic, strong) NSMutableArray<NSString *> *floatVcClass; | |
| 30 | + | |
| 31 | +@end | |
| 32 | +@implementation HKFloatManager | |
| 33 | + | |
| 34 | ++ (instancetype)shared{ | |
| 35 | + static HKFloatManager * floatManager = nil; | |
| 36 | + static dispatch_once_t onceToken; | |
| 37 | + dispatch_once(&onceToken, ^{ | |
| 38 | + floatManager = [[super allocWithZone:nil] init]; | |
| 39 | + floatManager.floatVcClass = [NSMutableArray array]; | |
| 40 | + [floatManager hk_currentNavigationController].interactivePopGestureRecognizer.delegate = floatManager; | |
| 41 | +// [floatManager hk_currentNavigationController].delegate = floatManager; | |
| 42 | + }); | |
| 43 | + return floatManager; | |
| 44 | +} | |
| 45 | ++ (void)addFloatVcs:(NSArray<NSString *>*)vcClass{ | |
| 46 | + [vcClass enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { | |
| 47 | + if (![[HKFloatManager shared].floatVcClass containsObject:obj]) { | |
| 48 | + [[HKFloatManager shared].floatVcClass addObject:obj]; | |
| 49 | + } | |
| 50 | + }]; | |
| 51 | +} | |
| 52 | +- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer{ | |
| 53 | + if ([self hk_currentNavigationController].viewControllers.count > 1) { | |
| 54 | + [[HKFloatManager shared] beginScreenEdgePanBack:gestureRecognizer]; | |
| 55 | + return YES; | |
| 56 | + } | |
| 57 | + return NO; | |
| 58 | +} | |
| 59 | +#pragma mark - Action | |
| 60 | + | |
| 61 | +- (void)beginScreenEdgePanBack:(UIGestureRecognizer *)gestureRecognizer{ | |
| 62 | + | |
| 63 | + if ([self.floatVcClass containsObject:NSStringFromClass([[self hk_currentViewController] class])]){ | |
| 64 | + self.edgePan = (UIScreenEdgePanGestureRecognizer *)gestureRecognizer; | |
| 65 | + [self.link addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; | |
| 66 | + [kWindow addSubview:self.floatArea]; | |
| 67 | + self.tempFloatViewController = [self hk_currentViewController]; | |
| 68 | + } | |
| 69 | +} | |
| 70 | +- (void)panBack:(CADisplayLink *)link { | |
| 71 | + if (self.isShow) return; | |
| 72 | + if (self.edgePan.state == UIGestureRecognizerStateChanged) { | |
| 73 | + CGPoint tPoint = [self.edgePan translationInView:kWindow]; | |
| 74 | + CGFloat x = MAX(KScreenWidth + kFloatMargin - kCoef * tPoint.x,KScreenWidth - kFloatAreaR); | |
| 75 | + CGFloat y = MAX(KScreenHeight + kFloatMargin - kCoef * tPoint.x,KScreenHeight - kFloatAreaR); | |
| 76 | + CGRect rect = CGRectMake(x, y, kFloatAreaR, kFloatAreaR); | |
| 77 | + self.floatArea.frame = rect; | |
| 78 | + | |
| 79 | + CGPoint touchPoint = [kWindow convertPoint:[self.edgePan locationInView:kWindow] toView:self.floatArea]; | |
| 80 | + | |
| 81 | + if (touchPoint.x > 0 && touchPoint.y > 0) { | |
| 82 | + if (!self.showFloatBall) { | |
| 83 | + if (pow((kFloatAreaR - touchPoint.x), 2) + pow((kFloatAreaR - touchPoint.y), 2) <= pow((kFloatAreaR), 2)) { | |
| 84 | + self.showFloatBall = YES; | |
| 85 | + }else{ | |
| 86 | + if (self.showFloatBall) { | |
| 87 | + self.showFloatBall = NO; | |
| 88 | + } | |
| 89 | + } | |
| 90 | + } | |
| 91 | + }else{ | |
| 92 | + if (self.showFloatBall) { | |
| 93 | + self.showFloatBall = NO; | |
| 94 | + } | |
| 95 | + } | |
| 96 | + }else if (self.edgePan.state == UIGestureRecognizerStatePossible) { | |
| 97 | + [UIView animateWithDuration:0.5 animations:^{ | |
| 98 | + self.floatArea.frame = CGRectMake(KScreenWidth,KScreenHeight, kFloatAreaR, kFloatAreaR); | |
| 99 | + } completion:^(BOOL finished) { | |
| 100 | + [self.floatArea removeFromSuperview]; | |
| 101 | + self.floatArea = nil; | |
| 102 | + [self.link invalidate]; | |
| 103 | + self.link = nil; | |
| 104 | + if (self.showFloatBall) { | |
| 105 | + self.floatViewController = self.tempFloatViewController; | |
| 106 | + if ([self haveIconImage]) { | |
| 107 | + self.floatBall.iconImageView.image= [self.floatViewController valueForKey:@"hk_iconImage"]; | |
| 108 | + } | |
| 109 | + self.floatBall.alpha = 1; | |
| 110 | + [kWindow addSubview:self.floatBall]; | |
| 111 | + self.isShow = YES; | |
| 112 | + } | |
| 113 | + }]; | |
| 114 | + } | |
| 115 | +} | |
| 116 | + | |
| 117 | +#pragma mark - HKFloatBallDelegate | |
| 118 | +- (void)floatBallDidClick:(HKFloatBall *)floatBall{ | |
| 119 | + [[self hk_currentNavigationController] pushViewController:self.floatViewController animated:YES]; | |
| 120 | +} | |
| 121 | +- (void)floatBallBeginMove:(HKFloatBall *)floatBall{ | |
| 122 | + if (!_cancelFloatArea) { | |
| 123 | + [kWindow insertSubview:self.cancelFloatArea atIndex:1]; | |
| 124 | + [UIView animateWithDuration:0.5 animations:^{ | |
| 125 | + self.cancelFloatArea.frame = CGRectMake(KScreenWidth - kFloatAreaR,KScreenHeight - kFloatAreaR, kFloatAreaR, kFloatAreaR); | |
| 126 | + }]; | |
| 127 | + } | |
| 128 | + CGPoint center_ball = [kWindow convertPoint:self.floatBall.center toView:self.cancelFloatArea]; | |
| 129 | + if (pow((kFloatAreaR - center_ball.x), 2) + pow((kFloatAreaR - center_ball.y), 2) <= pow((kFloatAreaR), 2)) { | |
| 130 | + if (!self.cancelFloatArea.highlight) { | |
| 131 | + self.cancelFloatArea.highlight = YES; | |
| 132 | + } | |
| 133 | + }else{ | |
| 134 | + if (self.cancelFloatArea.highlight) { | |
| 135 | + self.cancelFloatArea.highlight = NO; | |
| 136 | + } | |
| 137 | + } | |
| 138 | +} | |
| 139 | +-(void)floatBallEndMove:(HKFloatBall *)floatBall{ | |
| 140 | + | |
| 141 | + if (self.cancelFloatArea.highlight) { | |
| 142 | + self.tempFloatViewController = nil; | |
| 143 | + self.floatViewController = nil; | |
| 144 | + [self.floatBall removeFromSuperview]; | |
| 145 | + self.floatBall = nil; | |
| 146 | + self.isShow = NO; | |
| 147 | + if (self.showFloatBall) { | |
| 148 | + self.showFloatBall = NO; | |
| 149 | + } | |
| 150 | + } | |
| 151 | + | |
| 152 | + [UIView animateWithDuration:0.5 animations:^{ | |
| 153 | + self.cancelFloatArea.frame = CGRectMake(KScreenWidth,KScreenHeight, kFloatAreaR, kFloatAreaR); | |
| 154 | + } completion:^(BOOL finished) { | |
| 155 | + [self.cancelFloatArea removeFromSuperview]; | |
| 156 | + self.cancelFloatArea = nil; | |
| 157 | + }]; | |
| 158 | +} | |
| 159 | + | |
| 160 | +#pragma UINavigationControllerDelegate | |
| 161 | +- (nullable id <UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController | |
| 162 | + animationControllerForOperation:(UINavigationControllerOperation)operation | |
| 163 | + fromViewController:(UIViewController *)fromVC | |
| 164 | + toViewController:(UIViewController *)toVC{ | |
| 165 | + | |
| 166 | + UIViewController *vc = self.floatViewController; | |
| 167 | + if (vc) { | |
| 168 | + if(operation==UINavigationControllerOperationPush){ | |
| 169 | + if (toVC != vc) { | |
| 170 | + return nil; | |
| 171 | + } | |
| 172 | + HKTransitionPush *transition = [[HKTransitionPush alloc]init]; | |
| 173 | + return transition; | |
| 174 | + }else if(operation==UINavigationControllerOperationPop){ | |
| 175 | + if (fromVC != vc) { | |
| 176 | + return nil; | |
| 177 | + } | |
| 178 | + HKTransitionPop *transition = [[HKTransitionPop alloc]init]; | |
| 179 | + return transition; | |
| 180 | + }else{ | |
| 181 | + return nil; | |
| 182 | + } | |
| 183 | + }else{ | |
| 184 | + return nil; | |
| 185 | + } | |
| 186 | +} | |
| 187 | +- (BOOL)haveIconImage{ | |
| 188 | + BOOL have = NO; | |
| 189 | + unsigned int outCount = 0; | |
| 190 | + Ivar *ivars = class_copyIvarList([self.floatViewController class], &outCount); | |
| 191 | + for (unsigned int i = 0; i < outCount; i ++) { | |
| 192 | + Ivar ivar = ivars[i]; | |
| 193 | + const char * nameChar = ivar_getName(ivar); | |
| 194 | + NSString *nameStr =[NSString stringWithFormat:@"%s",nameChar]; | |
| 195 | + if([nameStr isEqualToString:@"_hk_iconImage"]) { | |
| 196 | + have = YES; | |
| 197 | + } | |
| 198 | + } | |
| 199 | + free(ivars); | |
| 200 | + return have; | |
| 201 | +} | |
| 202 | +#pragma mark - Setter | |
| 203 | + | |
| 204 | +- (void)setShowFloatBall:(BOOL)showFloatBall{ | |
| 205 | + _showFloatBall = showFloatBall; | |
| 206 | + self.floatArea.highlight = showFloatBall; | |
| 207 | +} | |
| 208 | +#pragma mark - Lazy | |
| 209 | + | |
| 210 | +-(CADisplayLink *)link{ | |
| 211 | + if (!_link) { | |
| 212 | + _link = [CADisplayLink displayLinkWithTarget:self selector:@selector(panBack:)]; | |
| 213 | + } | |
| 214 | + return _link; | |
| 215 | +} | |
| 216 | +-(HKFloatAreaView *)floatArea{ | |
| 217 | + if (!_floatArea) { | |
| 218 | + _floatArea = [[HKFloatAreaView alloc]initWithFrame:CGRectMake(KScreenWidth + kFloatMargin, KScreenHeight + kFloatMargin, kFloatAreaR, kFloatAreaR)]; | |
| 219 | + _floatArea.style = HKFloatAreaViewStyle_default; | |
| 220 | + }; | |
| 221 | + return _floatArea; | |
| 222 | +} | |
| 223 | +-(HKFloatAreaView *)cancelFloatArea{ | |
| 224 | + if (!_cancelFloatArea) { | |
| 225 | + _cancelFloatArea = [[HKFloatAreaView alloc]initWithFrame:CGRectMake(KScreenWidth,KScreenHeight, kFloatAreaR, kFloatAreaR)];; | |
| 226 | + _cancelFloatArea.style = HKFloatAreaViewStyle_cancel; | |
| 227 | + }; | |
| 228 | + return _cancelFloatArea; | |
| 229 | +} | |
| 230 | +-(HKFloatBall *)floatBall{ | |
| 231 | + if (!_floatBall) { | |
| 232 | + _floatBall = [[HKFloatBall alloc]initWithFrame:CGRectMake(KScreenWidth - kBallSizeR - 15, KScreenHeight /3, kBallSizeR, kBallSizeR)]; | |
| 233 | + _floatBall.delegate = self; | |
| 234 | + }; | |
| 235 | + return _floatBall; | |
| 236 | +} | |
| 237 | + | |
| 238 | ++(id)allocWithZone:(NSZone *)zone{ | |
| 239 | + return [HKFloatManager shared]; | |
| 240 | +} | |
| 241 | +-(id)copyWithZone:(NSZone *)zone{ | |
| 242 | + return [HKFloatManager shared]; | |
| 243 | +} | |
| 244 | +-(id)mutableCopyWithZone:(NSZone *)zone{ | |
| 245 | + return [HKFloatManager shared]; | |
| 246 | +} | |
| 247 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKTransitionPop.h
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKTransitionPop.h | |
| 1 | +// | |
| 2 | +// HKTransitionPop.h | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/5. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | +#import <UIKit/UIViewControllerTransitioning.h> | |
| 11 | + | |
| 12 | +@interface HKTransitionPop : NSObject<UIViewControllerAnimatedTransitioning> | |
| 13 | + | |
| 14 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKTransitionPop.m
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKTransitionPop.m | |
| 1 | +// | |
| 2 | +// HKTransitionPop.m | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/5. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "HKTransitionPop.h" | |
| 10 | +#import "HKFloatManager.h" | |
| 11 | +#import <CNLiveBaseKit/CNLiveDefinesHeader.h> | |
| 12 | +#define kAuration 0.5 | |
| 13 | +@interface HKTransitionPop()<CAAnimationDelegate> | |
| 14 | +@property (nonatomic,strong)id<UIViewControllerContextTransitioning> transitionContext; | |
| 15 | +@property (nonatomic, strong) UIView *coverView; | |
| 16 | +@end | |
| 17 | +@implementation HKTransitionPop | |
| 18 | +-(NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext | |
| 19 | +{ | |
| 20 | + return kAuration; | |
| 21 | +} | |
| 22 | +- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext { | |
| 23 | + self.transitionContext=transitionContext; | |
| 24 | + | |
| 25 | + UIViewController * fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; | |
| 26 | + UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; | |
| 27 | + | |
| 28 | + UIView *contView = [transitionContext containerView]; | |
| 29 | + [contView addSubview:toVC.view]; | |
| 30 | + [contView addSubview:fromVC.view]; | |
| 31 | + | |
| 32 | + CGRect floatBallRect = [HKFloatManager shared].floatBall.frame; | |
| 33 | + [toVC.view addSubview:self.coverView]; | |
| 34 | + | |
| 35 | + UIBezierPath *maskStartBP = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(floatBallRect.origin.x, floatBallRect.origin.y,floatBallRect.size.width , floatBallRect.size.height) cornerRadius:floatBallRect.size.height/2]; | |
| 36 | + | |
| 37 | + UIBezierPath *maskFinalBP = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0,KScreenWidth, KScreenHeight) cornerRadius:floatBallRect.size.width/2]; | |
| 38 | + | |
| 39 | + CAShapeLayer *maskLayer = [CAShapeLayer layer]; | |
| 40 | + maskLayer.path = maskStartBP.CGPath; | |
| 41 | + fromVC.view.layer.mask = maskLayer; | |
| 42 | + | |
| 43 | + CABasicAnimation *maskLayerAnimation = [CABasicAnimation animationWithKeyPath:@"path"]; | |
| 44 | + maskLayerAnimation.toValue = (__bridge id)(maskStartBP.CGPath); | |
| 45 | + maskLayerAnimation.fromValue = (__bridge id)((maskFinalBP.CGPath)); | |
| 46 | + maskLayerAnimation.duration = kAuration; | |
| 47 | + maskLayerAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
| 48 | + maskLayerAnimation.delegate = self; | |
| 49 | + [maskLayer addAnimation:maskLayerAnimation forKey:@"path"]; | |
| 50 | + | |
| 51 | + | |
| 52 | + [UIView animateWithDuration:kAuration animations:^{ | |
| 53 | + self.coverView.alpha = 0; | |
| 54 | + }]; | |
| 55 | + [UIView animateWithDuration:kAuration animations:^{ | |
| 56 | + [HKFloatManager shared].floatBall.alpha = 1; | |
| 57 | + }]; | |
| 58 | + | |
| 59 | +} | |
| 60 | +#pragma mark - CABasicAnimation的Delegate | |
| 61 | + | |
| 62 | +- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag{ | |
| 63 | + [self.transitionContext completeTransition:YES]; | |
| 64 | + [self.transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey].view.layer.mask = nil; | |
| 65 | + [self.transitionContext viewControllerForKey:UITransitionContextToViewControllerKey].view.layer.mask = nil; | |
| 66 | + [self.coverView removeFromSuperview]; | |
| 67 | +} | |
| 68 | +-(UIView *)coverView{ | |
| 69 | + if (!_coverView) { | |
| 70 | + _coverView = [[UIView alloc]initWithFrame:[UIScreen mainScreen].bounds]; | |
| 71 | + _coverView.backgroundColor = [UIColor blackColor]; | |
| 72 | + _coverView.alpha = 0.5; | |
| 73 | + }; | |
| 74 | + return _coverView; | |
| 75 | +} | |
| 76 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKTransitionPush.h
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKTransitionPush.h | |
| 1 | +// | |
| 2 | +// HKTransitionPush.h | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/5. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | +#import <UIKit/UIViewControllerTransitioning.h> | |
| 11 | + | |
| 12 | +@interface HKTransitionPush : NSObject<UIViewControllerAnimatedTransitioning> | |
| 13 | + | |
| 14 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/HKTransitionPush.m
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/HKTransitionPush.m | |
| 1 | +// | |
| 2 | +// HKTransitionPush.m | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/5. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "HKTransitionPush.h" | |
| 10 | +#import "HKFloatManager.h" | |
| 11 | +#import <CNLiveBaseKit/CNLiveDefinesHeader.h> | |
| 12 | +#define kAuration 0.5 | |
| 13 | +@interface HKTransitionPush()<CAAnimationDelegate> | |
| 14 | +@property (nonatomic,strong)id<UIViewControllerContextTransitioning> transitionContext; | |
| 15 | +@property (nonatomic, strong) UIView *coverView; | |
| 16 | +@end | |
| 17 | +@implementation HKTransitionPush | |
| 18 | +-(NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext | |
| 19 | +{ | |
| 20 | + return kAuration; | |
| 21 | +} | |
| 22 | +- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext { | |
| 23 | + self.transitionContext=transitionContext; | |
| 24 | + | |
| 25 | + UIViewController * fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; | |
| 26 | + UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; | |
| 27 | + | |
| 28 | + UIView *contView = [transitionContext containerView]; | |
| 29 | + [contView addSubview:fromVC.view]; | |
| 30 | + [contView addSubview:toVC.view]; | |
| 31 | + | |
| 32 | + CGRect floatBallRect = [HKFloatManager shared].floatBall.frame; | |
| 33 | + | |
| 34 | + [fromVC.view addSubview:self.coverView]; | |
| 35 | + | |
| 36 | + UIBezierPath *maskStartBP = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(floatBallRect.origin.x, floatBallRect.origin.y,floatBallRect.size.width , floatBallRect.size.height) cornerRadius:floatBallRect.size.height/2]; | |
| 37 | + | |
| 38 | + UIBezierPath *maskFinalBP = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0,KScreenWidth, KScreenHeight) cornerRadius:floatBallRect.size.width/2]; | |
| 39 | + | |
| 40 | + CAShapeLayer *maskLayer = [CAShapeLayer layer]; | |
| 41 | + maskLayer.path = maskFinalBP.CGPath; | |
| 42 | + toVC.view.layer.mask = maskLayer; | |
| 43 | + | |
| 44 | + CABasicAnimation *maskLayerAnimation = [CABasicAnimation animationWithKeyPath:@"path"]; | |
| 45 | + maskLayerAnimation.fromValue = (__bridge id)(maskStartBP.CGPath); | |
| 46 | + maskLayerAnimation.toValue = (__bridge id)((maskFinalBP.CGPath)); | |
| 47 | + maskLayerAnimation.duration = kAuration; | |
| 48 | + maskLayerAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
| 49 | + maskLayerAnimation.delegate = self; | |
| 50 | + [maskLayer addAnimation:maskLayerAnimation forKey:@"path"]; | |
| 51 | + | |
| 52 | + [UIView animateWithDuration:kAuration animations:^{ | |
| 53 | + [HKFloatManager shared].floatBall.alpha = 0; | |
| 54 | + }]; | |
| 55 | +} | |
| 56 | +#pragma mark - CABasicAnimation的Delegate | |
| 57 | + | |
| 58 | +- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag{ | |
| 59 | + [self.transitionContext completeTransition:YES]; | |
| 60 | + [self.transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey].view.layer.mask = nil; | |
| 61 | + [self.transitionContext viewControllerForKey:UITransitionContextToViewControllerKey].view.layer.mask = nil; | |
| 62 | + [self.coverView removeFromSuperview]; | |
| 63 | + | |
| 64 | +} | |
| 65 | +-(UIView *)coverView{ | |
| 66 | + if (!_coverView) { | |
| 67 | + _coverView = [[UIView alloc]initWithFrame:[UIScreen mainScreen].bounds]; | |
| 68 | + _coverView.backgroundColor = [UIColor blackColor]; | |
| 69 | + _coverView.alpha = 0.5; | |
| 70 | + }; | |
| 71 | + return _coverView; | |
| 72 | +} | |
| 73 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/NSObject+hkvc.h
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/NSObject+hkvc.h | |
| 1 | +// | |
| 2 | +// NSObject+hkvc.h | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/6. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | +#import <UIKit/UIKit.h> | |
| 9 | +#import <Foundation/Foundation.h> | |
| 10 | + | |
| 11 | +@interface NSObject (hkvc) | |
| 12 | +- (UIViewController *)hk_currentViewController; | |
| 13 | +- (UITabBarController *)hk_currentTabBarController; | |
| 14 | +- (UINavigationController *)hk_currentNavigationController; | |
| 15 | +@end | ... | ... |
CNLiveNavigationClass/Classes/HKFloat/NSObject+hkvc.m
0 → 100755
| 1 | +++ a/CNLiveNavigationClass/Classes/HKFloat/NSObject+hkvc.m | |
| 1 | +// | |
| 2 | +// NSObject+hkvc.m | |
| 3 | +// WeChatFloat | |
| 4 | +// | |
| 5 | +// Created by HeiKki on 2018/6/6. | |
| 6 | +// Copyright © 2018年 HeiKki. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "NSObject+hkvc.h" | |
| 10 | + | |
| 11 | +@implementation NSObject (hkvc) | |
| 12 | +- (UIViewController *)hk_currentViewController | |
| 13 | +{ | |
| 14 | +// UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow; | |
| 15 | +// UIViewController *vc = keyWindow.rootViewController; | |
| 16 | +// if ([vc isKindOfClass:[UINavigationController class]]) | |
| 17 | +// { | |
| 18 | +// vc = [(UINavigationController *)vc visibleViewController]; | |
| 19 | +// } | |
| 20 | +// else if ([vc isKindOfClass:[UITabBarController class]]) | |
| 21 | +// { | |
| 22 | +// vc = [(UITabBarController *)vc selectedViewController]; | |
| 23 | +// } | |
| 24 | +// return vc; | |
| 25 | + | |
| 26 | + UIViewController* vc = [UIApplication sharedApplication].keyWindow.rootViewController; | |
| 27 | + while (1) | |
| 28 | + { | |
| 29 | + if ([vc isKindOfClass:[UITabBarController class]]) { | |
| 30 | + vc = ((UITabBarController*)vc).selectedViewController; | |
| 31 | + } | |
| 32 | + if ([vc isKindOfClass:[UINavigationController class]]) { | |
| 33 | + vc = ((UINavigationController*)vc).visibleViewController; | |
| 34 | + } | |
| 35 | + if (vc.presentedViewController) { | |
| 36 | + vc = vc.presentedViewController; | |
| 37 | + }else{ | |
| 38 | + break; | |
| 39 | + } | |
| 40 | + } | |
| 41 | + return vc; | |
| 42 | +} | |
| 43 | + | |
| 44 | +- (UINavigationController *)hk_currentNavigationController | |
| 45 | +{ | |
| 46 | + return [self hk_currentViewController].navigationController; | |
| 47 | +} | |
| 48 | +- (UITabBarController *)hk_currentTabBarController | |
| 49 | +{ | |
| 50 | + return [self hk_currentViewController].tabBarController; | |
| 51 | +} | |
| 52 | + | |
| 53 | +@end | ... | ... |
Example/CNLiveNavigationClass.xcodeproj/project.pbxproj
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass.xcodeproj/project.pbxproj | |
| 1 | +// !$*UTF8*$! | |
| 2 | +{ | |
| 3 | + archiveVersion = 1; | |
| 4 | + classes = { | |
| 5 | + }; | |
| 6 | + objectVersion = 46; | |
| 7 | + objects = { | |
| 8 | + | |
| 9 | +/* Begin PBXBuildFile section */ | |
| 10 | + 2B97FF660483C0EC22BC4689 /* Pods_CNLiveNavigationClass_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B60BA819358727E6D81257B /* Pods_CNLiveNavigationClass_Example.framework */; }; | |
| 11 | + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; | |
| 12 | + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; | |
| 13 | + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; | |
| 14 | + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; | |
| 15 | + 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; | |
| 16 | + 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* CNLIVEAppDelegate.m */; }; | |
| 17 | + 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* CNLIVEViewController.m */; }; | |
| 18 | + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; | |
| 19 | + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; | |
| 20 | + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; | |
| 21 | + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; | |
| 22 | + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; | |
| 23 | + 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; | |
| 24 | + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */; }; | |
| 25 | + 7D1CAAEC0FCF1BD1DBB66803 /* Pods_CNLiveNavigationClass_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 192A4EA50FE8D978B80F0ED0 /* Pods_CNLiveNavigationClass_Tests.framework */; }; | |
| 26 | + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; | |
| 27 | +/* End PBXBuildFile section */ | |
| 28 | + | |
| 29 | +/* Begin PBXContainerItemProxy section */ | |
| 30 | + 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { | |
| 31 | + isa = PBXContainerItemProxy; | |
| 32 | + containerPortal = 6003F582195388D10070C39A /* Project object */; | |
| 33 | + proxyType = 1; | |
| 34 | + remoteGlobalIDString = 6003F589195388D20070C39A; | |
| 35 | + remoteInfo = CNLiveNavigationClass; | |
| 36 | + }; | |
| 37 | +/* End PBXContainerItemProxy section */ | |
| 38 | + | |
| 39 | +/* Begin PBXFileReference section */ | |
| 40 | + 01A4D23F03CCCB15D4AD2D96 /* Pods-CNLiveNavigationClass_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveNavigationClass_Example.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveNavigationClass_Example/Pods-CNLiveNavigationClass_Example.debug.xcconfig"; sourceTree = "<group>"; }; | |
| 41 | + 192A4EA50FE8D978B80F0ED0 /* Pods_CNLiveNavigationClass_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveNavigationClass_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | |
| 42 | + 21862E6DED77303F8E04D505 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; }; | |
| 43 | + 6003F58A195388D20070C39A /* CNLiveNavigationClass_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveNavigationClass_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; | |
| 44 | + 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; | |
| 45 | + 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; | |
| 46 | + 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; | |
| 47 | + 6003F595195388D20070C39A /* CNLiveNavigationClass-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "CNLiveNavigationClass-Info.plist"; sourceTree = "<group>"; }; | |
| 48 | + 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | |
| 49 | + 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; | |
| 50 | + 6003F59B195388D20070C39A /* CNLiveNavigationClass-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CNLiveNavigationClass-Prefix.pch"; sourceTree = "<group>"; }; | |
| 51 | + 6003F59C195388D20070C39A /* CNLIVEAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLIVEAppDelegate.h; sourceTree = "<group>"; }; | |
| 52 | + 6003F59D195388D20070C39A /* CNLIVEAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLIVEAppDelegate.m; sourceTree = "<group>"; }; | |
| 53 | + 6003F5A5195388D20070C39A /* CNLIVEViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CNLIVEViewController.h; sourceTree = "<group>"; }; | |
| 54 | + 6003F5A6195388D20070C39A /* CNLIVEViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CNLIVEViewController.m; sourceTree = "<group>"; }; | |
| 55 | + 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; }; | |
| 56 | + 6003F5AE195388D20070C39A /* CNLiveNavigationClass_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CNLiveNavigationClass_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; | |
| 57 | + 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; | |
| 58 | + 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = "<group>"; }; | |
| 59 | + 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; }; | |
| 60 | + 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = "<group>"; }; | |
| 61 | + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = "<group>"; }; | |
| 62 | + 6B60BA819358727E6D81257B /* Pods_CNLiveNavigationClass_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveNavigationClass_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; | |
| 63 | + 6DEA50EE46FF696F22BDDC03 /* CNLiveNavigationClass.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveNavigationClass.podspec; path = ../CNLiveNavigationClass.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; | |
| 64 | + 71719F9E1E33DC2100824A3D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | |
| 65 | + 7730278043EAAFDB3736A752 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; }; | |
| 66 | + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = Main.storyboard; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; | |
| 67 | + A6F81A3608B80C24F1922F44 /* Pods-CNLiveNavigationClass_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveNavigationClass_Tests.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveNavigationClass_Tests/Pods-CNLiveNavigationClass_Tests.debug.xcconfig"; sourceTree = "<group>"; }; | |
| 68 | + AA95ABFB44E770B1563894A9 /* Pods-CNLiveNavigationClass_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveNavigationClass_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNLiveNavigationClass_Tests/Pods-CNLiveNavigationClass_Tests.release.xcconfig"; sourceTree = "<group>"; }; | |
| 69 | + C2B3E008EAF6EC1C1774D6E0 /* Pods-CNLiveNavigationClass_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveNavigationClass_Example.release.xcconfig"; path = "Target Support Files/Pods-CNLiveNavigationClass_Example/Pods-CNLiveNavigationClass_Example.release.xcconfig"; sourceTree = "<group>"; }; | |
| 70 | +/* End PBXFileReference section */ | |
| 71 | + | |
| 72 | +/* Begin PBXFrameworksBuildPhase section */ | |
| 73 | + 6003F587195388D20070C39A /* Frameworks */ = { | |
| 74 | + isa = PBXFrameworksBuildPhase; | |
| 75 | + buildActionMask = 2147483647; | |
| 76 | + files = ( | |
| 77 | + 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, | |
| 78 | + 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, | |
| 79 | + 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, | |
| 80 | + 2B97FF660483C0EC22BC4689 /* Pods_CNLiveNavigationClass_Example.framework in Frameworks */, | |
| 81 | + ); | |
| 82 | + runOnlyForDeploymentPostprocessing = 0; | |
| 83 | + }; | |
| 84 | + 6003F5AB195388D20070C39A /* Frameworks */ = { | |
| 85 | + isa = PBXFrameworksBuildPhase; | |
| 86 | + buildActionMask = 2147483647; | |
| 87 | + files = ( | |
| 88 | + 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, | |
| 89 | + 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, | |
| 90 | + 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, | |
| 91 | + 7D1CAAEC0FCF1BD1DBB66803 /* Pods_CNLiveNavigationClass_Tests.framework in Frameworks */, | |
| 92 | + ); | |
| 93 | + runOnlyForDeploymentPostprocessing = 0; | |
| 94 | + }; | |
| 95 | +/* End PBXFrameworksBuildPhase section */ | |
| 96 | + | |
| 97 | +/* Begin PBXGroup section */ | |
| 98 | + 6003F581195388D10070C39A = { | |
| 99 | + isa = PBXGroup; | |
| 100 | + children = ( | |
| 101 | + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, | |
| 102 | + 6003F593195388D20070C39A /* Example for CNLiveNavigationClass */, | |
| 103 | + 6003F5B5195388D20070C39A /* Tests */, | |
| 104 | + 6003F58C195388D20070C39A /* Frameworks */, | |
| 105 | + 6003F58B195388D20070C39A /* Products */, | |
| 106 | + 8628A23435B2DAD327C1D169 /* Pods */, | |
| 107 | + ); | |
| 108 | + sourceTree = "<group>"; | |
| 109 | + }; | |
| 110 | + 6003F58B195388D20070C39A /* Products */ = { | |
| 111 | + isa = PBXGroup; | |
| 112 | + children = ( | |
| 113 | + 6003F58A195388D20070C39A /* CNLiveNavigationClass_Example.app */, | |
| 114 | + 6003F5AE195388D20070C39A /* CNLiveNavigationClass_Tests.xctest */, | |
| 115 | + ); | |
| 116 | + name = Products; | |
| 117 | + sourceTree = "<group>"; | |
| 118 | + }; | |
| 119 | + 6003F58C195388D20070C39A /* Frameworks */ = { | |
| 120 | + isa = PBXGroup; | |
| 121 | + children = ( | |
| 122 | + 6003F58D195388D20070C39A /* Foundation.framework */, | |
| 123 | + 6003F58F195388D20070C39A /* CoreGraphics.framework */, | |
| 124 | + 6003F591195388D20070C39A /* UIKit.framework */, | |
| 125 | + 6003F5AF195388D20070C39A /* XCTest.framework */, | |
| 126 | + 6B60BA819358727E6D81257B /* Pods_CNLiveNavigationClass_Example.framework */, | |
| 127 | + 192A4EA50FE8D978B80F0ED0 /* Pods_CNLiveNavigationClass_Tests.framework */, | |
| 128 | + ); | |
| 129 | + name = Frameworks; | |
| 130 | + sourceTree = "<group>"; | |
| 131 | + }; | |
| 132 | + 6003F593195388D20070C39A /* Example for CNLiveNavigationClass */ = { | |
| 133 | + isa = PBXGroup; | |
| 134 | + children = ( | |
| 135 | + 6003F59C195388D20070C39A /* CNLIVEAppDelegate.h */, | |
| 136 | + 6003F59D195388D20070C39A /* CNLIVEAppDelegate.m */, | |
| 137 | + 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, | |
| 138 | + 6003F5A5195388D20070C39A /* CNLIVEViewController.h */, | |
| 139 | + 6003F5A6195388D20070C39A /* CNLIVEViewController.m */, | |
| 140 | + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */, | |
| 141 | + 6003F5A8195388D20070C39A /* Images.xcassets */, | |
| 142 | + 6003F594195388D20070C39A /* Supporting Files */, | |
| 143 | + ); | |
| 144 | + name = "Example for CNLiveNavigationClass"; | |
| 145 | + path = CNLiveNavigationClass; | |
| 146 | + sourceTree = "<group>"; | |
| 147 | + }; | |
| 148 | + 6003F594195388D20070C39A /* Supporting Files */ = { | |
| 149 | + isa = PBXGroup; | |
| 150 | + children = ( | |
| 151 | + 6003F595195388D20070C39A /* CNLiveNavigationClass-Info.plist */, | |
| 152 | + 6003F596195388D20070C39A /* InfoPlist.strings */, | |
| 153 | + 6003F599195388D20070C39A /* main.m */, | |
| 154 | + 6003F59B195388D20070C39A /* CNLiveNavigationClass-Prefix.pch */, | |
| 155 | + ); | |
| 156 | + name = "Supporting Files"; | |
| 157 | + sourceTree = "<group>"; | |
| 158 | + }; | |
| 159 | + 6003F5B5195388D20070C39A /* Tests */ = { | |
| 160 | + isa = PBXGroup; | |
| 161 | + children = ( | |
| 162 | + 6003F5BB195388D20070C39A /* Tests.m */, | |
| 163 | + 6003F5B6195388D20070C39A /* Supporting Files */, | |
| 164 | + ); | |
| 165 | + path = Tests; | |
| 166 | + sourceTree = "<group>"; | |
| 167 | + }; | |
| 168 | + 6003F5B6195388D20070C39A /* Supporting Files */ = { | |
| 169 | + isa = PBXGroup; | |
| 170 | + children = ( | |
| 171 | + 6003F5B7195388D20070C39A /* Tests-Info.plist */, | |
| 172 | + 6003F5B8195388D20070C39A /* InfoPlist.strings */, | |
| 173 | + 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, | |
| 174 | + ); | |
| 175 | + name = "Supporting Files"; | |
| 176 | + sourceTree = "<group>"; | |
| 177 | + }; | |
| 178 | + 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { | |
| 179 | + isa = PBXGroup; | |
| 180 | + children = ( | |
| 181 | + 6DEA50EE46FF696F22BDDC03 /* CNLiveNavigationClass.podspec */, | |
| 182 | + 21862E6DED77303F8E04D505 /* README.md */, | |
| 183 | + 7730278043EAAFDB3736A752 /* LICENSE */, | |
| 184 | + ); | |
| 185 | + name = "Podspec Metadata"; | |
| 186 | + sourceTree = "<group>"; | |
| 187 | + }; | |
| 188 | + 8628A23435B2DAD327C1D169 /* Pods */ = { | |
| 189 | + isa = PBXGroup; | |
| 190 | + children = ( | |
| 191 | + 01A4D23F03CCCB15D4AD2D96 /* Pods-CNLiveNavigationClass_Example.debug.xcconfig */, | |
| 192 | + C2B3E008EAF6EC1C1774D6E0 /* Pods-CNLiveNavigationClass_Example.release.xcconfig */, | |
| 193 | + A6F81A3608B80C24F1922F44 /* Pods-CNLiveNavigationClass_Tests.debug.xcconfig */, | |
| 194 | + AA95ABFB44E770B1563894A9 /* Pods-CNLiveNavigationClass_Tests.release.xcconfig */, | |
| 195 | + ); | |
| 196 | + path = Pods; | |
| 197 | + sourceTree = "<group>"; | |
| 198 | + }; | |
| 199 | +/* End PBXGroup section */ | |
| 200 | + | |
| 201 | +/* Begin PBXNativeTarget section */ | |
| 202 | + 6003F589195388D20070C39A /* CNLiveNavigationClass_Example */ = { | |
| 203 | + isa = PBXNativeTarget; | |
| 204 | + buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveNavigationClass_Example" */; | |
| 205 | + buildPhases = ( | |
| 206 | + 2EA1A46F0381E6C82A5469D3 /* [CP] Check Pods Manifest.lock */, | |
| 207 | + 6003F586195388D20070C39A /* Sources */, | |
| 208 | + 6003F587195388D20070C39A /* Frameworks */, | |
| 209 | + 6003F588195388D20070C39A /* Resources */, | |
| 210 | + 7CFBCD30B2418AD51BE1C9FB /* [CP] Embed Pods Frameworks */, | |
| 211 | + ); | |
| 212 | + buildRules = ( | |
| 213 | + ); | |
| 214 | + dependencies = ( | |
| 215 | + ); | |
| 216 | + name = CNLiveNavigationClass_Example; | |
| 217 | + productName = CNLiveNavigationClass; | |
| 218 | + productReference = 6003F58A195388D20070C39A /* CNLiveNavigationClass_Example.app */; | |
| 219 | + productType = "com.apple.product-type.application"; | |
| 220 | + }; | |
| 221 | + 6003F5AD195388D20070C39A /* CNLiveNavigationClass_Tests */ = { | |
| 222 | + isa = PBXNativeTarget; | |
| 223 | + buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveNavigationClass_Tests" */; | |
| 224 | + buildPhases = ( | |
| 225 | + 54EDEFB4651B45B808CCAF74 /* [CP] Check Pods Manifest.lock */, | |
| 226 | + 6003F5AA195388D20070C39A /* Sources */, | |
| 227 | + 6003F5AB195388D20070C39A /* Frameworks */, | |
| 228 | + 6003F5AC195388D20070C39A /* Resources */, | |
| 229 | + ); | |
| 230 | + buildRules = ( | |
| 231 | + ); | |
| 232 | + dependencies = ( | |
| 233 | + 6003F5B4195388D20070C39A /* PBXTargetDependency */, | |
| 234 | + ); | |
| 235 | + name = CNLiveNavigationClass_Tests; | |
| 236 | + productName = CNLiveNavigationClassTests; | |
| 237 | + productReference = 6003F5AE195388D20070C39A /* CNLiveNavigationClass_Tests.xctest */; | |
| 238 | + productType = "com.apple.product-type.bundle.unit-test"; | |
| 239 | + }; | |
| 240 | +/* End PBXNativeTarget section */ | |
| 241 | + | |
| 242 | +/* Begin PBXProject section */ | |
| 243 | + 6003F582195388D10070C39A /* Project object */ = { | |
| 244 | + isa = PBXProject; | |
| 245 | + attributes = { | |
| 246 | + CLASSPREFIX = CNLIVE; | |
| 247 | + LastUpgradeCheck = 0720; | |
| 248 | + ORGANIZATIONNAME = dawanzi; | |
| 249 | + TargetAttributes = { | |
| 250 | + 6003F589195388D20070C39A = { | |
| 251 | + DevelopmentTeam = 94X49GG3ZW; | |
| 252 | + }; | |
| 253 | + 6003F5AD195388D20070C39A = { | |
| 254 | + TestTargetID = 6003F589195388D20070C39A; | |
| 255 | + }; | |
| 256 | + }; | |
| 257 | + }; | |
| 258 | + buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveNavigationClass" */; | |
| 259 | + compatibilityVersion = "Xcode 3.2"; | |
| 260 | + developmentRegion = English; | |
| 261 | + hasScannedForEncodings = 0; | |
| 262 | + knownRegions = ( | |
| 263 | + English, | |
| 264 | + en, | |
| 265 | + Base, | |
| 266 | + ); | |
| 267 | + mainGroup = 6003F581195388D10070C39A; | |
| 268 | + productRefGroup = 6003F58B195388D20070C39A /* Products */; | |
| 269 | + projectDirPath = ""; | |
| 270 | + projectRoot = ""; | |
| 271 | + targets = ( | |
| 272 | + 6003F589195388D20070C39A /* CNLiveNavigationClass_Example */, | |
| 273 | + 6003F5AD195388D20070C39A /* CNLiveNavigationClass_Tests */, | |
| 274 | + ); | |
| 275 | + }; | |
| 276 | +/* End PBXProject section */ | |
| 277 | + | |
| 278 | +/* Begin PBXResourcesBuildPhase section */ | |
| 279 | + 6003F588195388D20070C39A /* Resources */ = { | |
| 280 | + isa = PBXResourcesBuildPhase; | |
| 281 | + buildActionMask = 2147483647; | |
| 282 | + files = ( | |
| 283 | + 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, | |
| 284 | + 71719F9F1E33DC2100824A3D /* LaunchScreen.storyboard in Resources */, | |
| 285 | + 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, | |
| 286 | + 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, | |
| 287 | + ); | |
| 288 | + runOnlyForDeploymentPostprocessing = 0; | |
| 289 | + }; | |
| 290 | + 6003F5AC195388D20070C39A /* Resources */ = { | |
| 291 | + isa = PBXResourcesBuildPhase; | |
| 292 | + buildActionMask = 2147483647; | |
| 293 | + files = ( | |
| 294 | + 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, | |
| 295 | + ); | |
| 296 | + runOnlyForDeploymentPostprocessing = 0; | |
| 297 | + }; | |
| 298 | +/* End PBXResourcesBuildPhase section */ | |
| 299 | + | |
| 300 | +/* Begin PBXShellScriptBuildPhase section */ | |
| 301 | + 2EA1A46F0381E6C82A5469D3 /* [CP] Check Pods Manifest.lock */ = { | |
| 302 | + isa = PBXShellScriptBuildPhase; | |
| 303 | + buildActionMask = 2147483647; | |
| 304 | + files = ( | |
| 305 | + ); | |
| 306 | + inputFileListPaths = ( | |
| 307 | + ); | |
| 308 | + inputPaths = ( | |
| 309 | + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | |
| 310 | + "${PODS_ROOT}/Manifest.lock", | |
| 311 | + ); | |
| 312 | + name = "[CP] Check Pods Manifest.lock"; | |
| 313 | + outputFileListPaths = ( | |
| 314 | + ); | |
| 315 | + outputPaths = ( | |
| 316 | + "$(DERIVED_FILE_DIR)/Pods-CNLiveNavigationClass_Example-checkManifestLockResult.txt", | |
| 317 | + ); | |
| 318 | + runOnlyForDeploymentPostprocessing = 0; | |
| 319 | + shellPath = /bin/sh; | |
| 320 | + 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"; | |
| 321 | + showEnvVarsInLog = 0; | |
| 322 | + }; | |
| 323 | + 54EDEFB4651B45B808CCAF74 /* [CP] Check Pods Manifest.lock */ = { | |
| 324 | + isa = PBXShellScriptBuildPhase; | |
| 325 | + buildActionMask = 2147483647; | |
| 326 | + files = ( | |
| 327 | + ); | |
| 328 | + inputFileListPaths = ( | |
| 329 | + ); | |
| 330 | + inputPaths = ( | |
| 331 | + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", | |
| 332 | + "${PODS_ROOT}/Manifest.lock", | |
| 333 | + ); | |
| 334 | + name = "[CP] Check Pods Manifest.lock"; | |
| 335 | + outputFileListPaths = ( | |
| 336 | + ); | |
| 337 | + outputPaths = ( | |
| 338 | + "$(DERIVED_FILE_DIR)/Pods-CNLiveNavigationClass_Tests-checkManifestLockResult.txt", | |
| 339 | + ); | |
| 340 | + runOnlyForDeploymentPostprocessing = 0; | |
| 341 | + shellPath = /bin/sh; | |
| 342 | + 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"; | |
| 343 | + showEnvVarsInLog = 0; | |
| 344 | + }; | |
| 345 | + 7CFBCD30B2418AD51BE1C9FB /* [CP] Embed Pods Frameworks */ = { | |
| 346 | + isa = PBXShellScriptBuildPhase; | |
| 347 | + buildActionMask = 2147483647; | |
| 348 | + files = ( | |
| 349 | + ); | |
| 350 | + inputPaths = ( | |
| 351 | + "${PODS_ROOT}/Target Support Files/Pods-CNLiveNavigationClass_Example/Pods-CNLiveNavigationClass_Example-frameworks.sh", | |
| 352 | + "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", | |
| 353 | + "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework", | |
| 354 | + "${BUILT_PRODUCTS_DIR}/CNLiveNavigationClass/CNLiveNavigationClass.framework", | |
| 355 | + "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework", | |
| 356 | + "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | |
| 357 | + "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | |
| 358 | + "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", | |
| 359 | + ); | |
| 360 | + name = "[CP] Embed Pods Frameworks"; | |
| 361 | + outputPaths = ( | |
| 362 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", | |
| 363 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework", | |
| 364 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveNavigationClass.framework", | |
| 365 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework", | |
| 366 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | |
| 367 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | |
| 368 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", | |
| 369 | + ); | |
| 370 | + runOnlyForDeploymentPostprocessing = 0; | |
| 371 | + shellPath = /bin/sh; | |
| 372 | + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveNavigationClass_Example/Pods-CNLiveNavigationClass_Example-frameworks.sh\"\n"; | |
| 373 | + showEnvVarsInLog = 0; | |
| 374 | + }; | |
| 375 | +/* End PBXShellScriptBuildPhase section */ | |
| 376 | + | |
| 377 | +/* Begin PBXSourcesBuildPhase section */ | |
| 378 | + 6003F586195388D20070C39A /* Sources */ = { | |
| 379 | + isa = PBXSourcesBuildPhase; | |
| 380 | + buildActionMask = 2147483647; | |
| 381 | + files = ( | |
| 382 | + 6003F59E195388D20070C39A /* CNLIVEAppDelegate.m in Sources */, | |
| 383 | + 6003F5A7195388D20070C39A /* CNLIVEViewController.m in Sources */, | |
| 384 | + 6003F59A195388D20070C39A /* main.m in Sources */, | |
| 385 | + ); | |
| 386 | + runOnlyForDeploymentPostprocessing = 0; | |
| 387 | + }; | |
| 388 | + 6003F5AA195388D20070C39A /* Sources */ = { | |
| 389 | + isa = PBXSourcesBuildPhase; | |
| 390 | + buildActionMask = 2147483647; | |
| 391 | + files = ( | |
| 392 | + 6003F5BC195388D20070C39A /* Tests.m in Sources */, | |
| 393 | + ); | |
| 394 | + runOnlyForDeploymentPostprocessing = 0; | |
| 395 | + }; | |
| 396 | +/* End PBXSourcesBuildPhase section */ | |
| 397 | + | |
| 398 | +/* Begin PBXTargetDependency section */ | |
| 399 | + 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { | |
| 400 | + isa = PBXTargetDependency; | |
| 401 | + target = 6003F589195388D20070C39A /* CNLiveNavigationClass_Example */; | |
| 402 | + targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; | |
| 403 | + }; | |
| 404 | +/* End PBXTargetDependency section */ | |
| 405 | + | |
| 406 | +/* Begin PBXVariantGroup section */ | |
| 407 | + 6003F596195388D20070C39A /* InfoPlist.strings */ = { | |
| 408 | + isa = PBXVariantGroup; | |
| 409 | + children = ( | |
| 410 | + 6003F597195388D20070C39A /* en */, | |
| 411 | + ); | |
| 412 | + name = InfoPlist.strings; | |
| 413 | + sourceTree = "<group>"; | |
| 414 | + }; | |
| 415 | + 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { | |
| 416 | + isa = PBXVariantGroup; | |
| 417 | + children = ( | |
| 418 | + 6003F5B9195388D20070C39A /* en */, | |
| 419 | + ); | |
| 420 | + name = InfoPlist.strings; | |
| 421 | + sourceTree = "<group>"; | |
| 422 | + }; | |
| 423 | + 71719F9D1E33DC2100824A3D /* LaunchScreen.storyboard */ = { | |
| 424 | + isa = PBXVariantGroup; | |
| 425 | + children = ( | |
| 426 | + 71719F9E1E33DC2100824A3D /* Base */, | |
| 427 | + ); | |
| 428 | + name = LaunchScreen.storyboard; | |
| 429 | + sourceTree = "<group>"; | |
| 430 | + }; | |
| 431 | +/* End PBXVariantGroup section */ | |
| 432 | + | |
| 433 | +/* Begin XCBuildConfiguration section */ | |
| 434 | + 6003F5BD195388D20070C39A /* Debug */ = { | |
| 435 | + isa = XCBuildConfiguration; | |
| 436 | + buildSettings = { | |
| 437 | + ALWAYS_SEARCH_USER_PATHS = NO; | |
| 438 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | |
| 439 | + CLANG_CXX_LIBRARY = "libc++"; | |
| 440 | + CLANG_ENABLE_MODULES = YES; | |
| 441 | + CLANG_ENABLE_OBJC_ARC = YES; | |
| 442 | + CLANG_WARN_BOOL_CONVERSION = YES; | |
| 443 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | |
| 444 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | |
| 445 | + CLANG_WARN_EMPTY_BODY = YES; | |
| 446 | + CLANG_WARN_ENUM_CONVERSION = YES; | |
| 447 | + CLANG_WARN_INT_CONVERSION = YES; | |
| 448 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | |
| 449 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | |
| 450 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |
| 451 | + COPY_PHASE_STRIP = NO; | |
| 452 | + ENABLE_TESTABILITY = YES; | |
| 453 | + GCC_C_LANGUAGE_STANDARD = gnu99; | |
| 454 | + GCC_DYNAMIC_NO_PIC = NO; | |
| 455 | + GCC_OPTIMIZATION_LEVEL = 0; | |
| 456 | + GCC_PREPROCESSOR_DEFINITIONS = ( | |
| 457 | + "DEBUG=1", | |
| 458 | + "$(inherited)", | |
| 459 | + ); | |
| 460 | + GCC_SYMBOLS_PRIVATE_EXTERN = NO; | |
| 461 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | |
| 462 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | |
| 463 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | |
| 464 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | |
| 465 | + GCC_WARN_UNUSED_FUNCTION = YES; | |
| 466 | + GCC_WARN_UNUSED_VARIABLE = YES; | |
| 467 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | |
| 468 | + ONLY_ACTIVE_ARCH = YES; | |
| 469 | + SDKROOT = iphoneos; | |
| 470 | + TARGETED_DEVICE_FAMILY = "1,2"; | |
| 471 | + }; | |
| 472 | + name = Debug; | |
| 473 | + }; | |
| 474 | + 6003F5BE195388D20070C39A /* Release */ = { | |
| 475 | + isa = XCBuildConfiguration; | |
| 476 | + buildSettings = { | |
| 477 | + ALWAYS_SEARCH_USER_PATHS = NO; | |
| 478 | + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | |
| 479 | + CLANG_CXX_LIBRARY = "libc++"; | |
| 480 | + CLANG_ENABLE_MODULES = YES; | |
| 481 | + CLANG_ENABLE_OBJC_ARC = YES; | |
| 482 | + CLANG_WARN_BOOL_CONVERSION = YES; | |
| 483 | + CLANG_WARN_CONSTANT_CONVERSION = YES; | |
| 484 | + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; | |
| 485 | + CLANG_WARN_EMPTY_BODY = YES; | |
| 486 | + CLANG_WARN_ENUM_CONVERSION = YES; | |
| 487 | + CLANG_WARN_INT_CONVERSION = YES; | |
| 488 | + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | |
| 489 | + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | |
| 490 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | |
| 491 | + COPY_PHASE_STRIP = YES; | |
| 492 | + ENABLE_NS_ASSERTIONS = NO; | |
| 493 | + GCC_C_LANGUAGE_STANDARD = gnu99; | |
| 494 | + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; | |
| 495 | + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; | |
| 496 | + GCC_WARN_UNDECLARED_SELECTOR = YES; | |
| 497 | + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; | |
| 498 | + GCC_WARN_UNUSED_FUNCTION = YES; | |
| 499 | + GCC_WARN_UNUSED_VARIABLE = YES; | |
| 500 | + IPHONEOS_DEPLOYMENT_TARGET = 9.3; | |
| 501 | + SDKROOT = iphoneos; | |
| 502 | + TARGETED_DEVICE_FAMILY = "1,2"; | |
| 503 | + VALIDATE_PRODUCT = YES; | |
| 504 | + }; | |
| 505 | + name = Release; | |
| 506 | + }; | |
| 507 | + 6003F5C0195388D20070C39A /* Debug */ = { | |
| 508 | + isa = XCBuildConfiguration; | |
| 509 | + baseConfigurationReference = 01A4D23F03CCCB15D4AD2D96 /* Pods-CNLiveNavigationClass_Example.debug.xcconfig */; | |
| 510 | + buildSettings = { | |
| 511 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |
| 512 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | |
| 513 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | |
| 514 | + GCC_PREFIX_HEADER = "CNLiveNavigationClass/CNLiveNavigationClass-Prefix.pch"; | |
| 515 | + INFOPLIST_FILE = "CNLiveNavigationClass/CNLiveNavigationClass-Info.plist"; | |
| 516 | + MODULE_NAME = ExampleApp; | |
| 517 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | |
| 518 | + PRODUCT_NAME = "$(TARGET_NAME)"; | |
| 519 | + SWIFT_VERSION = 4.0; | |
| 520 | + WRAPPER_EXTENSION = app; | |
| 521 | + }; | |
| 522 | + name = Debug; | |
| 523 | + }; | |
| 524 | + 6003F5C1195388D20070C39A /* Release */ = { | |
| 525 | + isa = XCBuildConfiguration; | |
| 526 | + baseConfigurationReference = C2B3E008EAF6EC1C1774D6E0 /* Pods-CNLiveNavigationClass_Example.release.xcconfig */; | |
| 527 | + buildSettings = { | |
| 528 | + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | |
| 529 | + DEVELOPMENT_TEAM = 94X49GG3ZW; | |
| 530 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | |
| 531 | + GCC_PREFIX_HEADER = "CNLiveNavigationClass/CNLiveNavigationClass-Prefix.pch"; | |
| 532 | + INFOPLIST_FILE = "CNLiveNavigationClass/CNLiveNavigationClass-Info.plist"; | |
| 533 | + MODULE_NAME = ExampleApp; | |
| 534 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | |
| 535 | + PRODUCT_NAME = "$(TARGET_NAME)"; | |
| 536 | + SWIFT_VERSION = 4.0; | |
| 537 | + WRAPPER_EXTENSION = app; | |
| 538 | + }; | |
| 539 | + name = Release; | |
| 540 | + }; | |
| 541 | + 6003F5C3195388D20070C39A /* Debug */ = { | |
| 542 | + isa = XCBuildConfiguration; | |
| 543 | + baseConfigurationReference = A6F81A3608B80C24F1922F44 /* Pods-CNLiveNavigationClass_Tests.debug.xcconfig */; | |
| 544 | + buildSettings = { | |
| 545 | + BUNDLE_LOADER = "$(TEST_HOST)"; | |
| 546 | + FRAMEWORK_SEARCH_PATHS = ( | |
| 547 | + "$(PLATFORM_DIR)/Developer/Library/Frameworks", | |
| 548 | + "$(inherited)", | |
| 549 | + "$(DEVELOPER_FRAMEWORKS_DIR)", | |
| 550 | + ); | |
| 551 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | |
| 552 | + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; | |
| 553 | + GCC_PREPROCESSOR_DEFINITIONS = ( | |
| 554 | + "DEBUG=1", | |
| 555 | + "$(inherited)", | |
| 556 | + ); | |
| 557 | + INFOPLIST_FILE = "Tests/Tests-Info.plist"; | |
| 558 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | |
| 559 | + PRODUCT_NAME = "$(TARGET_NAME)"; | |
| 560 | + SWIFT_VERSION = 4.0; | |
| 561 | + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveNavigationClass_Example.app/CNLiveNavigationClass_Example"; | |
| 562 | + WRAPPER_EXTENSION = xctest; | |
| 563 | + }; | |
| 564 | + name = Debug; | |
| 565 | + }; | |
| 566 | + 6003F5C4195388D20070C39A /* Release */ = { | |
| 567 | + isa = XCBuildConfiguration; | |
| 568 | + baseConfigurationReference = AA95ABFB44E770B1563894A9 /* Pods-CNLiveNavigationClass_Tests.release.xcconfig */; | |
| 569 | + buildSettings = { | |
| 570 | + BUNDLE_LOADER = "$(TEST_HOST)"; | |
| 571 | + FRAMEWORK_SEARCH_PATHS = ( | |
| 572 | + "$(PLATFORM_DIR)/Developer/Library/Frameworks", | |
| 573 | + "$(inherited)", | |
| 574 | + "$(DEVELOPER_FRAMEWORKS_DIR)", | |
| 575 | + ); | |
| 576 | + GCC_PRECOMPILE_PREFIX_HEADER = YES; | |
| 577 | + GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; | |
| 578 | + INFOPLIST_FILE = "Tests/Tests-Info.plist"; | |
| 579 | + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; | |
| 580 | + PRODUCT_NAME = "$(TARGET_NAME)"; | |
| 581 | + SWIFT_VERSION = 4.0; | |
| 582 | + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/CNLiveNavigationClass_Example.app/CNLiveNavigationClass_Example"; | |
| 583 | + WRAPPER_EXTENSION = xctest; | |
| 584 | + }; | |
| 585 | + name = Release; | |
| 586 | + }; | |
| 587 | +/* End XCBuildConfiguration section */ | |
| 588 | + | |
| 589 | +/* Begin XCConfigurationList section */ | |
| 590 | + 6003F585195388D10070C39A /* Build configuration list for PBXProject "CNLiveNavigationClass" */ = { | |
| 591 | + isa = XCConfigurationList; | |
| 592 | + buildConfigurations = ( | |
| 593 | + 6003F5BD195388D20070C39A /* Debug */, | |
| 594 | + 6003F5BE195388D20070C39A /* Release */, | |
| 595 | + ); | |
| 596 | + defaultConfigurationIsVisible = 0; | |
| 597 | + defaultConfigurationName = Release; | |
| 598 | + }; | |
| 599 | + 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveNavigationClass_Example" */ = { | |
| 600 | + isa = XCConfigurationList; | |
| 601 | + buildConfigurations = ( | |
| 602 | + 6003F5C0195388D20070C39A /* Debug */, | |
| 603 | + 6003F5C1195388D20070C39A /* Release */, | |
| 604 | + ); | |
| 605 | + defaultConfigurationIsVisible = 0; | |
| 606 | + defaultConfigurationName = Release; | |
| 607 | + }; | |
| 608 | + 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveNavigationClass_Tests" */ = { | |
| 609 | + isa = XCConfigurationList; | |
| 610 | + buildConfigurations = ( | |
| 611 | + 6003F5C3195388D20070C39A /* Debug */, | |
| 612 | + 6003F5C4195388D20070C39A /* Release */, | |
| 613 | + ); | |
| 614 | + defaultConfigurationIsVisible = 0; | |
| 615 | + defaultConfigurationName = Release; | |
| 616 | + }; | |
| 617 | +/* End XCConfigurationList section */ | |
| 618 | + }; | |
| 619 | + rootObject = 6003F582195388D10070C39A /* Project object */; | |
| 620 | +} | ... | ... |
Example/CNLiveNavigationClass.xcodeproj/xcshareddata/xcschemes/CNLiveNavigationClass-Example.xcscheme
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass.xcodeproj/xcshareddata/xcschemes/CNLiveNavigationClass-Example.xcscheme | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<Scheme | |
| 3 | + LastUpgradeVersion = "0720" | |
| 4 | + version = "1.3"> | |
| 5 | + <BuildAction | |
| 6 | + parallelizeBuildables = "YES" | |
| 7 | + buildImplicitDependencies = "YES"> | |
| 8 | + <BuildActionEntries> | |
| 9 | + <BuildActionEntry | |
| 10 | + buildForTesting = "YES" | |
| 11 | + buildForRunning = "YES" | |
| 12 | + buildForProfiling = "YES" | |
| 13 | + buildForArchiving = "YES" | |
| 14 | + buildForAnalyzing = "YES"> | |
| 15 | + <BuildableReference | |
| 16 | + BuildableIdentifier = "primary" | |
| 17 | + BlueprintIdentifier = "6003F589195388D20070C39A" | |
| 18 | + BuildableName = "CNLiveNavigationClass_Example.app" | |
| 19 | + BlueprintName = "CNLiveNavigationClass_Example" | |
| 20 | + ReferencedContainer = "container:CNLiveNavigationClass.xcodeproj"> | |
| 21 | + </BuildableReference> | |
| 22 | + </BuildActionEntry> | |
| 23 | + </BuildActionEntries> | |
| 24 | + </BuildAction> | |
| 25 | + <TestAction | |
| 26 | + buildConfiguration = "Debug" | |
| 27 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |
| 28 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |
| 29 | + shouldUseLaunchSchemeArgsEnv = "YES"> | |
| 30 | + <Testables> | |
| 31 | + <TestableReference | |
| 32 | + skipped = "NO"> | |
| 33 | + <BuildableReference | |
| 34 | + BuildableIdentifier = "primary" | |
| 35 | + BlueprintIdentifier = "6003F5AD195388D20070C39A" | |
| 36 | + BuildableName = "CNLiveNavigationClass_Tests.xctest" | |
| 37 | + BlueprintName = "CNLiveNavigationClass_Tests" | |
| 38 | + ReferencedContainer = "container:CNLiveNavigationClass.xcodeproj"> | |
| 39 | + </BuildableReference> | |
| 40 | + </TestableReference> | |
| 41 | + </Testables> | |
| 42 | + <MacroExpansion> | |
| 43 | + <BuildableReference | |
| 44 | + BuildableIdentifier = "primary" | |
| 45 | + BlueprintIdentifier = "6003F589195388D20070C39A" | |
| 46 | + BuildableName = "CNLiveNavigationClass_Example.app" | |
| 47 | + BlueprintName = "CNLiveNavigationClass_Example" | |
| 48 | + ReferencedContainer = "container:CNLiveNavigationClass.xcodeproj"> | |
| 49 | + </BuildableReference> | |
| 50 | + </MacroExpansion> | |
| 51 | + <AdditionalOptions> | |
| 52 | + </AdditionalOptions> | |
| 53 | + </TestAction> | |
| 54 | + <LaunchAction | |
| 55 | + buildConfiguration = "Debug" | |
| 56 | + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | |
| 57 | + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | |
| 58 | + launchStyle = "0" | |
| 59 | + useCustomWorkingDirectory = "NO" | |
| 60 | + ignoresPersistentStateOnLaunch = "NO" | |
| 61 | + debugDocumentVersioning = "YES" | |
| 62 | + debugServiceExtension = "internal" | |
| 63 | + allowLocationSimulation = "YES"> | |
| 64 | + <BuildableProductRunnable | |
| 65 | + runnableDebuggingMode = "0"> | |
| 66 | + <BuildableReference | |
| 67 | + BuildableIdentifier = "primary" | |
| 68 | + BlueprintIdentifier = "6003F589195388D20070C39A" | |
| 69 | + BuildableName = "CNLiveNavigationClass_Example.app" | |
| 70 | + BlueprintName = "CNLiveNavigationClass_Example" | |
| 71 | + ReferencedContainer = "container:CNLiveNavigationClass.xcodeproj"> | |
| 72 | + </BuildableReference> | |
| 73 | + </BuildableProductRunnable> | |
| 74 | + <AdditionalOptions> | |
| 75 | + </AdditionalOptions> | |
| 76 | + </LaunchAction> | |
| 77 | + <ProfileAction | |
| 78 | + buildConfiguration = "Release" | |
| 79 | + shouldUseLaunchSchemeArgsEnv = "YES" | |
| 80 | + savedToolIdentifier = "" | |
| 81 | + useCustomWorkingDirectory = "NO" | |
| 82 | + debugDocumentVersioning = "YES"> | |
| 83 | + <BuildableProductRunnable | |
| 84 | + runnableDebuggingMode = "0"> | |
| 85 | + <BuildableReference | |
| 86 | + BuildableIdentifier = "primary" | |
| 87 | + BlueprintIdentifier = "6003F589195388D20070C39A" | |
| 88 | + BuildableName = "CNLiveNavigationClass_Example.app" | |
| 89 | + BlueprintName = "CNLiveNavigationClass_Example" | |
| 90 | + ReferencedContainer = "container:CNLiveNavigationClass.xcodeproj"> | |
| 91 | + </BuildableReference> | |
| 92 | + </BuildableProductRunnable> | |
| 93 | + </ProfileAction> | |
| 94 | + <AnalyzeAction | |
| 95 | + buildConfiguration = "Debug"> | |
| 96 | + </AnalyzeAction> | |
| 97 | + <ArchiveAction | |
| 98 | + buildConfiguration = "Release" | |
| 99 | + revealArchiveInOrganizer = "YES"> | |
| 100 | + </ArchiveAction> | |
| 101 | +</Scheme> | ... | ... |
Example/CNLiveNavigationClass/Base.lproj/LaunchScreen.storyboard
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/Base.lproj/LaunchScreen.storyboard | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM"> | |
| 3 | + <device id="retina4_7" orientation="portrait"> | |
| 4 | + <adaptation id="fullscreen"/> | |
| 5 | + </device> | |
| 6 | + <dependencies> | |
| 7 | + <deployment identifier="iOS"/> | |
| 8 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | |
| 9 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |
| 10 | + </dependencies> | |
| 11 | + <scenes> | |
| 12 | + <!--View Controller--> | |
| 13 | + <scene sceneID="EHf-IW-A2E"> | |
| 14 | + <objects> | |
| 15 | + <viewController id="01J-lp-oVM" sceneMemberID="viewController"> | |
| 16 | + <layoutGuides> | |
| 17 | + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> | |
| 18 | + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> | |
| 19 | + </layoutGuides> | |
| 20 | + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> | |
| 21 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
| 22 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
| 23 | + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
| 24 | + </view> | |
| 25 | + </viewController> | |
| 26 | + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
| 27 | + </objects> | |
| 28 | + <point key="canvasLocation" x="53" y="375"/> | |
| 29 | + </scene> | |
| 30 | + </scenes> | |
| 31 | +</document> | ... | ... |
Example/CNLiveNavigationClass/Base.lproj/Main.storyboard
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/Base.lproj/Main.storyboard | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="whP-gf-Uak"> | |
| 3 | + <device id="retina4_7" orientation="portrait"> | |
| 4 | + <adaptation id="fullscreen"/> | |
| 5 | + </device> | |
| 6 | + <dependencies> | |
| 7 | + <deployment identifier="iOS"/> | |
| 8 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | |
| 9 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | |
| 10 | + </dependencies> | |
| 11 | + <scenes> | |
| 12 | + <!--View Controller--> | |
| 13 | + <scene sceneID="wQg-tq-qST"> | |
| 14 | + <objects> | |
| 15 | + <viewController id="whP-gf-Uak" customClass="CNLIVEViewController" sceneMemberID="viewController"> | |
| 16 | + <layoutGuides> | |
| 17 | + <viewControllerLayoutGuide type="top" id="uEw-UM-LJ8"/> | |
| 18 | + <viewControllerLayoutGuide type="bottom" id="Mvr-aV-6Um"/> | |
| 19 | + </layoutGuides> | |
| 20 | + <view key="view" contentMode="scaleToFill" id="TpU-gO-2f1"> | |
| 21 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | |
| 22 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | |
| 23 | + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | |
| 24 | + </view> | |
| 25 | + </viewController> | |
| 26 | + <placeholder placeholderIdentifier="IBFirstResponder" id="tc2-Qw-aMS" userLabel="First Responder" sceneMemberID="firstResponder"/> | |
| 27 | + </objects> | |
| 28 | + <point key="canvasLocation" x="305" y="433"/> | |
| 29 | + </scene> | |
| 30 | + </scenes> | |
| 31 | +</document> | ... | ... |
Example/CNLiveNavigationClass/CNLIVEAppDelegate.h
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/CNLIVEAppDelegate.h | |
| 1 | +// | |
| 2 | +// CNLIVEAppDelegate.h | |
| 3 | +// CNLiveNavigationClass | |
| 4 | +// | |
| 5 | +// Created by dawanzi on 12/14/2019. | |
| 6 | +// Copyright (c) 2019 dawanzi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +@import UIKit; | |
| 10 | + | |
| 11 | +@interface CNLIVEAppDelegate : UIResponder <UIApplicationDelegate> | |
| 12 | + | |
| 13 | +@property (strong, nonatomic) UIWindow *window; | |
| 14 | + | |
| 15 | +@end | ... | ... |
Example/CNLiveNavigationClass/CNLIVEAppDelegate.m
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/CNLIVEAppDelegate.m | |
| 1 | +// | |
| 2 | +// CNLIVEAppDelegate.m | |
| 3 | +// CNLiveNavigationClass | |
| 4 | +// | |
| 5 | +// Created by dawanzi on 12/14/2019. | |
| 6 | +// Copyright (c) 2019 dawanzi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "CNLIVEAppDelegate.h" | |
| 10 | +#import "CNLIVEViewController.h" | |
| 11 | +#import "CNNavigationController.h" | |
| 12 | +@implementation CNLIVEAppDelegate | |
| 13 | + | |
| 14 | +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
| 15 | +{ | |
| 16 | + self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; | |
| 17 | + self.window.backgroundColor = [UIColor whiteColor]; | |
| 18 | + CNLIVEViewController *vc = [[CNLIVEViewController alloc]init]; | |
| 19 | + CNNavigationController *nav = [[CNNavigationController alloc]initWithRootViewController:vc]; | |
| 20 | + self.window.rootViewController = nav; | |
| 21 | + [self.window makeKeyAndVisible]; | |
| 22 | + // Override point for customization after application launch. | |
| 23 | + return YES; | |
| 24 | +} | |
| 25 | + | |
| 26 | +- (void)applicationWillResignActive:(UIApplication *)application | |
| 27 | +{ | |
| 28 | + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. | |
| 29 | + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. | |
| 30 | +} | |
| 31 | + | |
| 32 | +- (void)applicationDidEnterBackground:(UIApplication *)application | |
| 33 | +{ | |
| 34 | + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. | |
| 35 | + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. | |
| 36 | +} | |
| 37 | + | |
| 38 | +- (void)applicationWillEnterForeground:(UIApplication *)application | |
| 39 | +{ | |
| 40 | + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. | |
| 41 | +} | |
| 42 | + | |
| 43 | +- (void)applicationDidBecomeActive:(UIApplication *)application | |
| 44 | +{ | |
| 45 | + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. | |
| 46 | +} | |
| 47 | + | |
| 48 | +- (void)applicationWillTerminate:(UIApplication *)application | |
| 49 | +{ | |
| 50 | + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. | |
| 51 | +} | |
| 52 | + | |
| 53 | +@end | ... | ... |
Example/CNLiveNavigationClass/CNLIVEViewController.h
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/CNLIVEViewController.h | |
| 1 | +// | |
| 2 | +// CNLIVEViewController.h | |
| 3 | +// CNLiveNavigationClass | |
| 4 | +// | |
| 5 | +// Created by dawanzi on 12/14/2019. | |
| 6 | +// Copyright (c) 2019 dawanzi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +@import UIKit; | |
| 10 | + | |
| 11 | +@interface CNLIVEViewController : UIViewController | |
| 12 | + | |
| 13 | +@end | ... | ... |
Example/CNLiveNavigationClass/CNLIVEViewController.m
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/CNLIVEViewController.m | |
| 1 | +// | |
| 2 | +// CNLIVEViewController.m | |
| 3 | +// CNLiveNavigationClass | |
| 4 | +// | |
| 5 | +// Created by dawanzi on 12/14/2019. | |
| 6 | +// Copyright (c) 2019 dawanzi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +#import "CNLIVEViewController.h" | |
| 10 | +@interface CNLIVEViewController () | |
| 11 | + | |
| 12 | +@end | |
| 13 | + | |
| 14 | +@implementation CNLIVEViewController | |
| 15 | + | |
| 16 | +- (void)viewDidLoad | |
| 17 | +{ | |
| 18 | + [super viewDidLoad]; | |
| 19 | + // Do any additional setup after loading the view, typically from a nib. | |
| 20 | +} | |
| 21 | + | |
| 22 | +- (void)didReceiveMemoryWarning | |
| 23 | +{ | |
| 24 | + [super didReceiveMemoryWarning]; | |
| 25 | + // Dispose of any resources that can be recreated. | |
| 26 | +} | |
| 27 | + | |
| 28 | +@end | ... | ... |
Example/CNLiveNavigationClass/CNLiveNavigationClass-Info.plist
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/CNLiveNavigationClass-Info.plist | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| 3 | +<plist version="1.0"> | |
| 4 | +<dict> | |
| 5 | + <key>CFBundleDevelopmentRegion</key> | |
| 6 | + <string>en</string> | |
| 7 | + <key>CFBundleDisplayName</key> | |
| 8 | + <string>${PRODUCT_NAME}</string> | |
| 9 | + <key>CFBundleExecutable</key> | |
| 10 | + <string>${EXECUTABLE_NAME}</string> | |
| 11 | + <key>CFBundleIdentifier</key> | |
| 12 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | |
| 13 | + <key>CFBundleInfoDictionaryVersion</key> | |
| 14 | + <string>6.0</string> | |
| 15 | + <key>CFBundleName</key> | |
| 16 | + <string>${PRODUCT_NAME}</string> | |
| 17 | + <key>CFBundlePackageType</key> | |
| 18 | + <string>APPL</string> | |
| 19 | + <key>CFBundleShortVersionString</key> | |
| 20 | + <string>1.0</string> | |
| 21 | + <key>CFBundleSignature</key> | |
| 22 | + <string>????</string> | |
| 23 | + <key>CFBundleVersion</key> | |
| 24 | + <string>1.0</string> | |
| 25 | + <key>LSRequiresIPhoneOS</key> | |
| 26 | + <true/> | |
| 27 | + <key>UILaunchStoryboardName</key> | |
| 28 | + <string>LaunchScreen</string> | |
| 29 | + <key>UIMainStoryboardFile</key> | |
| 30 | + <string>Main</string> | |
| 31 | + <key>UIRequiredDeviceCapabilities</key> | |
| 32 | + <array> | |
| 33 | + <string>armv7</string> | |
| 34 | + </array> | |
| 35 | + <key>UISupportedInterfaceOrientations</key> | |
| 36 | + <array> | |
| 37 | + <string>UIInterfaceOrientationPortrait</string> | |
| 38 | + <string>UIInterfaceOrientationLandscapeLeft</string> | |
| 39 | + <string>UIInterfaceOrientationLandscapeRight</string> | |
| 40 | + </array> | |
| 41 | + <key>UISupportedInterfaceOrientations~ipad</key> | |
| 42 | + <array> | |
| 43 | + <string>UIInterfaceOrientationPortrait</string> | |
| 44 | + <string>UIInterfaceOrientationPortraitUpsideDown</string> | |
| 45 | + <string>UIInterfaceOrientationLandscapeLeft</string> | |
| 46 | + <string>UIInterfaceOrientationLandscapeRight</string> | |
| 47 | + </array> | |
| 48 | +</dict> | |
| 49 | +</plist> | ... | ... |
Example/CNLiveNavigationClass/CNLiveNavigationClass-Prefix.pch
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/CNLiveNavigationClass-Prefix.pch | |
| 1 | +// | |
| 2 | +// Prefix header | |
| 3 | +// | |
| 4 | +// The contents of this file are implicitly included at the beginning of every source file. | |
| 5 | +// | |
| 6 | + | |
| 7 | +#import <Availability.h> | |
| 8 | + | |
| 9 | +#ifndef __IPHONE_5_0 | |
| 10 | +#warning "This project uses features only available in iOS SDK 5.0 and later." | |
| 11 | +#endif | |
| 12 | + | |
| 13 | +#ifdef __OBJC__ | |
| 14 | + @import UIKit; | |
| 15 | + @import Foundation; | |
| 16 | +#endif | ... | ... |
Example/CNLiveNavigationClass/Images.xcassets/AppIcon.appiconset/Contents.json
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/Images.xcassets/AppIcon.appiconset/Contents.json | |
| 1 | +{ | |
| 2 | + "images" : [ | |
| 3 | + { | |
| 4 | + "idiom" : "iphone", | |
| 5 | + "size" : "20x20", | |
| 6 | + "scale" : "2x" | |
| 7 | + }, | |
| 8 | + { | |
| 9 | + "idiom" : "iphone", | |
| 10 | + "size" : "20x20", | |
| 11 | + "scale" : "3x" | |
| 12 | + }, | |
| 13 | + { | |
| 14 | + "idiom" : "iphone", | |
| 15 | + "size" : "29x29", | |
| 16 | + "scale" : "2x" | |
| 17 | + }, | |
| 18 | + { | |
| 19 | + "idiom" : "iphone", | |
| 20 | + "size" : "29x29", | |
| 21 | + "scale" : "3x" | |
| 22 | + }, | |
| 23 | + { | |
| 24 | + "idiom" : "iphone", | |
| 25 | + "size" : "40x40", | |
| 26 | + "scale" : "2x" | |
| 27 | + }, | |
| 28 | + { | |
| 29 | + "idiom" : "iphone", | |
| 30 | + "size" : "40x40", | |
| 31 | + "scale" : "3x" | |
| 32 | + }, | |
| 33 | + { | |
| 34 | + "idiom" : "iphone", | |
| 35 | + "size" : "60x60", | |
| 36 | + "scale" : "2x" | |
| 37 | + }, | |
| 38 | + { | |
| 39 | + "idiom" : "iphone", | |
| 40 | + "size" : "60x60", | |
| 41 | + "scale" : "3x" | |
| 42 | + }, | |
| 43 | + { | |
| 44 | + "idiom" : "ipad", | |
| 45 | + "size" : "20x20", | |
| 46 | + "scale" : "1x" | |
| 47 | + }, | |
| 48 | + { | |
| 49 | + "idiom" : "ipad", | |
| 50 | + "size" : "20x20", | |
| 51 | + "scale" : "2x" | |
| 52 | + }, | |
| 53 | + { | |
| 54 | + "idiom" : "ipad", | |
| 55 | + "size" : "29x29", | |
| 56 | + "scale" : "1x" | |
| 57 | + }, | |
| 58 | + { | |
| 59 | + "idiom" : "ipad", | |
| 60 | + "size" : "29x29", | |
| 61 | + "scale" : "2x" | |
| 62 | + }, | |
| 63 | + { | |
| 64 | + "idiom" : "ipad", | |
| 65 | + "size" : "40x40", | |
| 66 | + "scale" : "1x" | |
| 67 | + }, | |
| 68 | + { | |
| 69 | + "idiom" : "ipad", | |
| 70 | + "size" : "40x40", | |
| 71 | + "scale" : "2x" | |
| 72 | + }, | |
| 73 | + { | |
| 74 | + "idiom" : "ipad", | |
| 75 | + "size" : "76x76", | |
| 76 | + "scale" : "1x" | |
| 77 | + }, | |
| 78 | + { | |
| 79 | + "idiom" : "ipad", | |
| 80 | + "size" : "76x76", | |
| 81 | + "scale" : "2x" | |
| 82 | + }, | |
| 83 | + { | |
| 84 | + "idiom" : "ipad", | |
| 85 | + "size" : "83.5x83.5", | |
| 86 | + "scale" : "2x" | |
| 87 | + }, | |
| 88 | + { | |
| 89 | + "idiom" : "ios-marketing", | |
| 90 | + "size" : "1024x1024", | |
| 91 | + "scale" : "1x" | |
| 92 | + } | |
| 93 | + ], | |
| 94 | + "info" : { | |
| 95 | + "version" : 1, | |
| 96 | + "author" : "xcode" | |
| 97 | + } | |
| 98 | +} | ... | ... |
Example/CNLiveNavigationClass/en.lproj/InfoPlist.strings
0 → 100644
Example/CNLiveNavigationClass/main.m
0 → 100644
| 1 | +++ a/Example/CNLiveNavigationClass/main.m | |
| 1 | +// | |
| 2 | +// main.m | |
| 3 | +// CNLiveNavigationClass | |
| 4 | +// | |
| 5 | +// Created by dawanzi on 12/14/2019. | |
| 6 | +// Copyright (c) 2019 dawanzi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +@import UIKit; | |
| 10 | +#import "CNLIVEAppDelegate.h" | |
| 11 | + | |
| 12 | +int main(int argc, char * argv[]) | |
| 13 | +{ | |
| 14 | + @autoreleasepool { | |
| 15 | + return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class])); | |
| 16 | + } | |
| 17 | +} | ... | ... |
Example/Podfile
0 → 100644
| 1 | +++ a/Example/Podfile | |
| 1 | +use_frameworks! | |
| 2 | +source 'https://github.com/CocoaPods/Specs.git' | |
| 3 | +source 'http://bj.gitlab.cnlive.com/ios-team/CNLiveRepos.git' | |
| 4 | +platform :ios, '9.0' | |
| 5 | + | |
| 6 | +target 'CNLiveNavigationClass_Example' do | |
| 7 | + pod 'CNLiveNavigationClass', :path => '../' | |
| 8 | + | |
| 9 | + target 'CNLiveNavigationClass_Tests' do | |
| 10 | + inherit! :search_paths | |
| 11 | + | |
| 12 | + | |
| 13 | + end | |
| 14 | +end | |
| 15 | + | ... | ... |
Example/Tests/Tests-Info.plist
0 → 100644
| 1 | +++ a/Example/Tests/Tests-Info.plist | |
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| 3 | +<plist version="1.0"> | |
| 4 | +<dict> | |
| 5 | + <key>CFBundleDevelopmentRegion</key> | |
| 6 | + <string>en</string> | |
| 7 | + <key>CFBundleExecutable</key> | |
| 8 | + <string>${EXECUTABLE_NAME}</string> | |
| 9 | + <key>CFBundleIdentifier</key> | |
| 10 | + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> | |
| 11 | + <key>CFBundleInfoDictionaryVersion</key> | |
| 12 | + <string>6.0</string> | |
| 13 | + <key>CFBundlePackageType</key> | |
| 14 | + <string>BNDL</string> | |
| 15 | + <key>CFBundleShortVersionString</key> | |
| 16 | + <string>1.0</string> | |
| 17 | + <key>CFBundleSignature</key> | |
| 18 | + <string>????</string> | |
| 19 | + <key>CFBundleVersion</key> | |
| 20 | + <string>1</string> | |
| 21 | +</dict> | |
| 22 | +</plist> | ... | ... |
Example/Tests/Tests-Prefix.pch
0 → 100644
Example/Tests/Tests.m
0 → 100644
| 1 | +++ a/Example/Tests/Tests.m | |
| 1 | +// | |
| 2 | +// CNLiveNavigationClassTests.m | |
| 3 | +// CNLiveNavigationClassTests | |
| 4 | +// | |
| 5 | +// Created by dawanzi on 12/14/2019. | |
| 6 | +// Copyright (c) 2019 dawanzi. All rights reserved. | |
| 7 | +// | |
| 8 | + | |
| 9 | +@import XCTest; | |
| 10 | + | |
| 11 | +@interface Tests : XCTestCase | |
| 12 | + | |
| 13 | +@end | |
| 14 | + | |
| 15 | +@implementation Tests | |
| 16 | + | |
| 17 | +- (void)setUp | |
| 18 | +{ | |
| 19 | + [super setUp]; | |
| 20 | + // Put setup code here. This method is called before the invocation of each test method in the class. | |
| 21 | +} | |
| 22 | + | |
| 23 | +- (void)tearDown | |
| 24 | +{ | |
| 25 | + // Put teardown code here. This method is called after the invocation of each test method in the class. | |
| 26 | + [super tearDown]; | |
| 27 | +} | |
| 28 | + | |
| 29 | +- (void)testExample | |
| 30 | +{ | |
| 31 | + XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); | |
| 32 | +} | |
| 33 | + | |
| 34 | +@end | |
| 35 | + | ... | ... |
Example/Tests/en.lproj/InfoPlist.strings
0 → 100644
LICENSE
0 → 100644
| 1 | +++ a/LICENSE | |
| 1 | +Copyright (c) 2019 dawanzi <1427945373@qq.com> | |
| 2 | + | |
| 3 | +Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 4 | +of this software and associated documentation files (the "Software"), to deal | |
| 5 | +in the Software without restriction, including without limitation the rights | |
| 6 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| 7 | +copies of the Software, and to permit persons to whom the Software is | |
| 8 | +furnished to do so, subject to the following conditions: | |
| 9 | + | |
| 10 | +The above copyright notice and this permission notice shall be included in | |
| 11 | +all copies or substantial portions of the Software. | |
| 12 | + | |
| 13 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 14 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 15 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 16 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 17 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
| 18 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 19 | +THE SOFTWARE. | ... | ... |
README.md
0 → 100644
| 1 | +++ a/README.md | |
| 1 | +# CNLiveNavigationClass | |
| 2 | + | |
| 3 | +[](https://travis-ci.org/dawanzi/CNLiveNavigationClass) | |
| 4 | +[](https://cocoapods.org/pods/CNLiveNavigationClass) | |
| 5 | +[](https://cocoapods.org/pods/CNLiveNavigationClass) | |
| 6 | +[](https://cocoapods.org/pods/CNLiveNavigationClass) | |
| 7 | + | |
| 8 | +## Example | |
| 9 | + | |
| 10 | +To run the example project, clone the repo, and run `pod install` from the Example directory first. | |
| 11 | + | |
| 12 | +## Requirements | |
| 13 | + | |
| 14 | +## Installation | |
| 15 | + | |
| 16 | +CNLiveNavigationClass is available through [CocoaPods](https://cocoapods.org). To install | |
| 17 | +it, simply add the following line to your Podfile: | |
| 18 | + | |
| 19 | +```ruby | |
| 20 | +pod 'CNLiveNavigationClass' | |
| 21 | +``` | |
| 22 | + | |
| 23 | +## Author | |
| 24 | + | |
| 25 | +dawanzi, 1427945373@qq.com | |
| 26 | + | |
| 27 | +## License | |
| 28 | + | |
| 29 | +CNLiveNavigationClass is available under the MIT license. See the LICENSE file for more info. | ... | ... |
_Pods.xcodeproj
0 → 120000