Ipad Mirroring - How to mirror a different view? - ios

I don't know if "mirroring" is the correct term for this, but I have an Ipad app that takes pictures and keeps them in core data. I've googled around but I can't find code for what I need.
What I want is for the TV to show an image different the iPad. For example, if I don't take any pictures, the TV shows saved images on the screen. When I take a new picture that stops and it shows the new picture.

I find what I wanted in the reference guide.
http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/AirPlayGuide/EnrichYourAppforAirPlay/EnrichYourAppforAirPlay.html%23//apple_ref/doc/uid/TP40011045-CH6-DontLinkElementID_3

Related

Prevent manual screenshot in IOS Objective-C

On iOS, my requirement is disallow user to take manual screenshot from my application, either disallow or blur the captured screenshot. How?
The only solution is to simulate the iOS controls you have in your View using DRM'ed videos.
For each widget you need to create a video subclass that renders the widget, and apply DRM to the video.
You can try to do it yourself, or use a commercial solution such as the following:
https://screenshieldkit.com
It is possible but I don't recommend it because of the room for error. It was easier to do in the past, in iOS13 you will have to do it like this:
You will have to ask for the user's permission to read and edit their photo library, then you have a listener which is checking the number of photos in their library while they are using your app, if that number changes, they have just taken a screenshot (unless you allow other things in your app like tap and hold to save image, etc). When this happens, read said photo and apply a blur, then delete the photo from their library and save the blurred photos.
Warning: There are times where a user may get a photo while using your app that is not a screenshot (e.g. they received an airdrop) and you will now be tampering with their photos, which is very bad. To prevent this you may need to use key value pixel encoding on your screen at all times, for example the first 3 pixels of the screen are 3 very specific RGB values, that way if a new photo is detected and the first 3 pixels are those exact RGB values you know it's a screenshot of your app and not just another photo that was somehow saved while the user was using the app.
There isn't any regular solution to your problem!
You can do some tricks such as if you force the user to have their finger on the screen for the image to show then I don't think they can create screenshots. Because as soon as you press the home+lock keys to actually take the screenshot, the screen seems to behave as if there are no fingers touching it.
BUT what if the user takes a screenshot by AssistiveTouch?!
OR what do you want to do if user records screen and taking screenshot from the video?
I think it's better to change your strategy for example notify the owner of picture for taking screen shot by another one (like SnappChat)!

External Monitor attached with iPad shows black padding

I have used code from link below to enable external display for my iPad App.
https://developer.apple.com/documentation/uikit/windows_and_screens/displaying_content_on_a_connected_screen
The code works, (i.e. we can see the viewcontroller rendered on external display). However there is a black padding from all sides which I am not able to figure out. I need to make it a full screen experience.
On the same iPad, Photos app when attached on external monitor shows full screen photos.
Any help would be appreciated.
PS. we have tried it with three different monitors. Full HD and 4K as well.
You need to set the overscanCompensation property on your second UIScreen instance to .none

iOS - cannot interact with video shared directly to instagram story

I'm working on an instagram share feature on both Android and iOS, and I've noticed sub-par behavior on iOS. I've tried using both the #"instagram://library?AssetPath=" API, as well as the official graph calls, and I cannot find a way to add a video file as a "sticker".
Using #"instagram://library?AssetPath=":
Android shares the video as an adjustable sticker and creates new story slots per the length of the video shared. For example, if I share a minute long video, I am able to pinch zoom and rotate it, and I can see it spanning across 3 story panels.
iOS shares the video (seemingly) as a "backgroundVideo" (see com.instagram.sharedSticker.backgroundVideo). This is static, and set to fill the screen by height. I cannot interact with this video at all, and it is cropped at 20 seconds in length to fill only one single story panel.
The same video file, when added to a story directly from the Instagram app, works correctly as a sticker and looks immensely better.
I also may be totally wrong here, but I'm mostly confident that about 5 weeks ago, iOS was not behaving this way using the #"instagram://library?AssetPath=" method. Perhaps this api was altered.
Has anyone experienced this before? Anyone have ideas on how to share a video file directly and be able to adjust it?

iOS Image Viewer like Photo app

I am developing an app that has an internal gallery with some images.
What I want to achieve is exactly a result that behaves and looks like the Apple Photo app image viewer.
With a collection view I implemented the gallery images with thumbnails and now I would like to show the image on fullscreen on press.
The image viewer should have exactly the Apple's Photo behavior:
Full screen on single tap,
Delete, Share button etc...
Pinch to zoom, double tap zoom...
My question is. Is that really possible that such a common feature is not already given by iOS? Is there maybe a view controller already build in that we can use but I am not aware of?
I know there are some libraries around that make such thing, but I'm wondering if there's already something given.

iOS development - launch screens where image on main screen can change?

So I am new to iOS development and I have a question about the launch screen.
My app will have an image (that loads when the app opens from the internet) this can change anytime the image is updated on the website, so what is the done thing when designing a launch screen as the image could be different to what is on the launch screen?
Thanks
In Apple's Human Interface Guidelines, they suggest that the launch screen should match the first screen of your app. In the example they give, the only parts of the launch screen are the non-dynamic parts (the UI around the web content).
Design a launch screen that’s nearly identical to the first screen of your app. If you include elements that look different when the app finishes launching, people can experience an unpleasant flash between the launch screen and the first screen of the app.
The launch screen is presented before your app loads, and it should be used for static content only.
If there are any UI elements around the image that is displayed, show those in your launch screen. If not, choose a neutral background color that works well with the theme of your app.
Omit the image. A launch image should be a bare outline of what the screen will certainly contain. It might be no more than the correctly-colored background. It is just to cover the gap between nothing and something.
Read the Guidelines: https://developer.apple.com/ios/human-interface-guidelines/graphics/launch-screen/ Look at the picture on the left. That's a launch screen — basically empty.
LaunchScreen image is always the same..
You can set it in LaunchScreen.storyboard
The launch screen is used to display something whilst your app is initialising, making network requests or whatever.
You shouldn't be looking to load dynamic content here as if a user is on a very slow connection then they wont see anything until your image has loaded. This is why it doesn't have a view controller associated with it. it should be static.
You should only really be loading your logo or something in here, you could just use the company name. it will only show for a short amount of time. then when assets change, submit the changes to store

Resources