How to put a video like an image - ios

I have an image gallery (I use UIScrollView to slide the image).
How to put a video inside that gallery like an image ?
The user will be able to slide the video like an image.

There is one framework called AVFoundation try to use it to show video in one subview. After that you can put your view anywhere you want.
For more help you can start by running some examples, watch WWDC videos and read the documentation. All of this is in the link above.

The most simple would be to use Player. Usage described on the github readme file.
But as the other answer suggest AVFoundation would give you more freedom at the expanse of implementation time.

Related

Attaching youtube video player into textview

I've been struggling to find a library in which it support my need, and that is to embed a yt video player into a text view. So, what I'm basically trying to do is to create something similar to Reddit in which it have a yt vide inside the thread details.
Currently, i am using NSAttributedString to store the yt thumbnail image and add it into the textView, and in order to play the video, it'll navigate to another view that loads the yt video. It's an okay solution but not the solution that I want
Therefore, are there any solution on how to overcome this problem? Thank you
What i want. :
ps: the image is currently using image attachment aka NSAttributedString, not an UIview with youtube player

Create camera overlay to read OCR Code in swift

I am working an application which is using OCR code reading functionality, but i want to make a overlay on camera, like some portion of camera will read the code and other view on screen will show with blur effect.I am stuck here...please help...thanks..
Create a CustomOverlay View and use it.
I did similar kind of demo app.
Please check here:https://github.com/RaviiOS/BarCodeScanDemo/tree/master/BarCodeScanDemo

iOS How to create a custom image picker/browser

I have been looking around and haven't found a good answer for this.
Instagram uses an image browser/picker like . As you can see above the images from the photo gallery are displayed in a grid below and you can directly choose image from there instead of using the default image picker layout.
The Groupme app also does something similar..
Where images are displayed in a horizontal scrollable list and you can just choose from this.
I have been reading up on the image picker and the documentation says that subclassing is not support.
So my question is:
How do you create something like this?
If this is just a custom view that loads the images stored on the device. How do I access those images?
I just need a starting point and what to specifically look for (custom browser/image picker etc).
Thanks in advance.
You use the ALAssetsLibrary APIs, docs here.

iOS create video from array of images

I have an array of images that I am passing to this class:
https://github.com/jberlana/iOSKenBurns
This basically takes all of the images and builds a slideshow from them and then adds an automatic and random ken burns effect.
Everything works awesome; however, I am now trying to add the ability to export the slide show to a movie file. There will be just a simple button to accomplish this, but I have no idea where to start for turning this into a video.
I have found this: QTMovie Class Reference which is EXACTLY what I'm looking for (compile array of images into a movie file), but I need to retain the ken burns effect the class has added, and I don't know if this applied to iOS either.
Not really sure if this is even possible, or what to do with it. Any help would be great, at least a point in the right direction! Thanks in advance!
The QTMovie class does not function under iOS. You can take a look at an example Xcode project I created to show off this sort of movie composition logic in my library, the Xcode project is at AVRender. This example creates a lossless output file that basically contains all the images as frames of video. If you want to actually convert that to h.264 when finished, there is another example on that same page named AVDecodeEncode that shows how to do that and play the results with AVPlayer. You could also roll your own code to do all this using the AVAssets API under iOS, but be warned that those APIs are not simple to use.

photo scroll view

I need to make photo app like photo app in ios. I need to have uiscrollview and custom buttons inside it. So is it any tutorial about how to do this or code cause i saw a lot of apps are using this feature.
Thank you
You can also have a look at the Three20 library which provides a photo gallery component. Look at the tutorial How To Use the Three20 Photo Viewer for a better understanding since the documentation of the Three20 library is still not existing on their homepage.
https://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html
Add buttons. And check the UIScrollView reference next time.

Resources