Skip to content

Commit 599c5fd

Browse files
committed
fix crash
1 parent dc17529 commit 599c5fd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/UIAlertController_Blocks.swift/UIAlertController_Blocks_swift.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public extension UIAlertController {
3737
controller.addAction(destructiveAction)
3838
}
3939
if let otherButtonTitles = otherButtonTitles {
40-
for i in 0...otherButtonTitles.count {
40+
for i in 0...otherButtonTitles.count - 1 {
4141
let otherButtonTitle = otherButtonTitles[i]
4242
let otherAction = UIAlertAction(title: otherButtonTitle, style: .default) { (action) in
4343
tapBlock(controller, action, UIAlertControllerBlocksFirstOtherButtonIndex + i)

UIAlertController_Blocks.swift.podspec

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

22
Pod::Spec.new do |s|
33
s.name = 'UIAlertController_Blocks.swift'
4-
s.version = '1.0.0'
4+
s.version = '1.0.1'
55
s.summary = 'Easy UIAlertController with blocks'
66
s.homepage = 'https://github.com/iBinh/UIAlertController_Blocks.swift'
77
s.license = { :type => 'MIT', :file => 'LICENSE' }

0 commit comments

Comments
 (0)