/CYWebViewController

CYWebViewController扩展于UIWebview分为两种模式,一种是类似微信内置浏览器模式,一种是Safari浏览器模式。类似微信内置浏览器,顶部导航栏提供webview后退和关闭按钮.Safari模式,底部toolbar带有前进,后退,分享,刷新的功能. 添加了NJKWebViewProgress,显示进度条,包含了HEX颜色转为RGB颜色,以及自定义导航栏返回按钮 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

Primary LanguageObjective-CMIT LicenseMIT

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];