让alertcontroller可以强制横屏显示的方法,真的,这个方法真的超级厉害的!!!
alert方法然后在类目中使用runtime添加alert隐藏的方法
UIAlertController+ChangeAlert.h+ (void)load {
Method fromMethod =class_getInstanceMethod([self class], @selector(_postWillBeginSystemProvidedDismissalOfAlertController));
Method toMethod =class_getInstanceMethod([self class], @selector(change));
method_exchangeImplementations(fromMethod, toMethod);
}
-(void)change {
self.view.hidden = YES;
[self change];
}
完成!
网友评论