ios ABPersonViewController委托,非tappable note属性

时间:2012-08-24 09:47:16

标签: iphone ios addressbook

我正在尝试使用ABPerson提供ABPersonViewController记录,以便在用户点按特定属性时执行自定义操作。

在我的代码中,我为“Note”属性添加/替换标记,因此,当点击它时,我将执行预定义的自定义操作。

问题是Note属性似乎不是“tappable”,如果我继续从演示者控制器中选择它,它会以EXC_BADACCESS错误结束。

在我的代码中:

- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker
  shouldContinueAfterSelectingPerson:(ABRecordRef)person {

    ABRecordID personID = ABRecordGetRecordID (person);

    NSString *label = nil;
    CFErrorRef error;

    if (-bool selector-) {
        label = @"send";
    } else {
        label = @"scan";
    }

    if (! ABRecordSetValue(person, kABPersonNoteProperty, label, &error)){
        NSLog(@"ERROR while setting note property");
        NSLog(@"%@", CFErrorCopyDescription(error));
    }


    ABPersonViewController * _contantInfo = [[ABPersonViewController alloc] init];  
    _contantInfo.personViewDelegate = self;
    _contantInfo.displayedPerson = person;

    [self.navigationController pushViewController:_contantInfo animated:YES];
}
为所有属性正确调用

shouldPerformDefaultActionForPerson委托协议,但“Note”属性。

有什么想法吗?注意属性可以这种方式使用吗? 感谢

来自gdb的“where”命令:

*#0 0x0cf77be0在TI :: Favonius :: BeamSearch :: choose_hit_test_node()在TI
#1 0x0cf781bf :: Favonius :: BeamSearch :: update_for_touch()
#2 0x0cf7f492在TI: :Favonius :: StrokeBuildManager :: update_search_for_touch()
#3 0x0cf7fbef在TI :: Favonius :: StrokeBuildManager :: key_down_or_drag_hit_test_for_UI()
#4 0x0cf5c067在TIInputManagerZephyr :: simulate_touches_for_input_string()
#5 0x0cf6ec39在 - [TIKeyboardInputManagerZephyr候选]()
#6 0x00cb1008在 - [UIKeyboardImpl generateAutocorrectionReplacements:]()
中的 71-#7 0x00e162ac [UITextInteractionAssistant scheduleReplacementsForRange:withOptions:] _ block_invoke_0()
#8 0x00e30e62 in - [UITextSelectionView calculateAndShowReplacements:]()
#9 0x0146985d in __NSFireDelayedPerform()
#10 0x01b2e936 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION
()
#11 0x01b2e3d7 in __CFRunLoopDoTimer( )## 0x01a91790 in __CFRunLoopRun()
#13 0x01a90d84 in CFRunLoopRunS pecific()
#14)在0x01a90c9b CFRunLoopRunInMode()
#15 0x02a877d8在GSEventRunModal()在GSEventRun
#16 0x02a8788a(
#17 0x00b43626在UIApplicationMain()
*

0 个答案:

没有答案