Is it possible to add the blur effect in video? - ios

I'm working on video part in my Application. I would like to show my video with the blur effect in top and bottom. Is this possible in Swift?
Reference: Twitter has this functionality in their Application.

Yes of course you can if twitter did it.
Just add on top of your Video Layer, a Visual Effect View with Blur. If you use Storyboards, you can just drag and drop this view, add constraints, and it will work.

Related

How can I set a title at the top of a customized Brightcove UI player?

In this tutorial The UI is built using 'lines' of views from the bottom. Which is perfect for just a traditional bottom view like the one with progress bar below, but I want to have a title label like the example too. I can't add empty lines of views as the screens differs.
Should I build a new custom UIView from scratch?
After days of search, the answer was actually in the repository: https://github.com/BrightcoveOS/ios-player-samples/tree/master/Player/CustomControls
There is an nib file which has the UIView as custom controls view to the video player, which is much easier to implement and has much more freedom to design as you wish.

Swift: Zooming image with scrollView like Facebook

I am trying to build an iOS app that will have the structure of Facebook's feed:
A vertical collection view that will have cells. Each cell will consist of image and text.
In fact, I am building my app with the help of this video by LetsBuildThatApp (this guy rocks by the way).
Currently, I am able to touch the image and animate it to full width, and also pan to dismiss it if velocity on Y-axis is more than a specific threshold.
What I want to achieve after that is to also be able to pinch/double tap to zoom. Like this:
I searched around and found some great articles on how to use UISCrollView to zoom. [Article1, Article2].
The problem is that I use autolayout to perform animations but these articles either use Storyboards or frames to position the image in the center of the scroll view [or at least this is how I understand it]. And also they don't involve any animations to start with.
Also, I don't want to present or push a view controller onto the navigation controller stack. I would rather animate the view on top of the base view as I do now.
Any idea on how to achieve this?
Thank you in advance!

Swift: Dynamic UIView that pushes UIViews below it after a resize

What I am trying to is emulate the effect of the Jquery .slideDown() effect in Swift for an iOS app.
-I need a UIView to auto-resize based on the length of the text in it.
-The UIView needs to push other UIViews below it down.
-There needs to be a button above the UIView or on it then when tapped will cause a "Slide down" (Showing the extra text and expanding the fit the text). After re-tapping the button the UIView will resize and the text will be hidden.
Below is a GIF of the Jquery .slideDown() effect I would like to mimic in Swift.
Is this possible? Do I need to import a library?
Is this possible?
Yes this is possible using autolayout. Here is a great tutorial on how to get started with autolayout. Here is a brief tutorial on animating autolayout constraint changes. If you setup your constraints properly you should be able to do something as simple as:
myLabel.sizeToFit()
and the requested changes will happen.
Do I need to import a library?
No external libraries are needed. You can however look here to see if something similar exist.

Customize UIImagePickerController to have a white border

I'm trying to reach a controller that looks similar to this:
Notice the customize size of the capture screen, and the white border around it.
I know, it's impossible to change the background color of UIImagePickerViewController, so im trying to implement an overlayView to go above it.
The main issue is that i need to make a mask view that will show the camera in the middle of the overlay view, and so far i came up short.
Any ideas on how to implement this? How can i easily make a mask view that cuts a "hole" in the overlay view to see the camera underneath it?
Thanks!
I would suggest creating your custom camera. It will let you put all sorts of overlays etc. Check out AVCaptureSession There is also a bunch of tutorials online describing how to do it very easily. First result from Google search: https://dannygtech.wordpress.com/2014/03/04/custom-camera-on-ios-avcapturesession-avcapturevideopreviewlayer-tutorial/

Apple watch circular buttons

How to design circular buttons in Apple watch? What would be the approach to design a screen like the contacts application of the watch.
I don't know if this is what you want, but you could try this:
-open your Graphic/Design-Application (Photoshop, Gimp or whatever)
-create a circle-button and save the image
-in Xcode, drag a button into your interface
-go to the attributes inspector of the button and set your image at background > image
You can achieve this using group,
Drag group object and drop it in interface builder
set equal height and width to the group
In attribute inspector, set custom radius to half of the height value set.For Eg: if height and width is set as 30, then the radius will be 15. This will give you round shape.
Add color or image based on the need
Add tap gesture to the group and add action to the gesture. Handle stuffs here that are needed to be handled on clicking it
Please, find my answer for your query. I hope that it will help you more.
If you want to design a screen like favorite contact app on apple-watch, then the WWDC video link given in my answer will definitely guide you.
I have designed app with a circular menu which is not exactly same as the apple's favorite app, But it has almost have a circular view with statically.
For that, I have used Groups in horizontal layout for each horizontal item with proper alignment of inside groups.

Resources