GithubHelp home page GithubHelp logo

985317733 / rxwebviewcontroller Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roxasora/rxwebviewcontroller

0.0 1.0 0.0 7.29 MB

实现类似微信的 webView 导航效果,包括进度条,左滑返回上个网页或者直接关闭,就像 UINavigationController

Objective-C 100.00%

rxwebviewcontroller's Introduction

RxWebViewController

####更新-15.12.9 为了解决普通 viewController 会出现的各种 pop 问题,弃用之前的 category 形式,改为子类化了 UINavigationController,所以大家需要继承 RxWebViewNavigationViewController 作为你的 navigationController!

####Update - 15.12.9 In order to solve the issues of pop normal viewControllers ,I've deprecated the category in RXWebViewController and added the subclass of UINavigationController, so you need subclass the RxWebViewNavigationViewController as your custom navigationController


###it's a custom UIWebViewController that navigate like navigationController,just like wechat do. ###实现类似微信的webView导航效果,左滑返回上个网页,就像UINavigationController

like the screen shot gif

image

usage使用

###Install 安装


You just need to drag/copy the "RxWebViewController" folder and drop in your project 将“RxWebViewController”文件夹拖进你的工程中即可

###init and push


usage is simple

####-------WARNING-------- first,you should subclass a navigationController

	#import "RxWebViewNavigationViewController.h"

	@interface myNavigationViewController : RxWebViewNavigationViewController

	@end

then use webviewController as normal viewController

	NSString* urlStr = @"http://github.com";
	RxWebViewController* webViewController = [[RxWebViewController alloc] initWithUrl:[NSURL URLWithString:urlStr]];
	[self.navigationController pushViewController:webViewController animated:YES];

####and if you want to do some custom things with webview,just subclass it 如果你需要webview的更进一步自定义,子类化即可

	@interface myWebViewController : RxWebViewController

	//do your custom things

	@end

####navigation bar tint color and back button style 导航栏的颜色和返回按钮样式

导航栏中出现的 返回 和 关闭 ,均会继承你的 navigationController 中对 navigationBar 的设置,比如:

	UIColor* tintColor = [UIColor whiteColor];
	UIColor* barTintColor = [UIColor blueColor];
	self.navigationController.navigationBar.tintColor = tintColor;
	self.navigationController.navigationBar.barTintColor = barTintColor;
	[self.navigationController.navigationBar setTitleTextAttributes:@{                                                          			NSForegroundColorAttributeName:tintColor
                                                                  }];

这样来自定义你的navigationBar各控件颜色,webViewController中会遵循此设置,如图 image

也可以像微信那样在你的 navigationBar 中使用自定义的 backButtonBackgroundImage,如图

image

###Thanks


I used NJKWebViewProgress to make navigation progress, it helps a lot

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.