1
當我點擊的是位於的UINavigationBar
頂部我有這樣的光澤效果UIButton
:光澤效果
我怎麼能這樣的效果添加到另一個按鈕位於UINavigatonBar
但不是左側或右側按鈕項目?像這樣:
UIButton * emptyButton = [UIButton buttonWithType:UIButtonTypeCustom];
[emptyButton setFrame:CGRectMake(119, 5, 82, 35)];
[emptyButton addTarget:self action:@selector(centerNavigationBarTitleClicked:) forControlEvents:UIControlEventTouchUpInside];
[emptyButton setBackgroundColor:[UIColor clearColor]];
[self.navigationController.navigationBar addSubview:emptyButton];
謝謝!
感謝的人,偉大的工程! –