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
e -l Swift -- let $brokenView = unsafeBitCast(0x7fc5deca3910, to: UIView.self) | |
e -l Swift -- print($brokenView) | |
// <UIView: 0x7fc5df0a9400; frame = (0 55; 375 585); .....> |
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
// We could highlight it to make it easier to find | |
e -l Swift -- $label.backgroundColor = .red | |
// Or update its text | |
e -l Swift -- $label.text = "This is new text for a label" |
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
// We can also print it's constraints | |
e -l Swift -- print($label.constraints) | |
// [<NSContentSizeLayoutConstraint:0x6000031550e0 UILabel:0x7f913f90b7e0'All skills'.width == 95.5 Hug:251 CompressionResistance:750 (active)>, <NSContentSizeLayoutConstraint:0x600003155140 UILabel:0x7f913f90b7e0'All skills'.height == 33.5 Hug:251 CompressionResistance:750 (active)>] | |
// Or even modify its priorities | |
e -l Swift -- $label.constraints[0].constant = 100 |
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
e -l Swift -- import MyNotesApp | |
e -l Swift -- let $syncView = unsafeBitCast(0x6000031550e0, to: SyncView.self) | |
// Read custom properties | |
e -l Swift -- print($syncView.syncState) | |
// Call your custom functions | |
e -l Swift -- $syncView.showSyncCompleted() |
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 BaseViewController: UIViewController { | |
var loadingView: UIView? | |
/// Called when the interactive view controller popping gesture is attempted from the right hand side. | |
/// The view controller should override this if it wants to change its behaviour. | |
/// | |
/// - Returns: true if you want to prevent the interactive gesture. | |
func preventInteractivePopGesture() -> Bool { | |
let isNavBarVisible: Bool = navController?.isNavigationBarHidden == 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
// | |
// KeyboardLayoutConstraint.swift | |
// TemplateProject | |
// | |
// Created by Adam Wareing on 12/08/19. | |
// Licenced under MIT. | |
// | |
// Based off: https://raw.githubusercontent.com/MengTo/Spring/master/Spring/KeyboardLayoutConstraint.swift | |
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
// | |
// TestViewModel.swift | |
// Test | |
// | |
// Created by Adam Wareing on 11/8/2023. | |
// | |
import UIKit | |
/// Model for storing a section and its contents |
OlderNewer