I want to put an icon in the header of the view controller like bbc news application, to maximize and minimize the font.
I have to know, is there any library to do that?
I want to put an icon in the header of the view controller like bbc news application, to maximize and minimize the font.
I have to know, is there any library to do that?
Hope this would help you..
UIView *customView=[[UIView alloc]initWithFrame:CGRectMake(10, 0, 40, 40)];
UIButton *btnAction =[UIButton buttonWithType:UIButtonTypeCustom];
[btnAction addTarget:self action:@selector(btnActionClick) forControlEvents:UIControlEventTouchDragInside];
[btnAction setFrame:CGRectMake(0, 0, 40, 58)];
[customView addSubview:btnAction];
UIButton *btnFont =[UIButton buttonWithType:UIButtonTypeCustom];
[btnFont addTarget:self action:@selector(btnFontClick) forControlEvents:UIControlEventTouchDragInside];
[btnAction setFrame:CGRectMake(30, 0, 40, 58)];
[customView addSubview:btnAction]
UIBarButtonItem *MessageBtn=[[UIBarButtonItem alloc]initWithCustomView:customView];
By using following code , you can put the button as you want in the header of viewcontroller.
But to set the font (minimize or maximize), you have to write other code.
You can do google for it.
[self.navigationItem setRightBarButtonItem:"BUTTON"animated:YES];