id object = [self nextResponder];
while (![object isKindOfClass:[UIViewController class]] &&object != nil) {
object = [object nextResponder];
}
UIViewController *uc=(UIViewController*)object;