hello everyone
I want to resize the tab bar title like the below image:
I don't know what i must to do to get it done. Please help !
Thanks in advance !
thank you very much !
Hi,
There are currently 2 ways to achieve the tab appearance you're asking for. The first way is to use a custom image like our Tab Custom sample in the NucliOS sample browser, and the second way manually creates a tab that has a circle shape layer. The source for the second method is found below.
- (void)initializeTabs { //Create the slide tab view _slidetabView = [[IGSlideTabView alloc] initWithFrame:self.view.bounds]; _slidetabView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; [self.view addSubview:_slidetabView]; //Create the circle shape layer _circleShapeLayer = [CAShapeLayer layer]; _circleShapeLayer.path = [UIBezierPath bezierPathWithOvalInRect: CGRectMake(0, 0, 40, 40)].CGPath; _circleShapeLayer.fillColor = [UIColor colorWithRed:91/255.0f green:172/255.0f blue:225/255.0f alpha:1.0].CGColor; //Create the left tab that holds the circle shape _leftTabView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; [_leftTabView.layer addSublayer:_circleShapeLayer]; //Create the circle shape label _circleLabel = [[UILabel alloc] initWithFrame:_leftTabView.bounds]; _circleLabel.textColor = [UIColor whiteColor]; _circleLabel.textAlignment = NSTextAlignmentCenter; _circleLabel.font = [UIFont fontWithName:@"HelveticaNeue" size:20]; _circleLabel.text = @"\u2794"; [_leftTabView addSubview:_circleLabel]; //Create a content view _leftContent = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 200, 200)]; _leftContent.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1.0]; //Create the slide tab item _slideTabLeft = [IGSlideTabItem tabWithLocation:IGSlideTabLocationLeft title:nil tabView:_leftTabView contentView:_leftContent]; _slideTabLeft.tabSize = _leftTabView.bounds.size; _slideTabLeft.contentSize = [IGSlideTabContentSize sizeWithWidth:200 height:200]; [_slidetabView addTab:_slideTabLeft]; }