- Its better to use existing functions than to create your own
- Its better to add functionality to existing types than to create new types.
- Remove unused code.
- Give ui tests a timeout, longer for ci
- following conventions for teams.
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
// No Model in names | |
/* | |
throw an error when a class or struct is added that doesn't | |
use the word model in the name, and isn't a subclass of a | |
UIViewController, nor UIView, nor view, uiviewRepresentable, | |
codable or observer. | |
*/ | |
import UIKit |
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 QRCodeTarotUITests: XCTestCase { | |
override func setUpWithError() throws { | |
// Put setup code here. This method is called before the invocation of each test method in the class. | |
// In UI tests it is usually best to stop immediately when a failure occurs. | |
continueAfterFailure = false | |
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. | |
} |
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
// | |
// WeirdIssue.swift | |
// QRCodeTarot | |
// | |
// Created by Scott Lydon on 9/24/22. | |
// | |
import SwiftUI | |
struct WeirdIssue: View { |
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
struct TestText: View { | |
var body: some View { | |
HStack(alignment: .firstTextBaseline) { | |
Text("Hello world") | |
Spacer() | |
} | |
} | |
} |
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
struct TestText: View { | |
var body: some View { | |
VStack(alignment: .leading) { | |
Text("Hello world") | |
} | |
} | |
} | |
struct TestText: View { |
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 | |
extension UINavigationController { | |
// - MARK: Extracted reusable methods so that implementation changes reflect wherever used. | |
func viewController() { | |
navigationController.pushViewController(ViewController.instantiate(), animated: false) | |
} | |
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 UINavigationController { | |
// - MARK: Extracted reusable methods so that implementation changes reflect wherever used. | |
func viewController() { | |
navigationController.pushViewController(ViewController.instantiate(), animated: false) | |
} | |
func buySubscription() { | |
navigationController.pushViewController(BuyViewController.instantiate(), animated: true) |
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
@IBAction func buyTapped(_ sender: Any) { | |
coordinator?.buySubscription(payload: "payload here") | |
} | |
// ------------------------------- | |
func buySubscription(payload: String) { | |
let vc = BuyViewController.instantiate() | |
vc.payload = payload | |
vc.coordinator = self |
NewerOlder