This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class SimplePickerView : UIPickerView { | |
class SimplePickerViewModel : NSObject, UIPickerViewDelegate, UIPickerViewDataSource { | |
var titles: [String] | |
var selectionHandler: ((_ pickerView: UIPickerView, _ row: Int, _ title: String) -> ())? | |
init(titles: [String], selectionHandler: ((_ pickerView: UIPickerView, _ row: Int, _ title: String) -> ())? = nil) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PickerSource : NSObject, UIPickerViewDelegate, UIPickerViewDataSource { | |
var data: [[String]] = [] | |
var selectionUpdated: ((component: Int, row: Int) -> Void)? | |
// MARK: UIPickerViewDataSource | |
func numberOfComponentsInPickerView(pickerView: UIPickerView) -> Int { | |
return data.count | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Double | |
{ | |
/** | |
* Calc Celcius to Fahrenheit | |
* @return Double value in Fahrenheit | |
*/ | |
func celsiusToFahrenheit() -> Double | |
{ | |
return self * 9 / 5 + 32 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension String | |
{ | |
/** | |
* Return formated currency string by locale with or not round | |
* @see https://developer.apple.com/documentation/foundation/numberformatter, https://developer.apple.com/documentation/foundation/numberformatter.style | |
* @return String if problem on format return string "" | |
*/ | |
func toCurrency(localeItendifier: String = "pt_BR", withRound: Bool = false) -> String{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence | |
(function(win, doc){ | |
if(win.addEventListener)return; //No need to polyfill | |
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}} | |
function addEvent(on, fn, self){ | |
return (self = this).attachEvent('on' + on, function(e){ | |
var e = e || win.event; | |
e.preventDefault = e.preventDefault || function(){e.returnValue = false} | |
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="pt-BR"> | |
<head> | |
<title>BootStrap - Bagual</title> | |
<link href="assets/stylesheets/structure/grid.css" rel="stylesheet"> | |
</head> | |
<body> | |
<!-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="pt-BR"> | |
<head> | |
<title>BootStrap - Bagual</title> | |
<link href="assets/stylesheets/structure/grid.css" rel="stylesheet"> | |
</head> | |
<body> | |
<!-- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container outline"> | |
<div class="row"> | |
<div class="col-1"><p>col-1</p></div> | |
<div class="col-1"><p>col-1</p></div> | |
<div class="col-1"><p>col-1</p></div> | |
<div class="col-1"><p>col-1</p></div> | |
<div class="col-1"><p>col-1</p></div> | |
<div class="col-1"><p>col-1</p></div> | |
</div> | |
<div class="row"> |
NewerOlder