SCLAlertView 添加按钮问题
SCLAlertView Add Button Issue
我在使用 CocoaPod SCLAlertView 时遇到问题。
出于某种原因,"addButton" 具有操作块功能的功能不起作用。当点击 SCLAlertView 中的 "Log Out" 按钮时,操作块中的代码不会执行("log out button tapped" 从不打印并且块中的代码不会执行)。但是,它在我的其他应用程序中使用完全相同的代码。
无效的代码在这里:
这是 SCLAlertView addButton 不起作用的应用程序的 Podfile:
这是 SCLAlertView 正常工作的应用程序的 Podfile:
我应该意识到这就是问题所在。适用于此的 SCLAlertView 的 CocoaPod 版本是 0.8.2,而我的版本停留在 0.8.1,但我没有意识到。只需将其指定为具有以下内容的 pod 版本即可:
pod 'SCLAlertView-Objective-C', '~> 0.8.2'
我在使用 CocoaPod SCLAlertView 时遇到问题。
出于某种原因,"addButton" 具有操作块功能的功能不起作用。当点击 SCLAlertView 中的 "Log Out" 按钮时,操作块中的代码不会执行("log out button tapped" 从不打印并且块中的代码不会执行)。但是,它在我的其他应用程序中使用完全相同的代码。
无效的代码在这里:
这是 SCLAlertView addButton 不起作用的应用程序的 Podfile:
这是 SCLAlertView 正常工作的应用程序的 Podfile:
我应该意识到这就是问题所在。适用于此的 SCLAlertView 的 CocoaPod 版本是 0.8.2,而我的版本停留在 0.8.1,但我没有意识到。只需将其指定为具有以下内容的 pod 版本即可:
pod 'SCLAlertView-Objective-C', '~> 0.8.2'