Replicate iOS 11 Control Center Screen

时间:2017-06-12 17:01:38

标签: ios swift ios11

I am trying to re-create the iOS 11 control center view. I am not trying to make it functional just yet, but I am trying to get the same styling and I can't manage to pinpoint the way it looks in iOS 11. How do I go about this? Here is what I have so far next to what I would like, without the buttons on the blur view of course. Any tips? Thanks.

import UIKit
import PlaygroundSupport

let view = UIImageView(image: #imageLiteral(resourceName: "IMG_5413.PNG"))
view.backgroundColor = .white
view.frame = CGRect(x: 0, y: 0, width: 350, height: 650)

let light = UIBlurEffect(style: .light)
let lightView = UIVisualEffectView(effect: light)
lightView.layer.masksToBounds = true
lightView.frame = view.frame
lightView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
view.addSubview(lightView)

let dark = UIBlurEffect(style: .dark)

let darkView = UIVisualEffectView(effect: dark)
darkView.layer.cornerRadius = 50
darkView.layer.masksToBounds = true
darkView.frame = CGRect(x: 50, y: 50, width: 250, height: 250)
darkView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
view.addSubview(darkView)

PlaygroundPage.current.liveView = view

What I haveWhat I want to have

0 个答案:

没有答案