swift 中的相同位置 2 个按钮?
Same location 2 buttons in swift?
我在 playerviewcontroller 中有 2 个按钮(记录和停止在同一位置)。我在面板上隐藏了停止按钮。我想让记录按钮点击动作然后隐藏记录按钮并显示停止按钮。但它给我错误。
malloc:* 对象 0x14e1c010 错误:未分配正在释放的指针
* 在 malloc_error_break 设置断点调试
You better use the same button for two purpose. Create a flag which stores the state. I.e. playing or paused. And do task according to the flag.
Then you wouldn't need to hide/show buttons.
我在 playerviewcontroller 中有 2 个按钮(记录和停止在同一位置)。我在面板上隐藏了停止按钮。我想让记录按钮点击动作然后隐藏记录按钮并显示停止按钮。但它给我错误。
malloc:* 对象 0x14e1c010 错误:未分配正在释放的指针 * 在 malloc_error_break 设置断点调试
You better use the same button for two purpose. Create a flag which stores the state. I.e. playing or paused. And do task according to the flag. Then you wouldn't need to hide/show buttons.