开发者

UIToolbar inside UIWebView

开发者 https://www.devze.com 2023-01-23 22:51 出处:网络
I\'m trying to replicate the safari behavior. A uitoolbar inside a uiwebview that can be scrollable with the开发者_StackOverflow社区 webview content.

I'm trying to replicate the safari behavior. A uitoolbar inside a uiwebview that can be scrollable with the开发者_StackOverflow社区 webview content.

Does anyone knows how to do that? I tried using a scrollview with the toolbar and webview but no success.

My last chance was creating an overlay UIView and pass the touches methods to the uiscrollview, but that does not work.

Any help is appreciated.


UIWebView contains a UISCrollView, you just need to add a UIWebView to your view, then a UIToolBar.

UIWebView* wv = [[UIWebView alloc] initWithFrame:.....];
[yourView addSubview:wv];
UIToolBar* tb = [[UIToolbar alloc] initWithFrame:.....];
[yourView addSubview:tb];
[wv release];
[tb release];
0

精彩评论

暂无评论...
验证码 换一张
取 消