FBPeoplePickerViewController.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Copyright 2010-present Facebook.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import <UIKit/UIKit.h>
  17. #import "FBGraphObjectPickerViewController.h"
  18. /*!
  19. @typedef NS_ENUM (NSUInteger, FBFriendSortOrdering)
  20. @abstract Indicates the order in which friends should be listed in the friend picker.
  21. @discussion
  22. */
  23. typedef NS_ENUM(NSUInteger, FBFriendSortOrdering) {
  24. /*! Sort friends by first, middle, last names. */
  25. FBFriendSortByFirstName = 0,
  26. /*! Sort friends by last, first, middle names. */
  27. FBFriendSortByLastName
  28. };
  29. /*!
  30. @typedef NS_ENUM (NSUInteger, FBFriendDisplayOrdering)
  31. @abstract Indicates whether friends should be displayed first-name-first or last-name-first.
  32. @discussion
  33. */
  34. typedef NS_ENUM(NSUInteger, FBFriendDisplayOrdering) {
  35. /*! Display friends as First Middle Last. */
  36. FBFriendDisplayByFirstName = 0,
  37. /*! Display friends as Last First Middle. */
  38. FBFriendDisplayByLastName,
  39. };
  40. /*!
  41. @class
  42. @abstract
  43. The `FBPeoplePickerViewController` class is an abstract controller object that manages
  44. the user interface for displaying and selecting people.
  45. @discussion
  46. When the `FBPeoplePickerViewController` view loads it creates a `UITableView` object
  47. where the people will be displayed. You can access this view through the `tableView`
  48. property. The people display can be sorted by first name or last name. People's
  49. names can be displayed with the first name first or the last name first.
  50. The `delegate` property may be set to an object that conforms to the <FBGraphObjectPickerDelegate>
  51. protocol, as defined by <FBGraphObjectPickerViewController>. The graph object passed to
  52. the delegate conforms to the <FBGraphPerson> protocol.
  53. */
  54. @interface FBPeoplePickerViewController : FBGraphObjectPickerViewController
  55. /*!
  56. @abstract
  57. A Boolean value that specifies whether multi-select is enabled.
  58. */
  59. @property (nonatomic) BOOL allowsMultipleSelection;
  60. /*!
  61. @abstract
  62. The profile ID of the user whose 'user_friends' permission is being used.
  63. */
  64. @property (nonatomic, copy) NSString *userID;
  65. /*!
  66. @abstract
  67. The list of people that are currently selected in the veiw.
  68. The items in the array are <FBGraphPerson> objects.
  69. */
  70. @property (nonatomic, copy, readonly) NSArray *selection;
  71. /*!
  72. @abstract
  73. The order in which people are sorted in the display.
  74. */
  75. @property (nonatomic) FBFriendSortOrdering sortOrdering;
  76. /*!
  77. @abstract
  78. The order in which people's names are displayed.
  79. */
  80. @property (nonatomic) FBFriendDisplayOrdering displayOrdering;
  81. @end