경고 : No -setContents 메서드 이 발견되었습니다. 일치하는 메소드 서명이없는 메시지는UIAlertView의 배경색이 바뀌고 있습니다. 경고 : No -setContents 메서드가 발견되었습니다.
이 그것의 나의 버전을 충돌 .... 복귀 'ID'수락 '...' 인수로 가정 할 것이다. 누군가 나를 해결할 수 있습니까?
코드는 여기에 있습니다 :
UIAlertView *theAlert = [[[UIAlertView alloc] initWithTitle:@"Atention"
message: @"YOUR MESSAGE HERE", nil)
delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil] autorelease];
[theAlert show];
UILabel *theTitle = [theAlert valueForKey:@"_titleLabel"];
[theTitle setTextColor:[UIColor redColor]];
UILabel *theBody = [theAlert valueForKey:@"_bodyTextLabel"];
[theBody setTextColor:[UIColor blueColor]];
UIImage *theImage = [UIImage imageNamed:@"Background.png"];
theImage = [theImage stretchableImageWithLeftCapWidth:16 topCapHeight:16];
CGSize theSize = [theAlert frame].size;
UIGraphicsBeginImageContext(theSize);
[theImage drawInRect:CGRectMake(0, 0, theSize.width, theSize.height)];
theImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[[theAlert layer] setContents:[theImage CGImage]];
애플에 의해 허용 배경을 변경하는이 방법 파일에
을 추가 하시겠습니까? – random