gpt4 book ai didi

iOS 8 Today Widget - SLComposeViewController 显示不正确

转载 作者:搜寻专家 更新时间:2023-10-30 20:17:35 26 4
gpt4 key购买 nike

我创建了一个扩展,实际上是 Today Widget,使用 Xcode 6 并在我的 iOS 8 beta 设备上运行它(我是注册的 iOS 开发人员)。

但是,作为开发的新手,我遇到了这个问题,SLComposeViewController 被“卡”在它的 View 中(如下所示),认为用户无法与其交互而不是能够随后发布推文。

Image for reference:

有什么方法可以解决此问题并将 SLComposeViewController 置于通知中心 Pane 前面?任何帮助将不胜感激。

编辑:(是的,修复了“Hello World”文本)

第二次编辑:这是我的SLComposeViewController 代码:

- (IBAction)TwitterShare:(id)sender; {

if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeTwitter])
{
SLComposeViewController *tweetSheet = [SLComposeViewController
composeViewControllerForServiceType:SLServiceTypeTwitter];
[self presentViewController:tweetSheet animated:YES completion:nil];
}

else

{

UIAlertView *twitterAlert = [[UIAlertView alloc] initWithTitle:@"Uh oh!" message:@"Ensure you have setup a valid Twitter account and/or you have allowed access for Twitter in this application." delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil, nil];


[twitterAlert show];
twitterAlert = nil;
}

}

最佳答案

根据 Apple 的文档,SLComposeViewController 不允许在 NC 中显示。他们想要任何需要键盘输入才能在应用内发生的事情。

关于iOS 8 Today Widget - SLComposeViewController 显示不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24114997/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com