iphone - 将图像添加到 uialertview 以及有关私有(private) API

标签 iphone objective-c

我需要了解以下内容;

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/

相关文章:

iphone - 如何比较图像字符串(名称?)并更改图像

iphone - 我可以将图像转换为点网格吗?

objective-c - NSImage 到 blob 和 blob 到 NSImage (SQLite, NSData)

ios - 无法在 Storyboard iOS 中附加 UIScrollView Paging

iphone - iPhone 是否支持 WiFi ad-hoc 模式?

iphone - 如何在横向显示具有正确缩放比例的 UIWebView

iphone - iOS如何使 slider 停在离散点

iphone - rightbarbuttonitem 没有显示?

iphone - UIScrollView contentOffsets 是绝对的吗?

objective-c - 单独识别 UIImages