我需要了解以下内容;
1.)我需要以编程方式将图像添加到 UIAlertView(如果苹果不允许或允许这样做,则可以使用其他合法的方式来实现)?
2.) 什么是私有(private) API?我该如何区分?
最佳答案
1.) 执行以下操作:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert Title" message:@"Message" delegate:self cancelButtonTitle:@"Cancel otherButtonTitles:nil];
UIImageView *imageView = [[UIImageView alloc] initWithImage: [UIImage imageNamed: imageName]];
[alert addSubview:imageView];
[alert show];
2.) 文档中未包含的 API 属于私有(private) API,不应使用。
关于iphone - 将图像添加到 uialertview 以及有关私有(private) API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9054218/