{"id":2985,"url":"https://github.com/meismyles/SwiftWebVC","last_synced_at":"2025-08-03T12:31:52.417Z","repository":{"id":34603433,"uuid":"38551448","full_name":"meismyles/SwiftWebVC","owner":"meismyles","description":"A drop-in inline browser for your Swift iOS app.","archived":false,"fork":false,"pushed_at":"2021-07-05T08:21:03.000Z","size":503,"stargazers_count":329,"open_issues_count":23,"forks_count":117,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-01T01:23:22.651Z","etag":null,"topics":["browser","cocoapods","ios","swift","webview"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meismyles.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-07-05T00:09:06.000Z","updated_at":"2024-10-22T12:48:45.000Z","dependencies_parsed_at":"2022-08-03T21:45:25.024Z","dependency_job_id":null,"html_url":"https://github.com/meismyles/SwiftWebVC","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meismyles%2FSwiftWebVC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meismyles%2FSwiftWebVC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meismyles%2FSwiftWebVC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meismyles%2FSwiftWebVC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meismyles","download_url":"https://codeload.github.com/meismyles/SwiftWebVC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228543241,"owners_count":17934449,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","cocoapods","ios","swift","webview"],"created_at":"2024-01-05T20:16:28.198Z","updated_at":"2024-12-07T00:31:10.029Z","avatar_url":"https://github.com/meismyles.png","language":"Swift","funding_links":[],"categories":["UI"],"sub_categories":["Web View","Layout","Other free courses"],"readme":"# SwiftWebVC\n\nSwiftWebVC is a simple inline browser for your Swift iOS app.\n\n![SwiftWebVC](https://cloud.githubusercontent.com/assets/6603912/8509772/e1a1f2b6-22b0-11e5-878d-273b5b17b95a.png)\n\n**SwiftWebVC features:**\n\n* iPhone and iPad distinct UIs\n* Full landscape orientation support\n* Back, forward, stop/refresh and share buttons\n* Open in Safari and Chrome UIActivities\n* Navbar title set to the currently visible web page\n* Talks with `setNetworkActivityIndicatorVisible`\n* 3 different themes to choose from when presented modally\n\n![SwiftWebVC](https://cloud.githubusercontent.com/assets/6603912/8509773/e1a33ab8-22b0-11e5-93e4-c671934f55e5.png)\n\n## Installation\n\n**CocoaPods**\n\n* SwiftWebVC is available through [CocoaPods](http://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'SwiftWebVC'\n```\n\n**Carthage**\n\n[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\n$ brew update\n$ brew install carthage\n```\n\nTo integrate SwiftWebVC into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"meismyles/SwiftWebVC\"\n```\n\nRun `carthage update` to build the framework and drag the built `SwiftWebVC.framework` into your Xcode project.\n\n**Manual**\n\n* Add the `SwiftWebVC/` folder into your project.\n\n## Usage\n\nJust like any UIViewController, SwiftWebVC can be pushed into a UINavigationController stack:\n\n```swift\nlet webVC = SwiftWebVC(urlString: \"http://google.com\")\nself.navigationController?.pushViewController(webVC, animated: true)\n```\n\nIt can be presented modally using `SwiftModalWebVC`:\n\n```swift\nlet webVC = SwiftModalWebVC(urlString: \"http://google.com\")\nself.present(webVC, animated: true, completion: nil)\n```\n\n### Options\n\nThe share button can be disabled by passing a flag in to the constructor to specify this:\n```swift\nlet webVC = SwiftWebVC(urlString: \"http://google.com\", sharingEnabled: false)\n```\nThe same principal applies for the modal implementation also:\n```swift\nlet webVC = SwiftModalWebVC(urlString: \"http://google.com\", sharingEnabled: false)\n```\n\n#### Modal Options Only\nThemes may be chosen for the modal implementation. The default theme is `Light-Blue`. Other modal themes `Light-Black` and `Dark` may be chosen using one of the following instead:\n\n```swift\nlet webVC = SwiftModalWebVC(urlString: \"http://google.com\", theme: .lightBlack)\nlet webVC = SwiftModalWebVC(urlString: \"http://google.com\", theme: .dark)\n```\n\n\n\n## Delegate (Start/Finish Loading Callbacks)\n\nSwiftWebVC also includes a delegate protocol that allows you to implement `didStartLoading` and `didFinishLoading` functions to determine when loading starts and finishes.\n\n_Note: This is currently only implemented for `SwiftWebVC`, **not** `SwiftModalWebVC`._\n\nTo implement this, after declaring your instance of `SwiftWebVC`, set it's delegate and implement the callback functions. For example:\n\n**Inititalisation**\n\n```swift\nlet webVC = SwiftWebVC(urlString: \"https://www.google.com\")\nwebVC.delegate = self\nself.navigationController?.pushViewController(webVC, animated: true)\n```\n\n**Delegate Implementation**\n```swift\nextension ViewController: SwiftWebVCDelegate {\n    \n    func didStartLoading() {\n        print(\"Started loading.\")\n    }\n    \n    func didFinishLoading(success: Bool) {\n        print(\"Finished loading. Success: \\(success).\")\n    }\n}\n```\n\n### SwiftWebVCActivity\n\nStarting in iOS 6 Apple uses `UIActivity` to let you show additional sharing methods in share sheets. `SwiftWebVC` comes with \"Open in Safari\" and \"Open in Chrome\" activities. You can easily add your own activity by subclassing `SwiftWebVCActivity` which takes care of a few things automatically for you. Have a look at the Safari and Chrome activities for implementation examples.Typed\n\n\n## Credits\n\nSwiftWebVC is a Swift implementation of [Sam Vermette's SVWebViewController](https://github.com/samvermette/SVWebViewController/). Code transcription, updates and changes were carried out by Myles Ringle. The original SVWebViewController was brought to you by [Sam Vermette](http://samvermette.com) and [contributors to the project](https://github.com/samvermette/SVWebViewController/contributors).\n\nIf you have feature suggestions or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/meismyles/SwiftWebVC/issues/new). If you're using SwiftWebVC in your project, attribution is always appreciated.\n\nThanks to [Icons8](https://icons8.com/) for the images.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeismyles%2FSwiftWebVC","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeismyles%2FSwiftWebVC","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeismyles%2FSwiftWebVC/lists"}