If you allow the user to move back and forward through the webpage history,then you can use the 07001 and 07002 methods as actions for buttons. Use the 07003 and 07004 propertIEs to disable the buttons when the user can’t move in a direction.
然后设置按钮将使用addTarget:action:forControlEvents:
(如Sven所指出):
[myBackbutton addTarget:myWebVIEw action:@selector(goBack) forControlEvents:UIControlEventtouchDown];
如果您希望根据canGoBack和canGoForward属性获得想象并启用/禁用按钮,则必须向UIController添加一些KVO通知.
总结以上是内存溢出为你收集整理的iphone – 如何以编程方式为UIWebView创建后退,前进和刷新按钮?全部内容,希望文章能够帮你解决iphone – 如何以编程方式为UIWebView创建后退,前进和刷新按钮?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)