when i click a phone number record on the person view nothing happen for the HandlePvcPerformDefaultAction method. what should i do more? i just want to get selected phone number from this view.
ABPersonViewController pvc;
.....
pvc.DisplayedPerson = e.Person;
pvc.AllowsEditing = false;
pvc.PerformDefaultAction += HandlePvcPerformDefaultAction;
this.PresentModalViewController (pvc, true);
......
void HandlePvcPerf开发者_运维问答ormDefaultAction (object sender, ABPersonViewPerformDefaultActionEventArgs e)
{
Console.WriteLine("HandlePvcPerformDefaultAction");
}
I think that in Objective-C the corresponding method for HandlePvcPerformDefaultAction returns a BOOL (as in: Should you perform the default action for the selected element?).
So I think you should change the return type to bool and return true.
精彩评论