게시물을보고 할 수 있어야하는 앱을 만들고 있습니다. 사용자가 보고서 단추를 누르면 작업 시트가 필요합니다. 이 내 코드입니다 :작업 오류 : @ selectlector in app
[self.avatarImageView.profileButton addTarget:self action:@selector(didTapReportButtonAction:) forControlEvents:UIControlEventTouchUpInside];
여기에 didTapReportButtonAction 코드 : 지금 보고서 버튼을 누르려고 할 때
- (void)didTapReportButtonAction:(UIButton *)button {
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Title" delegate:nil cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Destructive" otherButtonTitles:@"Other1", @"Other2", nil];
actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
[actionSheet addButtonWithTitle:@"Add"];
[actionSheet showInView:[UIApplication sharedApplication].keyWindow];
}
그러나 아무 일도 발생하지 않습니다. 누군가 나를 도와 줄 수 있습니까?
이는 엑스 코드의 문제가 아닙니다. –