add svweb

This commit is contained in:
wu736139669
2015-04-02 22:17:34 +08:00
parent 187862d8bc
commit da9d1a734f
13 changed files with 143 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/SVModalWebViewController.h
+1
View File
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/SVWebViewController.h
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/UIActivities/SVWebViewControllerActivity.h
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/UIActivities/Chrome/SVWebViewControllerActivityChrome.h
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/UIActivities/Safari/SVWebViewControllerActivitySafari.h
+1
View File
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/SVModalWebViewController.h
+1
View File
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/SVWebViewController.h
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/UIActivities/SVWebViewControllerActivity.h
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/UIActivities/Chrome/SVWebViewControllerActivityChrome.h
@@ -0,0 +1 @@
../../../SVWebViewController/SVWebViewController/UIActivities/Safari/SVWebViewControllerActivitySafari.h
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "DB5173E53068F87F11E8E6C4"
BuildableName = "libPods-SVWebViewController.a"
BlueprintName = "Pods-SVWebViewController"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
+22
View File
@@ -0,0 +1,22 @@
Copyright (c) 2011 Sam Vermette
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+52
View File
@@ -0,0 +1,52 @@
# SVWebViewController
SVWebViewController is a simple inline browser for your iOS 7 app.
![SVWebViewController](http://cl.ly/SQVO/download/GitHub.png)
**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:
```objective-c
SVWebViewController *webViewController = [[SVWebViewController alloc] initWithAddress:@"http://google.com"];
[self.navigationController pushViewController:webViewController animated:YES];
```
It can also be presented modally using `SVModalWebViewController`:
```objective-c
SVModalWebViewController *webViewController = [[SVModalWebViewController alloc] initWithAddress:@"http://google.com"];
[self presentModalViewController: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](http://samvermette.com) and [contributors to the project](https://github.com/samvermette/SVWebViewController/contributors). If you have feature suggestions or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/samvermette/SVWebViewController/issues/new). If you're using SVWebViewController in your project, attribution is always appreciated.