如何从 NSArray 中获取此文本值?
How to get this text value out of the NSArray?
我有一个数组,当我按如下方式输出 NSlog 时
NSLog(@"%s entered with variants: %@ and SelectedVariants = %@", __PRETTY_FUNCTION__, [_valueLabels objectAtIndex:0], _selectedVariantValue);
给我以下输出
2017-11-24 10:09:54.971304+0800 NWMPos[547:109817] -[ShopifyProductCardView addButtonTapped:] entered with variants: <UILabel: 0x1040e5330; frame = (0 0; 33.6667 17); text = 'small'; alpha = 0.87; gestureRecognizers = <NSArray: 0x1c4645c10>; layer = <_UILabelLayer: 0x1c0298d30>> and SelectedVariants = (null)
我需要获取文本 ="small" 并缩小到 NSString,必须有一些方法可以做到这一点我如何找到它?
它是 NSArray 中的一个 UILabel,所以我只是将 Array 上下文分配给 UILabel 并按如下方式正确读取其文本,一切正常
UILabel *jongel = [_valueLabels objectAtIndex:0];
UILabel *jongel2 = [_valueLabels objectAtIndex:1];
NSString *pelleplutt = jongel.text;
NSString *pelleplutt2 = jongel2.text;
我有一个数组,当我按如下方式输出 NSlog 时
NSLog(@"%s entered with variants: %@ and SelectedVariants = %@", __PRETTY_FUNCTION__, [_valueLabels objectAtIndex:0], _selectedVariantValue);
给我以下输出
2017-11-24 10:09:54.971304+0800 NWMPos[547:109817] -[ShopifyProductCardView addButtonTapped:] entered with variants: <UILabel: 0x1040e5330; frame = (0 0; 33.6667 17); text = 'small'; alpha = 0.87; gestureRecognizers = <NSArray: 0x1c4645c10>; layer = <_UILabelLayer: 0x1c0298d30>> and SelectedVariants = (null)
我需要获取文本 ="small" 并缩小到 NSString,必须有一些方法可以做到这一点我如何找到它?
它是 NSArray 中的一个 UILabel,所以我只是将 Array 上下文分配给 UILabel 并按如下方式正确读取其文本,一切正常
UILabel *jongel = [_valueLabels objectAtIndex:0];
UILabel *jongel2 = [_valueLabels objectAtIndex:1];
NSString *pelleplutt = jongel.text;
NSString *pelleplutt2 = jongel2.text;