Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我看到很多答案说您不能在设置包中添加带有操作的按钮,但我看到了
Nike + iPod应用程序执行此操作,并且该操作正在打开 url,当它关闭/打开时,他们也在切换视图上执行操作
这就是你所需要的:
... <key>cell</key> <string>PSButtonCell</string> <key>action</key> <string>buttonCellClicked:</string> ...
这将制作一个按钮单元格并buttonCellClicked:在首选项视图控制器上发送消息。
buttonCellClicked: