-
Notifications
You must be signed in to change notification settings - Fork 8
Aggregated friend picker
shu223 edited this page Sep 5, 2013
·
6 revisions
###Present aggregated frined picker
Same as usual UIViewController subclasses.
ASFriendPickerViewController *pickerCtr = [[ASFriendPickerViewController alloc] init];
pickerCtr.delegate = self;
// customize here
[self presentViewController:pickerCtr animated:YES completion:nil];
Implement the delegate methods.
- (void)friendPickerViewController:(ASFriendPickerViewController *)controller
didPickedFriends:(NSArray *)friends
{
self.pickedFriends = friends;
[controller dismissViewControllerAnimated:YES
completion:^{
// do something after friends being picked
}];
}
To enable invitation via Twitter, you should set an ACAccount object as below:
- (void)twitterAccountDidSelect:(ACAccount *)account {
[ASInviter setSenderAccount:account type:ASInviteTypeTwitterDM];
}
It's needed because of the multi-account support.
###Invite friends picked from the Friend Picker
Call inviteFriends method.
[ASInviter inviteFriends:self.pickedFriends
inviteInfo:inviteInfo
completion:nil];
###(OPTIONAL) Enable the user customize their invitation message
Coming soon!