objective-c - 从一个view到ViewControllert之间跳转的方法?
淡淡烟草味
淡淡烟草味 2017-04-26 09:02:04
0
2
516



就像这样在红包里(一个view)点击查看领取详情(按钮),跳转到一个viewcontroler,这个跳转一般怎么写?

淡淡烟草味
淡淡烟草味

reply all(2)
PHPzhong
-(UIViewController *)viewController
{
    UIResponder *next = self.nextResponder;
    do {
        if ([next isKindOfClass:[UIViewController class]]) {
            return (UIViewController *)next;
        }
        
        next = next.nextResponder;
    } while (next != nil);
    
    return nil;
}
新建一个UIView的类目,把这个方法放进去,以后就可以直接通过`view.viewController`来获取视图的控制器了。
左手右手慢动作

The interface that pops up should be a viewcontroller. You can refer to this http://stackoverflow.com/a/19564760

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template