开发者

ABPersonViewController PerformDefaultAction problem

开发者 https://www.devze.com 2023-02-17 10:03 出处:网络
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.

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

精彩评论

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