Simple question: Is there a way to display a web page with WKWebView but override one part of it with a native iOS view -- ie, a subclass of UIView.
Related
This is an Objective-C app and I'm working with Xcode 14. I'm trying to migrate deprecated UIWebView to WKWebView and I've already replaced all UIWebView references in code by WKWebView, but I'm stuck in the storyboard part (bear in mind I'm new to iOS development).
What I'm trying to do is to add a WKWebView to the SB, then replicate all properties of the current UIWebView and finally remove the UIWebView.
In the following screenshot you'll see in the right pane of the Storyboard that the current UIWebView has a delegate outlet:
But I don't know hot to replicate this delegate outlet in the WKWebView that is below. I have to say I don't k ow what is a delegate in this context exactly, but I'm just trying to replicate properties of the current WebView.
How to create a delegate outlet for the WKWebView?
You can give your WKWebView an outlet connection for an outlet that it actually has. A WKWebView does not have a delegate property. Therefore it does not have a delegate outlet.
What I'm trying to do is to add a WKWebView to the SB, then replicate all properties of the current UIWebView and finally remove the UIWebView.
Well, stop trying to do that. A WKWebView is very different from a UIWebView. You should not look to "replicate" anything about a UIWebView using a WKWebView. Use the WKWebView as a WKWebView.
For one thing, all your code interactions with this view will have to be rewritten completely. You cannot just slot the WKWebView in place of the UIWebView as if they were just two names for the same thing.
There is a pagecontrol and uipageviewcontroller in xamarin ios.
I need to create a coach screen for ios with a carouselview and a pageindicator .
I am not able to use uipageviewcntroller as the default transition style is not scroll and I am adding the pageviewcontroller programmatically.
So I have to go for pagecontrol with a scrollview.
I am not able to achieve that and facing some issue.
About the PageViewController, I have wrote a sample for others, you can take a look:
Xamarin.iOS implement PageController
You can add anything you want in any page's content view controller.
Hop it can help you.
Does the iOS operating system prevent the DOM layout and painting of a webpage loaded in the webview if the given webview is hidden in the background (of the app)? Say, the webview is part of a view controller that is not made visible yet but I've asked the webview to load a URL.
The system doesn't draw nor layout any view that is not part of the view hierarchy. You can easily verify it by subclassing UIWebView and overriding drawRect and layoutSubviews. That said, in almost all cases, you shouldn't have to care.
I want to manage multiple page or tabs in UIWebView like default iPhone Safari See Screen shot for better understand :
http://s14.postimg.org/xie4imi35/i_OS_Simulator_Screen_shot_24_May_2014_7_56_03_PM.png
Is that possible to manage this in UIWebView.
Three things I want to tell you here:
See Answer for multi tab in UIWebView here.
Look at HGPageScrollView library and WKPagesCollectionView on Github.
I saw that in UINavigationController when we move from ParentViewController to ChildViewController and then move back again state of Parent view is maintained. I am trying to use that in implementing multi tabs in UIWebView.
i m new to iphone development i m doing an application where i want a uipageviewcontroller to display company images and below that i need a tableview to display a list like services,company profile etc..Issue i m facing here is for UIpageviewcontroller it has to make a link with file owner view and for tableview also it has to link with file owner view but both cannot be possible at the same time because there was only one view controller.so how i need to implement this?
Any suggestions please
Thanks
Edit: Slightly modified approach: Since you want to mix multiple views on the "same page" (which generally should mean within a single parent UIViewController), you do not want a UIPageViewController and a UITableViewController since each of these wants to own the entire screen. Instead, you want a UIScrollView + UIPageControl to simulate the UIPageViewController, and a UITableView, all within a single UIViewController. These will be sub-views of your UIViewController's view and properties within your UIViewController's class. You then hook up the delegate methods of the UIScrollView, UIPageControl, and UITableView (datasource and delegate) to methods within your UIViewController class implementation.