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 Foo: UIViewController { | |
private let appBarViewController = MDCAppBarNavigationController() | |
var resultsViewController: UIViewController? = nil | |
var additionalPadding: CGFloat = 0 | |
var leadingBarButtonItem: UIBarButtonItem? = nil | |
var trailingBarbuttonItems: [UIBarButtonItem] = [] |
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 | |
import MaterialComponents.MaterialButtons | |
import MaterialComponents.MaterialButtons_Theming | |
import MaterialComponents.MaterialContainerScheme | |
class MDCButtonAccessibilityExampleViewController: UIViewController { | |
@objc var containerScheme: MDCContainerScheming = MDCContainerScheme() | |
let label = UILabel() | |
override func loadView() { |
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 ViewController: UIViewController { | |
let testView = UIView() | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
view.addSubview(testView) |
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 superView = UIView() | |
superView.frame = CGRect(x: 0, y: 0, width: 100, height: 100) | |
let subview = UIView() | |
subview.frame = CGRect(x: 0, y: 0, width: 100, height: 100) | |
superView.addSubview(subview) |
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 const CGFloat safeAreaAmount = 20.f; | |
@interface MDCFakeView : UIView | |
@end | |
@implementation MDCFakeView | |
-(UIEdgeInsets)safeAreaInsets { | |
return UIEdgeInsetsMake(safeAreaAmount, safeAreaAmount, safeAreaAmount, safeAreaAmount); | |
} | |
@end |
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
UIColor *expectedColor = [UIColor.blackColor colorWithAlphaComponent:0.87]; | |
UIColor *titleColor = self.actionSheet.header.titleLabel.textColor; | |
XCTAssertEqualObjects(expectedColor, titleColor); // Doesn't work | |
XCTAssertEqualObjects(self.actionSheet.header.titleLabel.textColor, | |
[UIColor.blackColor colorWithAlphaComponent:0.87]); // Works |
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
protocol Abstract { | |
var numberValue: Int { get } | |
var stringValue: String { get } | |
} | |
class Immuatable: Abstract { | |
let numberValue: Int | |
let stringValue: String | |
init(number: Int, string: String) { | |
numberValue = number |
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 ExampleSwiftController: CatalogByConventions { | |
// All work | |
let properties = CatalogValues() | |
let properties = CatalogValues(breadcrumbs: ["Activity Indicator", "Activity Indicator (Swift)"]) | |
let properties = CatalogValues(primary: true) | |
let properties = CatalogValues(breadcrumbs: ["Activity Indicator", "Activity Indicator (Swift)"], primary: true) | |
} | |
class CatalogValues { | |
var breadcrumbs: [String] |
NewerOlder