-5

There are two ViewController in this app

ViewController1 --> Present As Popover --> ViewController2

In ViewController2, it set Background to Black Color, and Alpha to 0.1

When the transition of ViewController2 is finish, background will become 1 alpha

How to keep Background of ViewController2 0.1?

Donald Duck
  • 7,638
  • 19
  • 69
  • 90
CL So
  • 3,455
  • 9
  • 44
  • 93
  • Please show relevant code, that way we can help you better. – jbehrens94 Dec 13 '17 at 12:33
  • that is a [good material from Apple](https://developer.apple.com/documentation/uikit/uimodalpresentationstyle/1621382-popover) to understand popover-presentation-style... briefly: _"In a horizontally compact environment [a.k.a portrait iPhone], this option behaves the same as `fullScreen`."_ – holex Dec 13 '17 at 12:55
  • If you post a link just like that without explanation, it looks like spam, so I rolled back your edit. If it isn't spam, please also explain why the link is useful. – Donald Duck Dec 13 '17 at 16:37

3 Answers3

0

For transparent view controller pop up set background of view like this

enter image description here

Sh_Khan
  • 93,445
  • 7
  • 57
  • 76
0

Just select your presenting viewcontroller and select the option Over Current Context and then set background color with some alpha of your presented controller

enter image description here

Vikky
  • 804
  • 1
  • 6
  • 16
0

If you present a vie controller modally and gives background colour to clear then it will be transparent until u give some color.

    self.present(viewController2, animated: true, completion: nil)
Rahul Dasgupta
  • 894
  • 5
  • 18