Q:

Display and move image

I have this piece of code that makes an image move, but I want this to be displayed 5 seconds after I open a page.
How do I do this? Thanks 
@IBOutlet weak var moveobj: UIImageView!

override func viewDidAppear(animated: Bool) {

    super.viewDidAppear(animated)

    let orbit = CAKeyframeAnimation(keyPath: "position")
    var affineTransform = CGAffineTransformMakeRotation(0.0)
    affineTransform = CGAffineTransformRotate(affineTransform, CGFloat(M_PI))
    let circlePath = UIBezierPath(arcCenter: CGPoint(x: 198 - (100/2),y: 135 - (100/2)), radius:  CGFloat(155), startAngle: CGFloat(255), endAngle:CGFloat(M_PI * 2 ), clockwise: true)

    orbit.path = circlePath.CGPath
    orbit.duration = 18
    orbit.additive = true
    orbit.repeatCount = 0.15
    orbit.calculationMode = kCAAnimationPaced

    moveobj.layer .addAnimation(orbit, forKey: "orbit")

A:

To wait 5 seconds before you do anything you can use a Timer, see below how to use it:
override func viewDidLoad() {
    super.viewDidLoad()

    // start a new timer with an interval of 5 seconds
    Timer.scheduledTimer(timeInterval: 5, target: self, selector: #selector(ViewController.showImage), userInfo: nil, repeats: false)
}

// after 5 seconds this class will be called and here you can do your work
func showImage(){
    print("Showing")
}

