// // AboutVC.m // jiaPei // // Created by apple on 15/11/18. // Copyright (c) 2015年 JCZ. All rights reserved. // #import "AboutVC.h" @interface AboutVC () @end @implementation AboutVC - (void)viewDidLoad { [super viewDidLoad]; [self myInit]; } -(void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; self.navigationController.navigationBar.alpha = 1.0; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } -(void)myInit { [self setTitle:@"关于"]; [self goBackByNavigation]; UIImageView* iv = [[UIImageView alloc] initWithFrame:CGRectMake(0, -kNavOffSet, kSize.width, kSize.height)]; [iv setImage:[UIImage imageNamed:@"about"]]; [self.view addSubview:iv]; CGFloat x = kSize.width/3.0; CGFloat w, h; w = h = x; UIImageView *logoImg = [[UIImageView alloc] initWithFrame:CGRectMake(x, 100, w, h)]; logoImg.image = [UIImage imageNamed:@"defaultLogo"]; logoImg.layer.masksToBounds = YES; logoImg.layer.cornerRadius = 5; [iv addSubview:logoImg]; NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; // app名称 NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"]; // app版本 NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; NSString *str = [NSString stringWithFormat:@"%@(%@)",app_Name,app_Version]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(x - 30, 100 + h + 0, w + 60, 50)]; label.backgroundColor = [UIColor clearColor]; [label setText:str Font:24 TextColor:RGB_COLOR(116, 0, 5) Alignment:NSTextAlignmentCenter]; [iv addSubview:label]; } @end