iphone - 使用 SLServiceTypeFacebook 时从 SLComposeViewController 获取 UITextView
<p><p>我正在尝试获取 SLComposeViewController 的 UITextView,我该如何获取呢?我尝试了以下方法,但它不起作用:</p>
<pre><code>[viewController presentViewController:facebookController
animated:YES
completion:^{
for (UIView *viewLayer1 in facebookController.view.subviews) {
for (UIView *viewLayer2 in viewLayer1.subviews) {
if (]) {
for (UIView *viewLayer3 in viewLayer2.subviews) {
if (]) {
[(UITextView *)viewLayer3 setDelegate:self];
}
}
}
}
} }];
</code></pre>
<p>仅供引用,如果它是 <code>SLServiceTypeTwitter</code>,上面的代码可以正常工作,但如果它是 <code>SLServiceTypeFacebook</code></p>,它就不起作用</p>
<br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
<p><p>看起来像 <a href="https://stackoverflow.com/users/716216/0x7fffffff" rel="noreferrer noopener nofollow">0x7fffffff</a>设法在这个答案中得到它:
<a href="https://stackoverflow.com/a/13737046/189804" rel="noreferrer noopener nofollow">https://stackoverflow.com/a/13737046/189804</a> </p>
<p>注意他的注释:“重要提示:请注意,上述内容仅在放置在完成处理程序中时才有效。”</p></p>
<p style="font-size: 20px;">关于iphone - 使用 SLServiceTypeFacebook 时从 SLComposeViewController 获取 UITextView,我们在Stack Overflow上找到一个类似的问题:
<a href="https://stackoverflow.com/questions/16430783/" rel="noreferrer noopener nofollow" style="color: red;">
https://stackoverflow.com/questions/16430783/
</a>
</p>
页:
[1]