It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center
                            
                        
                    
                
                                6年前关闭。
            
                    
这段代码创建UIActionSheet有什么问题?
它在抱怨委托人:自己,但我不知道为什么。
这是我的代码:

-(IBAction)SocialButtonPressed:(id)sender{
    UIActionSheet *social = [[UIActionSheet alloc]initWithTitle:@"Share"
                                                       delegate:self
                                              cancelButtonTitle:@"Cancel"
                                         destructiveButtonTitle:@"Twitter"
                                              otherButtonTitles:@"Facebook", @"iMessage", @"Mail", nil];

    [social showInView:self.view];
}

最佳答案

使您的类符合该协议:

@interface MyClass : NSObject <UIActionSheetDelegate>

关于ios - 我的代码有什么问题? (UIActionSheet),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/15703733/

10-12 00:15
查看更多