How to set content offset and content size in a UIWebView

前端 未结 5 2223
抹茶落季
抹茶落季 2020-12-05 14:48

I have had to change a UIScrollView into a UIWebView due to formatting reasons.

There is a problem though that I need to be able to get the

5条回答
  •  被撕碎了的回忆
    2020-12-05 15:32

    This problem can be solved quite easily:

    [[webView scrollView] setContentInset:UIEdgeInsetsMake(64, 0, 44, 0)];
    

    Remember that UIEdgeInset is different from CGRect!
    A guide on UIEdgeInset can be found in the iOS Developer Library.

提交回复
热议问题