Added method to determine if a uiviewcontroller is visible