Latest 1.1.1
Homepage https://github.com/wheying/CYWebViewController
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

CYWebViewController

Contain two mode:wechat browser and Safari browser. A web view controller class for iOS that allows users to view web pages directly within an app similar as wechat.Using Safari mode, contains goBack,goForward,shareAction,refresh and stop function at toolbar

分为两种模式,一种是类似微信内置浏览器模式,一种是Safari浏览器模式。类似微信内置浏览器,顶部导航栏提供webview后退和关闭按钮.Safari模式,底部toolbar带有前进,后退,分享,刷新的功能。

效果:

image image image
image
image
image

使用安装Install:

Cocoapods

pod 'CYWebviewController'

Manual
把项目中的CY文件夹拉近自己的项目就可以了
Pull "CY" file to your project

#import "CYWebViewController.h"

#import "UINavigationBar+Awesome.h"可以设置UINavigationBar

#import "UIButton+WHE.h"

#import "UIButton+WHE.h"自定义返回按钮

#import "UIButton+WHE.h"

#import "UIColor+WHE.h"HEX颜色转为RGB颜色

#import "UIColor+WHE.h"

例子Example:

import

#import "CYWebViewController.h"

使用微信内置浏览器模式
Using Wechat mode

CYWebViewController *controller = [[CYWebViewController alloc] init];
controller.url = @"https://www.baidu.com/";
controller.loadingBarTintColor = [UIColor redColor];
[self.navigationController pushViewController:controller animated:YES];

使用Safari 模式,底部toolbar带有前进,后退,分享,刷新的功能。
Using Safari mode, contains goBack,goForward,shareAction,refresh and stop function at toolbar. Push ViewController

CYWebViewController *controller = [[CYWebViewController alloc] init];
controller.url = [NSURL URLWithString:@"https://www.baidu.com/"];
controller.loadingBarTintColor = [UIColor redColor];
controller.navigationButtonsHidden = NO;
[self.navigationController pushViewController:controller animated:YES];

presentViewController

CYWebViewController *controller = [[CYWebViewController alloc] init];
controller.url = [NSURL URLWithString:@"https://www.baidu.com/"];
controller.loadingBarTintColor = [UIColor redColor];
controller.navigationButtonsHidden = NO;         
[self presentViewController:[[UINavigationController alloc] initWithRootViewController:controller] animated:YES completion:nil];

Latest podspec

{
    "name": "CYWebviewController",
    "version": "1.1.1",
    "summary": "CYWebviewController is a webview view controller.",
    "description": ""CYWebviewController,a UIWebview controller, contains goBack, goForward, refresh and share functions. Also has Wechat mode."",
    "homepage": "https://github.com/wheying/CYWebViewController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "u4e07u9e3fu6069": "[email protected]"
    },
    "source": {
        "git": "https://github.com/wheying/CYWebViewController.git",
        "tag": "1.1.1",
        "commit": "ec84cd558d2c9d7be04a0949448cb91805619f18"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "CYWebviewController/Classes/**/*",
    "public_header_files": "CYWebviewController/Classes/**/*.h",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This