SLComposeServiceViewController preview view doesn't show up

那年仲夏 提交于 2019-12-12 02:36:39

问题


I want to use SLComposeServiceViewController inside my app as a UI for composing and posting a message to my backend.

However, if I override loadPreviewView and return a view as stated in the documentation, that view doesn't show up.

This is my code:

@interface ComposeViewController : SLComposeServiceViewController
@end


@implementation ComposeViewController
- (UIView *)loadPreviewView {
    UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
    v.backgroundColor = [UIColor redColor];
    return v;
}
@end

This is how it looks:

Why is my red view not showing up?

来源:https://stackoverflow.com/questions/37542359/slcomposeserviceviewcontroller-preview-view-doesnt-show-up

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!