【问题标题】:How to display UIWebView content at the center of my view?如何在我的视图中心显示 UIWebView 内容?
【发布时间】:2014-04-02 08:06:48
【问题描述】:

我有一个 UIWebview,它占据了我的视图中的所有位置。我的内容在顶部,但我没有更改 UIWebview 内容的代码,我想在所有设备(IOS6/IOS7)的视图中心(位置 2)显示我的 UIWebview,我该怎么做在我的 UIWebview 中使用良好的参数或操作来做到这一点?

我使用 xib 文件。 我的视图不使用 AutoLayout。

感谢提前

【问题讨论】:

标签: ios iphone objective-c uiwebview splash-screen


【解决方案1】:

您可以通过编程方式...

CGRect viewrect = view.bounds.

webview.center = CGPointMake(viewrect.size.width/2,viewrect.size.height/2);

试试看。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-24
    • 2021-11-19
    • 2016-12-21
    • 1970-01-01
    • 2016-11-21
    • 1970-01-01
    相关资源
    最近更新 更多