All pastes #2048202 Raw Edit

Stuff

public text v1 · immutable
#2048202 ·published 2011-04-19 11:27 UTC
rendered paste body
UITabBarItem *tabBarItems[4];
	tabBarItems[0] = [[UITabBarItem alloc] initWithTitle:@"Kanallar" 	image:[UIImage imageNamed:@"photos.png"] tag:0];
	tabBarItems[1] = [[UITabBarItem alloc] initWithTitle:@"Canlı" 		image:[UIImage imageNamed:@"rss.png"] tag:1];
	tabBarItems[2] = [[UITabBarItem alloc] initWithTitle:@"Yorumlar" 	image:[UIImage imageNamed:@"speechbubble.png"] tag:2];
	tabBarItems[3] = [[UITabBarItem alloc] initWithTitle:@"Ayarlar" 	image:[UIImage imageNamed:@"preferences.png"] tag:3];
	NSArray *_tabBarItems = [NSArray arrayWithObjects:tabBarItems count:4];
	tabBar = [[UITabBar alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 50, 320, 50)];
	tabBar.autoresizingMask = UIViewAutoresizingFlexibleTopMargin;
	tabBar.backgroundColor = [UIColor clearColor];
	tabBar.clearsContextBeforeDrawing = false;
	tabBar.opaque = false;
	tabBar.delegate = self;
	
	//UIImageView* bottom = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tabbar.png"]];
	//bottom.frame = CGRectMake(0, -46, 320, 96);
	//bottom.autoresizingMask = UIViewAutoresizingFlexibleTopMargin;
	//[tabBar addSubview:bottom];
	//[tabBar sendSubviewToBack:bottom];
	//[bottom release];
	
	[tabBar setItems:_tabBarItems animated:false];
	[self.view addSubview:tabBar];