UIBoolButtonItem을 터치하고 이동하여 슬라이딩 UIToolbar를 만들고 싶습니다. 몇 가지 주제를 읽고 touchesMoved를 구현해야한다는 것을 알았습니다. 그러나 어디에서? UIBarButtonItem에있는 UIButton을 발견 한 곳입니다. (: 조치 : forEvents addTarget을) 그리고 그것은 매우 정확한, 작품의 touchesMoved가 UIBarButtonItem에 대해 작동하지 않습니다.
이
내가 행동에있는 UIButton을 결합하려고하는 것이이에서의 ViewController 의 viewDidLoadself.toolbar = [[UIToolbar alloc] initWithFrame: CGRectMake(bounds.origin.x, bounds.size.height - 2.5*height, bounds.size.width, 2*height)];
SlideButton* infoButton = [SlideButton buttonWithType: UIButtonTypeDetailDisclosure];
UIBarButtonItem *slideButton = [[UIBarButtonItem alloc]initWithCustomView:infoButton];
self.toolbar.items = items;
[self.view addSubview:self.toolbar];
대부분의 이상하다. 그러나 나는 어떤 사건도 발생하지 않기 때문에 접촉의 위치를 취할 수 없으므로이 접근법을 사용할 수 없습니다.
감사합니다.이 인식 방법에 대해 알지 못합니다. – skyylex