One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| Valid keys: [ | |
| "display", | |
| "width", | |
| "height", | |
| "top", | |
| "left", | |
| "right", | |
| "bottom", | |
| "minWidth", | |
| "maxWidth", |
| let version = Bundle.main.infoDictionary["CFBundleShortVersionString"] as! String | |
| releaseVersionLabel.text = "v\(version)" |
| 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 |
| 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 |
| 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" |
| 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 |
| 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) { |
| // | |
| // 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" |