zeyu1993

Results 3 comments of zeyu1993

由于项目里面present的viewController比较多,逐一去修改比较麻烦,目前这种方式解决比较优雅,如果其他童鞋有比较优雅的解决方法劳烦告知一下: 1.添加ViewController分类 2.runtime交换ViewController setModalPresentationStyle 以及 presentViewController方法 3.ViewController分类中动态添加has_presentationStyle标志位 4.在交换setModalPresentationStyle 的方法中将标志位至为 true 5.在交换presentViewController的方法中判断ViewController对应的标志位是否为true,true代表有童鞋手动设置过presentationStyle的方式,不作修改,false代表未曾设置过presentationStyle 默认为 UIModalPresentationFullScreen code: #import "UIViewController+PresentationStyle.h" #import static const char *key = "ab_hasSetPresentStyle"; @interface UIViewController() @property (nonatomic, assign) BOOL ab_hasSetPresentStyle;...

@zhangjirui 小项目挨个修改还行,大项目挨个修改真心不现实,这位同学有没有更好的实现思路?

@EchoZuo 如果集成的三方,或者framework 没有办法改,可以看看我的方法