凸出按鈕的TabBar
- (void)addCenterBtn{
UIImage * image = [UIImage imageNamed:@"money"];
UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
[btn setImage:image forState:UIControlStateNormal];
btn.frame = CGRectMake(0, 0, image.size.width, image.size.height);
[btn addTarget:self action:@selector(centerClicked) forControlEvents:UIControlEventTouchUpInside];
//設定凸出按鈕的位置
CGPoint center = self.tabBar.center;
center.y -= 15;
btn.center = center;
//去掉點選按鈕時的陰影
btn.adjustsImageWhenHighlighted = NO;
[self.view addSubview:btn];
}
- (void)centerClicked{
self.selectedIndex = 1;
}
相關文章
- iOS Tabbar中間新增凸起可旋轉按鈕iOStabBar
- Fiori Elements List Report table 裡的普通按鈕,Global 按鈕 和 Determining 按鈕
- 高亮按鈕
- LabVIEW的自定義按鈕View
- Flutter Button(按鈕)Flutter
- 小程式按鈕
- 復飛按鈕
- 乾貨!必看創意按鈕設計,打造真正的按鈕誘惑
- flutter demo (一):居中的按鈕Flutter
- idea除錯按鈕的作用Idea除錯
- HTML input image 按鈕HTML
- HTML input button 按鈕HTML
- HTML input image按鈕HTML
- HTML input button按鈕HTML
- vue 封裝按鈕Vue封裝
- VBA命令按鈕操作
- 瞭解下Foundation 按鈕
- Simple WPF: WPF 實現按鈕的長按,短按功能
- vue之神奇的動態按鈕Vue
- Qt更改按鈕樣式 (以QSpinBox使用左右按鈕樣式為例)QT
- Pew:川普就職後“憤怒”按鈕成Facebook使用者使用最多的按鈕
- JFrame容器和JButton按鈕
- flutter demo (二):禁用按鈕Flutter
- 單選多選按鈕
- [JS]bootstrapTable新增操作按鈕JSbootAPT
- HTML input reset 重置按鈕HTML
- Python文字框與按鈕Python
- Tkinter (02) 按鈕部件 Button
- 按鈕式超連結
- 瞭解下Foundation 按鈕組
- MFC 捕獲按鈕 按下和抬起 (轉)
- QT經驗(一)——按鈕長按事件分析QT事件
- javascript閉包的使用–按鈕切換JavaScript
- css 最經典的按鈕樣式CSS
- VC 點陣圖按鈕CBitmapButton的使用
- 可能被忽略的"按鈕元件"細節元件
- 如何自定義radio按鈕的樣式
- css設定按鈕心跳收縮後,按鈕文字上下抖動,如何解決?CSS
- HTML input radio單選按鈕HTML