Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含文本数据和图像数据的数组。如果数据是文本,我需要在标签中显示它,否则在图像视图中。但是如何检测它是文本还是图像?
if( [[ 数组 objectAtIndex: yourIndex] isKindOfClass: [ Name_of_the_class_your_want_to_check_for class ]] )