alexeypro
alexeypro

Reputation: 3673

"Partial" web view in iPhone/iPad app

How can I do not full screen, but partial Web View in my iPhone/iPad app? I need it to be in the center of the screen, but having other controls (native app) on top/bottom/left and right. Thank you!

Upvotes: 0

Views: 898

Answers (2)

user189804
user189804

Reputation:

Sounds like you want a UIWebView that doesn't occupy the full screen. I would find it easier to do that in code, not Interface Builder - Just use the frame property of the UIWebView to define where it sits. You can also set the frame of an object you created in IB of course. Something like:

UIWebView* webView = [[UIWebView alloc] initWithFrame:CGRectMake(50.f, 50.f, 200.f, 300.f)];
/* other things you need to set for the webview - assign delegate etc.*/
[self.view addSubview:webView];
[webView release];

Upvotes: 1

JJgendarme
JJgendarme

Reputation: 1401

Open your interface builder and drag it in manually.

If you want your browser to have a top bar or a navigation bar down/below, then drag in the bar(s) first.

To adjust where it is and how big it is just go to the "size" tab in your inspector (in interface-builder).

Upvotes: 1

Related Questions