开发者

ABPersonViewController PerformDefaultAction problem

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜