如何从uiview里面,获取其上层的uiviewcontroller

 id object = [self nextResponder];

    while (![object isKindOfClass:[UIViewController class]] &&object != nil) {

        object = [object nextResponder];

    }

    UIViewController *uc=(UIViewController*)object;

posted @ 2015-07-30 14:08  罕见  阅读(266)  评论(0编辑  收藏  举报