This file contains 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"> | |
<div class="row"> | |
<h1 class="text-center"><em>Charles Bukowski</em></h1> | |
<h3 class="text-center"> "O maior poeta da América"</h3> | |
</div> | |
<div class="jumbotron"> | |
<img class="img-responsive center-block img-rounded" src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEhUSExIVFRUVFRUWFRgVFRUVFRUWFRYXFxUVFxUYHSggGBolHRUVITEhJSktLi4uFx8zODMtNygtLisBCgoKBQUFDgUFDisZExkrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrK//AABEIAMIBAwMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAADAAECBAUGBwj/xAA9EAABAwIEAwYDBQcDBQAAAAABAAIRAyEEEjFBBVFhBhMicYGRMqHwB0JyscEUUmKCkqLRI+HxM1OywuL/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/8QAFBEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8A8ychyjFQdTQRTJOTSgM02TQotCMUEGtRWkBM0ItJoKC1SIIRWiFXDI0VyjRJ1QQMxIVrAVHHVWsPhhEI7GgHKgiynN0OrT1K0X0YCt8O4GKzfHUFIEw3NHjdplbJF5geqDmqTmklDr0wJK7TFdk8LhY7+sQ93wgwGkyQBlaXPiWkTAG8qFThGDcx2Qujdz3AEQJOUWJvYAtJMjRB54GSZKHXdNgvS6HD8FkDTh6b5DjJNRrsgIzOJa+NNCQDJ2AAdXodgqVZ00jUpgua003EVCxxdc5gAcgbc5hIJGuiDzU8kNwXYca7 |
This file contains 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
// | |
// Call a soap web service | |
// | |
// Add | |
// NSURLConnectionDelegate | |
// NSXMLParserDelegate | |
class MapViewController: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate, NSURLConnectionDelegate, NSXMLParserDelegate{ | |
@IBOutlet weak var mapKit: MKMapView! | |
var wsUrl : String = "http://mobilewebservice.greenmotion.ch/MobileEvpass.asmx" |
This file contains 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 UIView { | |
func anchorToTop(_ top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil) { | |
anchorWithConstantsToTop(top, left: left, bottom: bottom, right: right, topConstant: 0, leftConstant: 0, bottomConstant: 0, rightConstant: 0) | |
} | |
func anchorWithConstantsToTop(_ top: NSLayoutYAxisAnchor? = nil, left: NSLayoutXAxisAnchor? = nil, bottom: NSLayoutYAxisAnchor? = nil, right: NSLayoutXAxisAnchor? = nil, topConstant: CGFloat = 0, leftConstant: CGFloat = 0, bottomConstant: CGFloat = 0, rightConstant: CGFloat = 0) { |
This file contains 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
switch index { | |
case 0: | |
UIView.animate(withDuration: 0.3, animations: { | |
self.btnIniciarOUTLET.setTitle("Próximo", for: .normal) | |
self.btnIniciarOUTLET.alpha = 1 | |
}) | |
case 1: | |
UIView.animate(withDuration: 0.3, animations: { | |
self.btnIniciarOUTLET.setTitle("Próximo", for: .normal) | |
self.btnIniciarOUTLET.alpha = 1 |
This file contains 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 CollectionViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout { | |
@IBOutlet weak var cv: UICollectionView! | |
let arrayFotos = (1...14).map { | |
UIImage(named: "\($0).jpg") | |
} | |
let cellIdentifier = "CollectionViewCell" |
This file contains 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
let picker: UIPickerView | |
picker = UIPickerView(frame: CGRectMake(0, 200, view.frame.width, 300)) | |
picker.backgroundColor = .whiteColor() | |
picker.showsSelectionIndicator = true | |
picker.delegate = self | |
picker.dataSource = self | |
let toolBar = UIToolbar() | |
toolBar.barStyle = UIBarStyle.Default |
This file contains 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
static func alertMessage(errorMessage: String, controller: UIViewController, title: String) { | |
let alertController = UIAlertController(title: title, message: errorMessage, preferredStyle: .alert) | |
let okAction = UIAlertAction(title: "Ok", style: .default, handler: nil) | |
alertController.addAction(okAction) | |
controller.present(alertController, animated: true, completion: nil) | |
} | |
static func alertMessageNav(errorMessage: String, controller: UIViewController, title: String, cHandler: @escaping (Void)-> () ) { | |
let alertController = UIAlertController(title: title, message: errorMessage, preferredStyle: .alert) | |
let okAction = UIAlertAction(title: "Ok", style: .default, handler: {(action:UIAlertAction) in |
This file contains 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
let version = Bundle.main.infoDictionary["CFBundleShortVersionString"] as! String | |
releaseVersionLabel.text = "v\(version)" |
This file contains 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
Valid keys: [ | |
"display", | |
"width", | |
"height", | |
"top", | |
"left", | |
"right", | |
"bottom", | |
"minWidth", | |
"maxWidth", |
OlderNewer