美文网首页
2019-12-20

2019-12-20

作者: ZM_微笑向阳 | 来源:发表于2019-12-20 16:41 被阅读0次

IOS 键盘内部跳转 App的方法:

WeChatc2fe41b6d890225cbd8bbfc2bfc6acb8.png

//MARK:点击跳转App
-(void)linkButtonAction{
UIResponder* responder =self;
while((responder = [responder nextResponder]) !=nil) {
if([responder respondsToSelector:@selector(openURL:)] == YES) {
[responder performSelector:@selector(openURL:) withObject:[NSURL URLWithString:@"faceMemeUrl://"]];
}
}
}

iOS 其他扩展调用的方法:

WeChat195ef5625409753829ebecc48fb7a0b9.png

-(void)jumpApp{
NSURL *url = [NSURL URLWithString:@"faceMemeUrl://"];
[self.extensionContext openURL:url completionHandler:^(BOOL success) {
[HUD showText:@"success" onView:self.view delay:0.2];
}];
}

相关文章

网友评论

      本文标题:2019-12-20

      本文链接:https://www.haomeiwen.com/subject/fyeinctx.html