NSArray - filteredArrayUsingPredicate
来源:互联网 发布:广州java培训哪家好 编辑:程序博客网 时间:2024/06/05 23:45
NSArray - filteredArrayUsingPredicate:
Evaluates a given predicate against each object in the receiving array and returns a new array containing the objects for which the predicate returns true.
Declaration
SWIFT
func filteredArrayUsingPredicate(_ predicate: NSPredicate) -> [AnyObject]
OBJECTIVE-C
- (NSArray<ObjectType> *)filteredArrayUsingPredicate:(NSPredicate *)predicate
Parameters
predicate
The predicate against which to evaluate the receiving array’s elements.
Return Value
A new array containing the objects in the receiving array for which predicate returns true.
Discussion
For more details, see Predicate Programming Guide.
Availability
Available in iOS 3.0 and later.
例子:
Evaluates a given predicate against each object in the receiving array and returns a new array containing the objects for which the predicate returns true.
Declaration
SWIFT
func filteredArrayUsingPredicate(_ predicate: NSPredicate) -> [AnyObject]
OBJECTIVE-C
- (NSArray<ObjectType> *)filteredArrayUsingPredicate:(NSPredicate *)predicate
Parameters
predicate
The predicate against which to evaluate the receiving array’s elements.
Return Value
A new array containing the objects in the receiving array for which predicate returns true.
Discussion
For more details, see Predicate Programming Guide.
Availability
Available in iOS 3.0 and later.
例子:
[self.products filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"weight > 10"]];
0 0
- NSArray - filteredArrayUsingPredicate
- iOS: NSArray的方法filteredArrayUsingPredicate:
- NSArray
- NSArray
- NSArray
- NSArray
- NSArray
- NSArray
- NSARRAY
- NSArray
- NSArray
- NSArray
- NSArray
- NSArray
- NSArray
- NSArray
- NSarray ...............
- NSArray
- Java总结--线程基础
- 第八周上机实践—项目5—计数的模式匹配
- 菜鸟学算法之POJ 1564 Sum It Up
- oracle日志目录查看
- CUDA 图像处理使用纹理内存与不使用纹理内存对比
- NSArray - filteredArrayUsingPredicate
- 彻底解决_OBJC_CLASS_$_某文件名", referenced from:
- 十个数求最大
- 最后一个单词的长度(LintCode)
- linux安装nginx
- 当你输入一个网址的时候,实际会发生什么?
- Logstash学习3_通过Kafka传输数据给logstash-1.4和logstash-1.5
- 第六周 数据结构实践——后缀式表达
- 第九周项目三~~~稀疏矩阵相加