Skip to content

Commit

Permalink
[Catalog] Add @objc annotations to our containerScheme instances in …
Browse files Browse the repository at this point in the history
…Swift (#7243)

We need to add @objc annotations to the containerScheme instances in our Swift examples, because we moved to Swift 4.2, the respondsToSelector won't find the setContainerScheme: setter otherwise.
  • Loading branch information
yarneo authored and jverkoey committed Apr 23, 2019
1 parent c31adb6 commit 52da482
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Expand Up @@ -23,7 +23,7 @@ import MaterialComponents.MaterialActionSheet_Theming

class ActionSheetSwiftExampleViewController: UIViewController {

var containerScheme: MDCContainerScheming = MDCContainerScheme()
@objc var containerScheme: MDCContainerScheming = MDCContainerScheme()

let tableView = UITableView()
enum ActionSheetExampleType {
Expand Down
2 changes: 1 addition & 1 deletion components/Cards/examples/CardExampleViewController.swift
Expand Up @@ -23,7 +23,7 @@ class CardExampleViewController: UIViewController {
@IBOutlet weak var card: MDCCard!
@IBOutlet weak var button: MDCButton!

var containerScheme: MDCContainerScheming
@objc var containerScheme: MDCContainerScheming

override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
containerScheme = MDCContainerScheme()
Expand Down
Expand Up @@ -31,7 +31,7 @@ class EditReorderCollectionViewController: UIViewController,
collectionViewLayout: UICollectionViewFlowLayout())
var toggle = ToggleMode.edit

var containerScheme: MDCContainerScheming
@objc var containerScheme: MDCContainerScheming

override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
containerScheme = MDCContainerScheme()
Expand Down
Expand Up @@ -41,7 +41,7 @@ class EditReorderShapedCollectionViewController: UIViewController,
UICollectionViewDataSource,
UICollectionViewDelegateFlowLayout {

var containerScheme: MDCContainerScheming
@objc var containerScheme: MDCContainerScheming

override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
containerScheme = MDCContainerScheme()
Expand Down
Expand Up @@ -29,7 +29,7 @@ class DialogsAlertComparisonExample: UIViewController {
private let materialButton = MDCButton()
private let themedButton = MDCButton()
private let uikitButton = MDCButton()
var containerScheme: MDCContainerScheming = MDCContainerScheme()
@objc var containerScheme: MDCContainerScheming = MDCContainerScheme()

override func viewDidLoad() {
super.viewDidLoad()
Expand Down
Expand Up @@ -27,7 +27,7 @@ import MaterialComponents.MaterialPalettes

class DialogsAlertCustomizationExampleViewController: MDCCollectionViewController {

var containerScheme: MDCContainerScheming = MDCContainerScheme()
@objc var containerScheme: MDCContainerScheming = MDCContainerScheme()

let kReusableIdentifierItem = "customCell"

Expand Down
Expand Up @@ -63,7 +63,7 @@ class DialogsCustomShadowExampleViewController: UIViewController {

let textButton = MDCButton()
let transitionController = MDCDialogTransitionController()
var containerScheme: MDCContainerScheming = MDCContainerScheme()
@objc var containerScheme: MDCContainerScheming = MDCContainerScheme()

override func viewDidLoad() {
super.viewDidLoad()
Expand Down
Expand Up @@ -23,7 +23,7 @@ import MaterialComponentsBeta.MaterialDialogs_Theming
class DialogsLongAlertExampleViewController: UIViewController {

let textButton = MDCButton()
var containerScheme: MDCContainerScheming = MDCContainerScheme()
@objc var containerScheme: MDCContainerScheming = MDCContainerScheme()

override func viewDidLoad() {
super.viewDidLoad()
Expand Down
Expand Up @@ -32,7 +32,7 @@ class CardCellsWithRippleExample: UIViewController,
collectionViewLayout: UICollectionViewFlowLayout())
var toggle = ToggleMode.edit

var containerScheme: MDCContainerScheming
@objc var containerScheme: MDCContainerScheming

var colorScheme: MDCColorScheming {
return containerScheme.colorScheme
Expand Down
2 changes: 1 addition & 1 deletion components/Ripple/examples/CardWithRippleExample.swift
Expand Up @@ -22,7 +22,7 @@ class CardWithRippleExample: UIViewController {
var card = MDCCard()
var button = MDCButton()

var containerScheme: MDCContainerScheming
@objc var containerScheme: MDCContainerScheming

override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
card.enableRippleBehavior = true
Expand Down

0 comments on commit 52da482

Please sign in to comment.