• Stars
    star
    226
  • Rank 176,514 (Top 4 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 9 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

除 UINavigationController 外最流行的 NavigationController!

LCNavigationController

Travis CocoaPods CocoaPods CocoaPods LeoDev

除 UINavigationController 外最流行的 NavigationController!

by http://LeoDev.me

by http://LeoDev.me

In me the tiger sniffs the rose.

心有猛虎,细嗅蔷薇。

欢迎访问 我的博客http://LeoDev.me

前言 Foreword

效果参考 App:腾讯新闻、百度音乐等等

⚠️ 项目目前存在一些不足,表现在 viewController 层级相对较多时出现一些卡顿,我会抽空重新思考换一套实现方式,此前不建议集成到大型项目中!

配合UITabBarController使用请参考 tabbar 分支!

效果图:

by http://LeoDev.me

代码 Code

当成UINavigationController来用就行!方法都一样!

配合UITabBarController使用请参考 tabbar 分支!

  • 两种导入方法:

    • 方法一:CocoaPods 导入:pod 'LCNavigationController'
    • 方法二:导入LCNavigationController文件夹到你的项目中 (文件夹在 Demo 中可以找到)
  • AppDelegate.m中,#import "LCNavigationController.h",参考如下代码:

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
        self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
        [self.window makeKeyAndVisible];
    
        UIViewController *mainVC = [UIStoryboard storyboardWithName:@"Main" bundle:nil].instantiateInitialViewController;
    
        LCNavigationController *navC = [[LCNavigationController alloc] initWithRootViewController:mainVC];
    
        self.window.rootViewController = navC;
    
        return YES;
    }
  • 在你需要用到的地方#import "LCNavigationController.h",然后:

    // 1. Push
    UIViewController *childVC = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"TwoVC"];
    [self.lcNavigationController pushViewController:childVC];
    
    // 2. Pop
    [self.lcNavigationController popViewController];
    
    // 3. Pop to rootViewController
    [self.lcNavigationController popToRootViewController];
  • 可自定义的参数(在LCNavigationController.m中):

    static const CGFloat LCAnimationDuration = 0.50f;   // Push / Pop 动画持续时间
    
    static const CGFloat LCMaxBlackMaskAlpha = 0.80f;   // 黑色背景透明度
    
    static const CGFloat LCZoomRatio         = 0.90f;   // 后面视图缩放比
    
    static const CGFloat LCShadowOpacity     = 0.80f;   // 滑动返回时当前视图的阴影透明度
    
    static const CGFloat LCShadowRadius      = 8.00f;   // 滑动返回时当前视图的阴影半径
  • 搞定!

更新日志 Update Logs

V 1.0.6 2016.04.05

  • 更新 CocoaPods 源。

V 1.0.2 2015.11.24

  • 提供配合UITabBarController使用的 Demo,详见 tabbar 分支。

  • 更新自定义参数。

V 1.0.0 2015.11.20

  • 初始化提交。

联系 Support

授权 License

本项目采用 MIT license 开源,你可以利用采用该协议的代码做任何事情,只需要继续继承 MIT 协议即可。

More Repositories

1

LCActionSheet

一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
Objective-C
821
star
2

LCTabBarController

A amazing and highly customized tabBarController! You could almost customize 100% properties with LCTabBarController!
Objective-C
385
star
3

LCDownloadManager

一个简单易用的下载助手。基于AFN,实现断点续传,采取Block方式回调下载进度、文件大小、下载是否完成等。
Objective-C
183
star
4

LCBannerView

A very popular and highly customized banner view! Infinite loop support!
Objective-C
159
star
5

LCNewFeature

几行代码快速集成新特性界面!
Objective-C
108
star
6

LCProgressHUD

一个超简单的活动指示器。适配横屏。
Objective-C
102
star
7

XXWB

当初学习 iOS 开发时写的小小微博,高仿新浪微博首页!仅供学习哈!请阅读下方必读!!!!
Objective-C
59
star
8

LCCoolHUD

一款酷酷的 HUD。
Objective-C
28
star
9

ReusableProtocol

A helpful and pure Swift implemented library for registering and reusing cells or views in the table view and collection view.
Swift
27
star
10

LCPaintView

🖌 Paint view for iOS.
Objective-C
20
star
11

Xia

🌟 Naughty flexible alert view above the navigation bar.
Swift
19
star
12

LCBlur

Quick way to add blur effect ~
Objective-C
18
star
13

ShakeDemo

摇一摇Demo
Objective-C
17
star
14

ApplePayDemo

 Pay Demo with Swift.
Swift
17
star
15

LCLoadingHUD

彩虹加载指示器。
Objective-C
16
star
16

WeChat

基于XMPP模仿微信App进行IM(即时聊天)开发,并适配iPad、iOS7。(暂停开发,有空再讲……)
Objective-C
14
star
17

SearchBarDemo

Objective-C
13
star
18

LCTipView

An individuality tip view.
Objective-C
11
star
19

LCUtils

个人在开发中使用的工具类。
Objective-C
10
star
20

Grids

⚠️ UIStackView IS A BETTER SOLUTION. 🏁 Grids layout, making views equidistant. Base on SnapKit.
Swift
7
star
21

Da

🌟 Naughty flexible alert view. Like QQ's.
Swift
5
star
22

LCAlertView

Using UIAlertView with Block!
Objective-C
3
star
23

FMDBDemo

A demo for FMDB.
Objective-C
3
star
24

DaXia

🍰 Naughty flexible alert view :) Contains Da and Xia.
Ruby
3
star
25

WebVC

UIWebView + 自定义 Request 的 Header 中添加键值对 KeyValues
Objective-C
1
star
26

UIAlertViewDemo

How to implement the UIAlertView of the system?
Objective-C
1
star
27

FileShareDemo

Demo for share files with iTunes.
Swift
1
star
28

LEONetworkKit

LEONetworkKit is a part of LEOKit. Have fun!
Objective-C
1
star
29

XcodeConfigs

Inspiration from: https://github.com/johnil/xcode_configs
1
star
30

LCCalendarView

For LanMeng Tec.
Objective-C
1
star
31

LCWebViewController

一个带进度条、带工具条、可高度自定义的浏览器!
Objective-C
1
star