我是App Developing的新手。我正在创建一个App Quiz游戏。在测验中有两个类别。在第一个类别中,我创建了通过图像猜测的类别。
我有Game.h和Game.m文件。我想要显示图像而不是问题。我需要帮助,如何在此之前放置图像代码。
#import "Game.h"
@interface Game ()
@end
@implementation Game
-(void) Category1{
switch (QuestionSelected) {
case 0:
[Answer1 setTitle:@"Answer1" forState: UIControlStateNormal];
[Answer2 setTitle:@"Answer2" forState: UIControlStateNormal];
[Answer3 setTitle:@"Answer3" forState: UIControlStateNormal];
break;
default:
break;
}
}
答案 0 :(得分:0)
我自己解决了这个问题:
由于
Results.image = [UIImage imageNamed:@"image.png"];
- (void)Category1 {
switch (imageQuestionSelected) {
case 0:
imageQuestion.image = [UIImage imageNamed:@"iamge.png"];