Skip to content

Commit

Permalink
updated example snippets, fixed issues with renamings in latest versi…
Browse files Browse the repository at this point in the history
…on of Swift/iOS
  • Loading branch information
digitallysavvy committed Aug 8, 2019
1 parent 2b544ea commit cedc1b4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Add this to `viewDidLoad`

```swift

let recordButton = RecordButton(frame: CGRectMake(0,0,70,70))
let recordButton = RecordButton(frame: CGRect(x: 0,y: 0,width: 70,height: 70))
view.addSubview(recordButton)

```
Expand All @@ -57,8 +57,8 @@ To update progress the RecordButton must be an instance of the class. You should
class ViewController: UIViewController {

var recordButton : RecordButton!
var progressTimer : NSTimer!
var progress : CGFloat! = 0
var progressTimer : Timer!
var progress : CGFloat = 0

// rest of viewController

Expand All @@ -68,8 +68,8 @@ The `recordButton` needs a target for start and stopping the progress timer. Add

```swift

recordButton.addTarget(self, action: #selector(ViewController.record), for: .touchDown)
recordButton.addTarget(self, action: #selector(ViewController.stop), for: UIControlEvents.touchUpInside)
recordButton.addTarget(self, action: #selector(self.record), for: .touchDown)
recordButton.addTarget(self, action: #selector(self.stop), for: UIControl.Event.touchUpInside)

```

Expand Down

0 comments on commit cedc1b4

Please sign in to comment.