iOS control center drag button color - ios

I want to know how the control center drag button get's it's color by the lock screen wallpaper.
I post a picture here to understand what button i mean :

It's not getting a color; it's a semi-transparent grey/black like the rest of the icons in Control Center. The background blue is from a mix of blur and vibrancy effects.

Related

How to change home indicator background color on iPhone X?

I would like to change the background color of the view that appears on the bottom of the new iPhone X with a home indicator inside.
Is it possible?
The home indicator color is determined automatically based on the color of the content below it.
Most of the time, this means you should not worry about its color since it is out of your control, and will always be clearly visible to users.
However, you can place a colored view in the area behind the home indicator to manipulate its color.
Examples
(Please note that these examples were taken on the iOS simulator, and behavior on a real device is different.)
Background: white (#ffffff)
Home Indicator: black (#000000)
Background: black (#000000)
Home Indicator: gray (#484848)
Background: gray (#5f5f5f)
Home Indicator: dark gray (#282828)
Background: blue (#1a98fc)
Home Indicator: very dark gray (#121212)
I wrote an in-depth article about the home indicator color if you want to learn more about its behavior: Reverse-Engineering the iPhone X Home Indicator Color
The home indicator (line) colour is set automatically based on the content below it, often the root view background.
To change the background colour use this:
self.window.rootViewController.view.backgroundColor = [UIColor colorWithWhite:0.98 alpha:1.0] ;
You can add some negative distance between a colored view's bottom and the safe area's bottom.

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!

Stroke Around View From Keyboard

I have a dark background in my application. When the keyboard comes on screen it creates a stroke around the view that contains the UITextField or UITextView. Is this a bug? Does anyone know of a workaround?
In the picture attached you'll see a white stroke going around the view under the top bar.

Is it possible to change background color of interface rotation

My App has a white background UIWindow.backgroundcolor. When I rotate the device the white background rotates on black background.
Is it possible to change the background behind that window?
I would like to have all white. Any ideas? Thanks in advance.
You cannot change the black color as it is actually not a part of the app. What you can do in this case is add a very large (somewhat larger then the screen size) root view and center it. Then place everything else into this view. This way when your app changes orientation the large view will also rotate, but because of it's size it's edges will never reach the screen and the black color will remain hidden.

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

Resources