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
class ViewController: UIViewController { | |
@IBOutlet var button: UIButton! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let hover = UIHoverGestureRecognizer(target: self, action: #selector(hovering(_:))) | |
button.addGestureRecognizer(hover) |
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
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
let splitViewController = window!.rootViewController as! UISplitViewController | |
let navigationController = splitViewController.viewControllers[splitViewController.viewControllers.count-1] as! UINavigationController | |
navigationController.topViewController!.navigationItem.leftBarButtonItem = splitViewController.displayModeButtonItem | |
// Add a translucent background to the primary view controller. | |
splitViewController.primaryBackgroundStyle = .sidebar | |
splitViewController.delegate = self |
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
#if targetEnvironment(macCatalyst) | |
// código referente ao macOS | |
#else | |
// código referente ao iOS | |
#endif |
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
Logos Simulador Suporte | |
Contato pelo email leonardo.aoliveira@icloud.com |
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
Logos Simulador Privacy Policy | |
Information on the app | |
We do not collect any data from our users. The only data used for the app functionalities | |
are stored within the phone. At any moment you can delete the data in the app by deleting the app. |
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
// Retorna a altura das linhas da tabela. | |
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | |
return 250 | |
} |
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
// Retorna o número de itens para a collection. | |
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | |
return 3 | |
} | |
// Provém um objeto de célula para cada item. | |
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | |
// Parte 1: Buscar uma célula do tipo apropriado. | |
let cellCollection = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionCell", for: indexPath) as! 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
import UIKit | |
class CollectionViewCell: UICollectionViewCell { | |
@IBOutlet weak var collectionViewTextLabel: UILabel! | |
} |
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
// MARK: - Table View | |
// Provém um objeto de célula para cada linha. | |
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
// Parte 1: Buscar uma célula do tipo apropriado. | |
let cell = tableView.dequeueReusableCell(withIdentifier: "tableCell", for: indexPath) as! TableViewCell | |
// Parte 2: Configurar o conteúdo da célula. | |
cell.titleLabel!.text = "Título" |
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
class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, UICollectionViewDelegate, UICollectionViewDataSource { | |
// ... | |
} |
NewerOlder