본문 바로가기

개발도구/iOS - 아이폰 개발

[iphone]customizable TabBarController

 iDev Recipes : https://github.com/boctor/idev-recipes/tree/master/RaisedCenterTabBar




UIButton* button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(0.0, 0.0, buttonImage.size.width, buttonImage.size.height);
[button setBackgroundImage:buttonImage forState:UIControlStateNormal];
[button setBackgroundImage:highlightImage forState:UIControlStateHighlighted];

CGFloat heightDifference = buttonImage.size.height - self.tabBar.frame.size.height;
if (heightDifference < 0)
  button.center = self.tabBar.center;
else
{
  CGPoint center = self.tabBar.center;
  center.y = center.y - heightDifference/2.0;
  button.center = center;
}

[self.view addSubview:button];



other)
http://winplz.tistory.com/entry/Customize-2-Tabbar



other1)

http://kurrytran.blogspot.kr/2011/10/ios-5-tutorial-creating-custom-tab-bar.html