1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- //
- // 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 = 3;
- [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:RQMianColor Alignment:NSTextAlignmentCenter];
- [iv addSubview:label];
- }
- @end
|