0

我有一个包含文本数据和图像数据的数组。如果数据是文本,我需要在标签中显示它,否则在图像视图中。但是如何检测它是文本还是图像?

4

1 回答 1

2

if( [[ 数组 objectAtIndex: yourIndex] isKindOfClass: [ Name_of_the_class_your_want_to_check_for class ]] )

于 2012-09-20T11:22:31.910 回答