Skip to content

Instantly share code, notes, and snippets.

class WebViewController: UIViewController, WKNavigationDelegate {
override func viewDidLoad() {
super.viewDidLoad()
let webView = WKWebView()
webView.translatesAutoresizingMaskIntoConstraints = false
//webView.delegate = self
view.addSubview(webView)
NSLayoutConstraint.activate([
webView.leftAnchor.constraint(equalTo: view.leftAnchor, constant: 0.0),
@ronaldozanoni
ronaldozanoni / normalize-filenames.js
Last active April 10, 2018 23:54 — forked from danharper/normalize-filenames.js
use Sentry (Raven) on PhoneGap
Raven.config(dsn, {
dataCallback: function(data) {
var normalize = function(filename) {
// sometimes the filename is [native code]
if (filename.indexOf('/www/') !== -1) {
return '~/' + filename.split('/www/', 2)[1];
}
return filename;
@ronaldozanoni
ronaldozanoni / index.html
Created May 25, 2016 17:15
floating label
<div class="float-label-form">
<div class="form-group">
<input type="text" class="form-control input-animation" ng-model="adventureCtrl.adventure.name" id="name" name="name" placeholder="Adventure Name*" maxlength="255" required/>
<label for="name" ng-show='adventureCtrl.adventure.name'>Adventure Name*</label>
<input-line-animation></input-line-animation>
<p class='form-error' ng-show='adventureCtrl.nameError'>There's already an adventure with this name.</p>
</div>
</div>