Latest 0.0.2
License MIT
Platforms ios , requires ARC

更新-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.


like the screen shot gif



Install 安装

You just need to drag/copy the "RxWebViewController" folder and drop in your project

init and push

usage is simple

——-WARNING——– first,you should subclass a navigationController

    #import "RxWebViewNavigationViewController.h"

    @interface myNavigationViewController : RxWebViewNavigationViewController


then use webviewController as normal viewController

    NSString* urlStr = @"";
    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


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 中使用自定义的 backButtonBackgroundImage,如图



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

Latest podspec

    "name": "RxWebViewController",
    "version": "0.0.2",
    "summary": "A Wechat like WebView with back gesture and progress",
    "description": "it's a custom UIWebViewController that navigate like navigationController,just like wechat do",
    "homepage": "",
    "screenshots": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Horsley Lee": "[email protected]"
    "platforms": {
        "ios": null
    "source": {
        "git": "",
        "tag": "0.0.2"
    "source_files": "RxWebViewController/*.{h,m}",
    "requires_arc": true

Pin It on Pinterest

Share This