自定義tabbar


/**
 * 注意:
*  打開自定義tabbar的背景視圖的交互
* 選中的tabb視圖高度爲tabbar背景視圖的高度/2-選中視圖高度/2
* 選中視圖加載到tabbar背景視圖上
* label注意居中,imgView注意選擇適應模式,都加載到tabbar背景視圖
* 設置點擊手勢的點擊事件
-(void)test:(UITapGestureRecognizer *)tap
{
    //獲得點擊的視圖
    UIView *view = [tap view];
    [UIView beginAnimations:nil context:NULL];
    _selectView.frame = CGRectMake(5+72*view.tag, _tabBarBG.height/2-41.0/2, 70, 44 );
    
    //設置點擊切換控制器界面
    self.selectedIndex = view.tag;
}
*/


事件

相關文章
相關標籤/搜索