-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathKNSelectorItem.h
29 lines (23 loc) · 969 Bytes
/
KNSelectorItem.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//
// KNSelectorItem.h
// KNFBFriendSelectorDemo
//
// Created by Kent Nguyen on 4/6/12.
// Copyright (c) 2012 Kent Nguyen. All rights reserved.
//
@interface KNSelectorItem : NSObject
@property (strong,nonatomic) NSString * displayValue;
@property (strong,nonatomic) NSString * selectValue;
@property (strong,nonatomic) NSString * imageUrl;
@property (nonatomic) BOOL selected;
// Init with a simple value and no image
-(id)initWithDisplayValue:(NSString*)displayVal;
// Init with a display value that is different from actual value and with optional image
-(id)initWithDisplayValue:(NSString*)displayVal
selectValue:(NSString*)selectVal
imageUrl:(NSString*)image;
// You can use these to sort items using [NSArray sortedArrayUsingSelector:]
// Refer to Facebook Friend selector example
-(NSComparisonResult)compareByDisplayValue:(KNSelectorItem*)other;
-(NSComparisonResult)compareBySelectedValue:(KNSelectorItem*)other;
@end