Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting screen size #45

Open
ik2wxx opened this issue Jul 5, 2013 · 1 comment
Open

Setting screen size #45

ik2wxx opened this issue Jul 5, 2013 · 1 comment

Comments

@ik2wxx
Copy link

ik2wxx commented Jul 5, 2013

Hi there
Sorry for the silly question, how do I set the size of the screen for FGallery ?
I need to restrict the are 'couse I have a custom nav bar in the top.
Any help ?
Tnx
Roberto

@fahadch
Copy link

fahadch commented Nov 27, 2013

please try this.

1.in view will appear,set default navigation bar hidden
self.navigationController.navigationBarHidden=YES;
2.create your custom navigation bar and added it as subview to to the view,
just like.
imgview=[[UIImageView alloc]initWithFrame:CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y, 320, 45)];
[imgview setImage:[UIImage imageNamed:@"Top-bar-bg.png"]];
[self.view addSubview:imgview];

    back_button=[UIButton buttonWithType:UIButtonTypeCustom];
    back_button.frame=CGRectMake(self.view.frame.origin.x, -1, 44, 45);
    [back_button  setBackgroundImage:[UIImage imageNamed:@"back.png"] forState:UIControlStateNormal];
    [back_button addTarget:self action:@selector(backpressed) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:back_button];

    navtext=[[UILabel alloc]initWithFrame:CGRectMake(79, 14, 165, 21)];
    [navtext setText:@"Latest Photos"];
    [navtext setBackgroundColor:[UIColor clearColor]];
    navtext.textColor=[UIColor colorWithRed:33/255.0 green:64/255.0 blue:108/255.0 alpha:1.0];
    navtext.textAlignment=UITextAlignmentCenter;
    [navtext setFont:[UIFont fontWithName:@"BebasNeue" size:20]];
    [self.view addSubview:navtext];

    count_lbl=[[UILabel alloc]initWithFrame:CGRectMake(270, 20, 50, 21)];
    count_lbl.textAlignment=UITextAlignmentCenter;
    count_lbl.textColor=[UIColor colorWithRed:33/255.0 green:64/255.0 blue:108/255.0 alpha:1.0];

    [count_lbl setFont:[UIFont fontWithName:@"BebasNeue" size:15]];
    [count_lbl setBackgroundColor:[UIColor clearColor]];
    [self.view addSubview:count_lbl];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants