• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

TransitApp/SVWebViewController: A drop-in inline browser for your iOS app.

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

TransitApp/SVWebViewController

开源软件地址:

https://github.com/TransitApp/SVWebViewController

开源编程语言:

Objective-C 97.2%

开源软件介绍:

SVWebViewController

SVWebViewController is a simple inline browser for your iOS 7 app.

SVWebViewController

SVWebViewController features:

  • iPhone and iPad distinct UIs
  • full landscape orientation support
  • back, forward, stop/refresh and share buttons
  • Open in Safari and Chrome UIActivities
  • navbar title set to the currently visible web page
  • talks with setNetworkActivityIndicatorVisible

Installation

CocoaPods

I'm not a big fan of CocoaPods, so tend to not keep it updated. If you really want to use SVWebViewController with CocoaPods, I suggest you use pod 'SVWebViewController', :head to pull from the master branch directly. I'm usually careful about what I push there and is the version I use myself in all my projects.

Manually

  • Drag the SVWebViewController/SVWebViewController folder into your project.
  • #import "SVWebViewController.h"

Usage

(see sample Xcode project in /Demo)

Just like any UIViewController, SVWebViewController can be pushed into a UINavigationController stack:

SVWebViewController *webViewController = [[SVWebViewController alloc] initWithAddress:@"http://google.com"];
[self.navigationController pushViewController:webViewController animated:YES];

It can also be presented modally using SVModalWebViewController:

SVModalWebViewController *webViewController = [[SVModalWebViewController alloc] initWithAddress:@"http://google.com"];
[self presentViewController:webViewController animated:YES completion:NULL];

SVWebViewControllerActivity

Starting in iOS 6 Apple uses UIActivity to let you show additional sharing methods in share sheets. SVWebViewController comes with "Open in Safari" and "Open in Chrome" activities. You can easily add your own activity by subclassing SVWebViewControllerActivity which takes care of a few things automatically for you. Have a look at the Safari and Chrome activities for implementation examples. Feel free to send it as a pull request once you're done!

Credits

SVWebViewController is brought to you by Sam Vermette and contributors to the project. If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by creating new issues. If you're using SVWebViewController in your project, attribution is always appreciated.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap