Home>

Is it possible to display a small screen like the picture-in-picture function that has been available from iOS 14 on the iPhone on the screen of my iOS app?

Specifically, I want to display a small screen web browser that can be moved, scaled, and reduced by dragging on the main screen of the application, and input on the main screen while looking at the contents searched by the small screen web browser. .. You do not operate the main screen from that small screen browser. It is for reference only for main screen input.
(It's okay if you can use the small screen only within the app you made. You don't have to open it on the home screen or other apps like a real picture-in-picture.)

I have no experience in iPhone application development, and now I am thinking about the image of what I will make. After investigating various things, I think that half modal is close, but with that, only half of the back screen can be operated, so if possible I would like to make a small screen like the one above. I will. I would like to know if it can be realized.

  • Answer # 1

    I don't think there's anything you can't do ...
    Since the operation of moving the screen and the operation of scrolling in the web are the same "drag", you may have scrolled when you wanted to move the screen, or you may be focused on a form or something in a web page. I feel that the operability is not good, such as scrolling to an unintended screen due to long tap text selection.

    Users routinely (while using many other apps) perform operations such as switching to the browser and inputting something in multitasking, and they should be accustomed to that operation, so a tricky implementation I feel that it is better to leave it to the user's operation without doing it. (If the reference destination is the Web, I feel that you may enter it on your smartphone while looking at your PC.)

    Technically speaking for implementation, WebView is a subclass of UIView (except SFSafariViewController), so it is possible to draw with addSubView or addSubLayer for the view controller of the input screen. I think it's okay to make it a small view controller and push it.
    I think the drag event is a little difficult to implement, but it is a common situation that you want to drag the UIView to move it, so if you google it, you will find some useful code.