Fixed a bug when contained in a UITabBarController

When contained in a UITabBarController, the UITabBarController's view should be captured rather than the view itself.