Skip to content

Commit

Permalink
Use #selector instead of string based Selector() - Swift 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
polqf committed Apr 8, 2016
1 parent a47da7e commit e2a27a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Demo/FillableLoaders-Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ViewController: UIViewController {
segmentedControl.backgroundColor = UIColor.whiteColor()
segmentedControl.tintColor = UIColor(white: 0.2, alpha: 1)
segmentedControl.frame = CGRectMake(margin, height - margin - 40, width - margin*2, 40)
segmentedControl.addTarget(self, action: "segmentedControlTouch:", forControlEvents: .ValueChanged)
segmentedControl.addTarget(self, action: #selector(segmentedControlTouch), forControlEvents: .ValueChanged)
window!.addSubview(segmentedControl)

button.frame = CGRectMake(0, 0, 150, 35)
Expand All @@ -52,7 +52,7 @@ class ViewController: UIViewController {
button.setTitle("Change Logo", forState: .Normal)
button.setTitleColor(UIColor.blackColor(), forState: .Normal)
button.titleLabel?.font = UIFont.systemFontOfSize(14)
button.addTarget(self, action: "changeLogo", forControlEvents: .TouchUpInside)
button.addTarget(self, action: #selector(changeLogo), forControlEvents: .TouchUpInside)
window!.addSubview(button)
}

Expand Down

0 comments on commit e2a27a1

Please sign in to comment.