Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit b9476a2

Browse files
authored
Use correct selector in a BottomSheetViewController call (#128)
2 parents aa6da98 + 683f716 commit b9476a2

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ _None._
4848

4949
_None._
5050

51+
## 1.13.1
52+
53+
### Bug Fixes
54+
55+
- Addresses a crash in the `BottomSheetViewController` that was occurring due to an incorrect usage of a selector. The crash was caused by trying to call the `buttonPressed` instance method as a class method on `BottomSheetViewController.self`.
56+
5157
## 1.13.0
5258

5359
### New Features

Sources/WordPressUI/BottomSheet/BottomSheetViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ public class BottomSheetViewController: UIViewController {
9191
fatalError("init(coder:) has not been implemented")
9292
}
9393

94-
private var gripButton: UIButton = {
94+
private lazy var gripButton: UIButton = {
9595
let button = GripButton()
9696
button.translatesAutoresizingMaskIntoConstraints = false
9797
button.addTarget(
98-
BottomSheetViewController.self,
98+
self,
9999
action: #selector(buttonPressed),
100100
for: .touchUpInside
101101
)

WordPressUI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Pod::Spec.new do |s|
44
s.name = 'WordPressUI'
5-
s.version = '1.13.0'
5+
s.version = '1.13.1'
66

77
s.summary = 'Home of reusable WordPress UI components.'
88
s.description = <<-DESC

0 commit comments

Comments
 (0)