kmikael/PBWebViewController
소개
가볍고 간단하며 사용자 지정할 수 있는 iOS용 웹 브라우저 컴포넌트입니다.
생산성 및 자동화측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalPBWebViewController
PBWebViewController is a light-weight, simple and customizable web browser component for iOS.
It's just 2 source files, image-free, around 300 lines of code and has been built with modern Cocoa development techniques.

Installation
Just drag the PBWebViewController folder to your project or add pod 'PBWebViewController' to your Podfile.
Usage
PBWebViewController works on iPhone and iPad, in all orientations and is meant to be used in a UINavigationController.
All you need to do is set up it's properties and then push it. Here's a simple example:
// Initialize the web view controller and set it's URL
self.webViewController = [[PBWebViewController alloc] init];
self.webViewController.URL = [NSURL URLWithString:@"http://www.apple.com"];
// These are custom UIActivity subclasses that will show up in the UIActivityViewController
// when the action button is clicked
PBSafariActivity *activity = [[PBSafariActivity alloc] init];
self.webViewController.applicationActivities = @[activity];
// This property also corresponds to the same one on UIActivityViewController
// Both properties do not need to be set unless you want custom actions
self.webViewController.excludedActivityTypes = @[UIActivityTypeMail, UIActivityTypeMessage, UIActivityTypePostToWeibo];
// Push it
[self.navigationController pushViewController:self.webViewController animated:YES];
See the example project for more advanced usage.
Subclassing Notes
PBWebViewController can safely be subclassed to implement custom behavior.
Override load and the UIWebViewDelegate methods to hook in,
just don't forget to call super to take advantage of what PBWebViewController provides.
A simple subclass is used in the example project.
Notes on custom activity items and application activities
PBWebViewController sets the current URL as the only activity item, if none or provided,
otherwise the activity items you provide are used.
You can fully customize everything that shows up when the action button is clicked this way.
Another way to achieve the same result is to override activityItems and applicationActivities in a subclass.
Check out the action: method in PBWebViewController.m for more details.
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
관련 프로젝트 살펴보기
불러오는 중…