I am working with TableViewControllers and in my first TableView I have decided that I should see an image that occupies the whole length and width of the screen in such a way that it does not show what is behind if not until the image disappears (This part is already achieved). I'm doing it this way:
override func viewDidLoad() {
super.viewDidLoad()
let nav = self.navigationController?.navigationBar
nav!.hidden = true
let bounds = UIScreen.mainScreen().bounds
let screenHeight = bounds.size.height
let screenWidth = bounds.size.width
let dynamicImage=UIImageView(frame: CGRectMake(0, 0, screenWidth, screenHeight))
dynamicImage.backgroundColor=UIColor.greenColor()
self.view.addSubview(dynamicImage)
UIView.animateWithDuration(0.2, delay: 10.0, options: [] , animations: {() -> Void in
dynamicImage.alpha = 0.0
}, completion: {(true) -> Void in
dynamicImage.removeFromSuperview()
nav!.hidden = false
})
The fact is that the screen looks like this:
and I do not occupy the entire height of the screen, since you can still see the top bar, in addition to that if I touch the screen and slide upwards scroll scrolls the UIImageview upwards. What I intend is that the UIImageview contains an advertising image that lasts x d seconds with the screen blocked however I have two problems:
Thanks