Skip to content

Commit

Permalink
Update README to reflect latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexandre Santos committed Feb 5, 2020
1 parent ef32692 commit c4ff4ed
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ pod 'UILabel+Copyable', '~> 2.0'

Just import the module: `import UILabel_Copyable` and then set the `isCopyingEnabled` property to `true`:

Swift:
```swift
let label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 100, height: 30))
label.isCopyingEnabled = true
[self.view addSubview:label];
view.addSubview(label)
```

Objective-C:
```objective-c
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
label.isCopyingEnabled = YES;
Expand All @@ -39,13 +40,14 @@ label.isCopyingEnabled = YES;
The same thing can be done with IBOutlet UILabel:
```objective-c
@property (nonatomic, weak) IBOutlet UILabel *label;
....
Swift:
```swift
import UILabel_Copyable
self.label.isCopyingEnabled = enabled;
@IBOutlet weak var label: UILabel?
// ...
label?.isCopyingEnabled = true
```

Included is a demo project showing how to use it from a storyboard.
Expand Down

0 comments on commit c4ff4ed

Please sign in to comment.