-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
36 changed files
with
2,339 additions
and
16 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
...kEvaluation.xcodeproj/xcuserdata/vincent.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Bucket | ||
type = "1" | ||
version = "2.0"> | ||
</Bucket> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" systemVersion="17A277" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r"> | ||
<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="IKi-TQ-uoJ"> | ||
<device id="retina4_7" orientation="portrait"> | ||
<adaptation id="fullscreen"/> | ||
</device> | ||
<dependencies> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> | ||
<capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||
<deployment identifier="iOS"/> | ||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/> | ||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
</dependencies> | ||
<scenes> | ||
<!--Navigation Controller--> | ||
<scene sceneID="AWe-KI-XTh"> | ||
<objects> | ||
<navigationController id="IKi-TQ-uoJ" sceneMemberID="viewController"> | ||
<navigationBar key="navigationBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="zSm-1S-Nom"> | ||
<rect key="frame" x="0.0" y="20" width="375" height="44"/> | ||
<autoresizingMask key="autoresizingMask"/> | ||
</navigationBar> | ||
<connections> | ||
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="aUq-sN-llJ"/> | ||
</connections> | ||
</navigationController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="Eqq-bP-JLc" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="-713" y="10"/> | ||
</scene> | ||
<!--View Controller--> | ||
<scene sceneID="tne-QT-ifu"> | ||
<objects> | ||
<viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController"> | ||
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController"> | ||
<layoutGuides> | ||
<viewControllerLayoutGuide type="top" id="cbC-IX-LnD"/> | ||
<viewControllerLayoutGuide type="bottom" id="2t5-lV-XDj"/> | ||
</layoutGuides> | ||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | ||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> | ||
</view> | ||
<navigationItem key="navigationItem" id="lCS-v3-mKe"/> | ||
</viewController> | ||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | ||
</objects> | ||
<point key="canvasLocation" x="52" y="10"/> | ||
</scene> | ||
</scenes> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
// | ||
// VHLNavigation.h | ||
// VHLNavigation | ||
// | ||
// Created by vincent on 2017/8/23. | ||
// Copyright © 2017年 Darnel Studio. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <UIKit/UIKit.h> | ||
|
||
@interface UIColor (VHLNavigation) | ||
|
||
/** 全局设置导航栏背景颜色 */ | ||
+ (void)vhl_setDefaultNavBackgroundColor:(UIColor *)color; | ||
/** 全局设置导航栏按钮颜色 */ | ||
+ (void)vhl_setDefaultNavBarTintColor:(UIColor *)color; | ||
/** 全局设置导航栏标题颜色 */ | ||
+ (void)vhl_setDefaultNavBarTitleColor:(UIColor *)color; | ||
/** 全局设置导航栏黑色分割线是否隐藏*/ | ||
+ (void)vhl_setDefaultNavBarShadowImageHidden:(BOOL)hidden; | ||
/** 全局设置状态栏样式*/ | ||
+ (void)vhl_setDefaultStatusBarStyle:(UIStatusBarStyle)style; | ||
|
||
@end | ||
|
||
// ----------------------------------------------------------------------------- | ||
@interface UINavigationBar (VHLNavigation) | ||
|
||
/** 设置当前 NavigationBar 背景图片*/ | ||
- (void)vhl_setBackgroundImage:(UIImage *)image; | ||
/** 设置当前 NavigationBar 背景颜色*/ | ||
- (void)vhl_setBackgroundColor:(UIColor *)color; | ||
/** 设置当前 NavigationBar 背景透明度*/ | ||
- (void)vhl_setBackgroundAlpha:(CGFloat)alpha; | ||
/** 设置当前 NavigationBar 底部分割线是否隐藏*/ | ||
- (void)vhl_setShadowImageHidden:(BOOL)hidden; | ||
/** 设置当前 NavigationBar _UINavigationBarBackIndicatorView (默认的返回箭头)是否隐藏*/ | ||
- (void)vhl_setBarBackIndicatorViewHidden:(BOOL)hidden; | ||
/** 设置导航栏所有 barButtonItem 的透明度*/ | ||
- (void)vhl_setBarButtonItemsAlpha:(CGFloat)alpha hasSystemBackIndicator:(BOOL)hasSystemBackIndicator; | ||
|
||
/** 设置当前 NavigationBar 垂直方向上的平移距离*/ | ||
- (void)vhl_setTranslationY:(CGFloat)translationY; | ||
/** 获取当前导航栏垂直方向上偏移了多少*/ | ||
- (CGFloat)vhl_getTranslationY; | ||
|
||
@end | ||
|
||
// ----------------------------------------------------------------------------- | ||
typedef NS_ENUM(NSInteger, VHLNavigationSwitchStyle) { | ||
VHLNavigationSwitchStyleTransition = 0, // 颜色过渡的方式,支付宝个人中心到余额宝切换效果 | ||
VHLNavigationSwitchStyleFakeNavBar = 1, // 两种不同颜色导航栏,类似微信红包 | ||
}; | ||
|
||
/** UIViewController 导航栏扩展 */ | ||
@interface UIViewController (VHLNavigation) | ||
|
||
/** 设置当前导航栏侧滑过渡效果*/ | ||
- (void)vhl_setNavigationSwitchStyle:(VHLNavigationSwitchStyle)style; | ||
- (VHLNavigationSwitchStyle)vhl_navigationSwitchStyle; | ||
|
||
/** 设置当前导航栏是否隐藏,设置隐藏后不会有过渡效果,想要有过渡效果不要隐藏导航栏,而是设置导航栏透明度为 0.0f*/ | ||
- (void)vhl_setNavBarHidden:(BOOL)hidden; | ||
- (BOOL)vhl_navBarHidden; | ||
|
||
/** 设置当前导航栏的背景图片,即使当前导航栏过渡样式为颜色渐变也为执行两种导航栏样式过渡*/ | ||
- (void)vhl_setNavBarBackgroundImage:(UIImage *)image; | ||
- (UIImage *)vhl_navBarBackgroundImage; | ||
|
||
/** 设置当前导航栏的透明度*/ | ||
- (void)vhl_setNavBarBackgroundAlpha:(CGFloat)alpha; | ||
- (CGFloat)vhl_navBarBackgroundAlpha; | ||
|
||
/** 设置当前导航栏 barTintColor(导航栏背景颜色)*/ | ||
- (void)vhl_setNavBackgroundColor:(UIColor *)color; | ||
- (UIColor *)vhl_navBackgroundColor; | ||
|
||
/** 设置当前导航栏 TintColor(导航栏按钮等颜色)*/ | ||
- (void)vhl_setNavBarTintColor:(UIColor *)color; | ||
- (UIColor *)vhl_navBarTintColor; | ||
|
||
/** 设置当前导航栏 titleColor(标题颜色)*/ | ||
- (void)vhl_setNavBarTitleColor:(UIColor *)color; | ||
- (UIColor *)vhl_navBarTitleColor; | ||
|
||
/** 设置当前导航栏 shadowImage(底部分割线)是否隐藏*/ | ||
- (void)vhl_setNavBarShadowImageHidden:(BOOL)hidden; | ||
- (BOOL)vhl_navBarShadowImageHidden; | ||
|
||
/** 设置当前导航栏向上的偏移量(浮动导航栏) 默认0不偏移,(0到44之间,顶部露出状态栏,其他情况不好看)*/ | ||
- (void)vhl_setNavBarTranslationY:(CGFloat)translationY; | ||
- (CGFloat)vhl_navBarTranslationY; | ||
|
||
/** 设置当前状态栏样式 白色/黑色,也可以直接重写 preferredStatusBarStyle */ | ||
- (void)vhl_setStatusBarStyle:(UIStatusBarStyle)style; | ||
- (UIStatusBarStyle)vhl_statusBarStyle; | ||
|
||
/** 获取当前导航栏高度*/ | ||
- (CGFloat)vhl_navgationBarHeight; | ||
/** 获取当前导航栏加状态栏高度*/ | ||
- (CGFloat)vhl_navigationBarAndStatusBarHeight; | ||
|
||
@end | ||
|
||
/** | ||
移动导航栏 / 隐藏系统返回按钮 | ||
[self.navigationController.navigationBar vhl_setTranslationY:(-navBarHeight * progress)]; | ||
[self.navigationController.navigationBar vhl_setBarButtonItemsAlpha:(1 - progress) hasSystemBackIndicator:YES]; | ||
*/ | ||
|
||
/* | ||
// 默认不支持旋转 - 支持设备自动旋转 | ||
- (BOOL)shouldAutorotate { | ||
return NO; | ||
} | ||
// 支持竖屏显示 | ||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations { | ||
return UIInterfaceOrientationMaskPortrait; | ||
} | ||
// 横屏状态栏是否隐藏 | ||
- (BOOL)prefersStatusBarHidden { | ||
return YES; | ||
} | ||
*/ | ||
|
||
/* | ||
associated 关联的 | ||
*/ | ||
|
||
/* | ||
参考学习: | ||
http://www.jianshu.com/p/e3ca1b7b6cec | ||
https://github.com/wangrui460/WRNavigationBar | ||
https://github.com/CrazyGitter/HansNavController | ||
*/ |
Oops, something went wrong.