how to add shadow to button in kivy? - kivy

I've seen this: Image with rounded corners and shadow Kivy
but how do you get the shadow background image for the shadow? how do you make a shadow for a button in kivy?

Related

UI Text Field Design

So, I was trying to mimic a video that uses sketch to design a login screen I really like. I had a question about how I can make a text field in Xcode look like the one that is being designed in the video.
Here is the video link: https://www.youtube.com/watch?v=gA_hFHkhqFM&t=87s
Here is a picture of the text field I want to design:
Any help is appreciated!
This is how to do it in the storyboard
Find/Create a blurry image and set it as an image view's image. Fill the view with the image view and add constraints. Add a new text field on top of the image view. Set these things:
border style to none
Text color to white
Background color to a black color with an alpha value and tint color to white as well.
This can be set by using the RGB slider in the color picker. Use the slider at the very bottom to adjust the alpha:
The easiest way to do it is to add a UIView with a black background. Set its alpha to 0.7.
Then add a UITextField on top. Set its border style to none, then the background color to clear.
You're done!

Draw drop shadow with semi-transparent view

I have a UIView which is semi-transparent. I want to add a drop shadow to it. The problem is that, the shadow opacity is low as well, because the view is semi-transparent. How can I make the shadow have full opacity?
Place your view into a container view, and let the container view to drop the shadow.

Hiding and showing UILabel with rounded corner and shadow in Swift 2

I am using this method Swift - Problems with corner radius and drop shadow to add rounded corners and shadow to a UILabel.
However, I need to hide and unhide the label depending on content. I am setting hidden true/false in my ViewController class. But the shadow layer still shows.
See example images below.
What is the best way to hide/unhide this shadow layer as well?
Set the alpha to 0:
myLabel.alpha = 0

gradient background iOS

This rectangular region has a gradient background which is also transparent. Texts can be written on the rectangle. The colour of the rectangle changes when the user touches it. When the user releases it, it takes you to a new screen. How should something like this be implemented in iOS?
Use
UIImageView with gradient backgroundImage
set its alpha to 0.6 -.75 so that background view is visible
Use Tap gesture recognizer on ImageView to change background Image when user tap and navigate to next view

Animating a UITabBar's shadowImage

I want to fade the shadow image of a UITabBar (iOS7) from the default shadow to a custom image. I don't have access to the default shadow but if necessary can access the UITabBar's layer.

Resources