//Connect to the view in the Storyboard.@IBOutletvar heading:UILabel!override func viewWillAppear(animated:Bool){super.viewWillAppear(animated)//Move the view from where it was placed // in the story board to off screen.
heading.center.x -= view.bounds.width
}override func viewDidAppear(animated:Bool){super.viewDidAppear(animated)//Once the view has loaded, move the // heading immediately, and take about // a half second to get in its new location // which is just the reverse calculation as hiding it.// We use "easeout" so that it comes in //quick and then slows down as it reaches // its destination.UIView.animateWithDuration(/*duration:*/0.5,
delay:0.0,
options:UIViewAnimationOptions.CurveEaseOut,
animations:{self.heading.center.x+=self.view.bounds.width}, completion:nil)}