NSMutableString *tempAnswerTitle=[[NSMutableString alloc]init]; for(UIButton *answerBtn in self.answerView.subviews) { //判断按钮是否有文字 NSString *answerTitle=[answerBtn titleForState:UIControlStateNormal]; if(answerTitle.length==0)//没有文字(按钮没有填满) { full=NO; } //拼接按钮文字 if(answerTitle) { [tempAnswerTitle appendString:answerTitle]; } }