0
내가 퍼즐 게임을 구현하고있다. 플레이어가이긴 후에 당신이 승리했다고 경고합니다. 그러나 그것으로 나는 나의 경고보기에 스마일리를 추가하고 싶다. 그렇게하는 방법?
내가 퍼즐 게임을 구현하고있다. 플레이어가이긴 후에 당신이 승리했다고 경고합니다. 그러나 그것으로 나는 나의 경고보기에 스마일리를 추가하고 싶다. 그렇게하는 방법?
사용이
UIAlertView *successAlert = [[UIAlertView alloc] initWithTitle:title message:message delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(220, 10, 40, 40)];
NSString *path = [[NSString alloc] initWithString:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"smile.png"]];
UIImage *bkgImg = [[UIImage alloc] initWithContentsOfFile:path];
[imageView setImage:bkgImg];
[bkgImg release];
[path release];
[successAlert addSubview:imageView];
[imageView release];
[successAlert show];
[successAlert release];
복사 형태 here
감사합니다. 작동 중 ... – Trup