Modified it for UIViewController.