0
我創建了一個視圖控制器,並尋找一種方法來創建一個指向導航欄的指針。 在故事板,已經有一個UINavigationBar的 我得到了姿態的一部分到這裏:如何創建一個指向UINavigation Bar的指針並添加一個UILongGestureRecognizer?
UILongPressGestureRecognizer* someGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:theNavBar action:@selector(paintGesture:)];
adminGesture.minimumPressDuration = 1; // recognize as soon as the touch goes down
//adminGesture.delegate = self;
[self.view addGestureRecognizer:adminGesture];
,但不知道如何調用theNavBar
UINavigationItem*theNavBarTitle = self.navigationItem;
是正確的嗎?我究竟做錯了什麼?提前致謝。
效果很好,謝謝! – tipsywacky
歡呼聲。很高興我能幫上忙 – bkbeachlabs