Commit baa1ad95 authored by 勾芒's avatar 勾芒

Merge remote-tracking branch 'origin/master'

parents d2d48b1c 52cf1962
...@@ -10,4 +10,9 @@ ...@@ -10,4 +10,9 @@
@interface AboutViewController : BaseViewController @interface AboutViewController : BaseViewController
@property (weak, nonatomic) IBOutlet UILabel *versionLabe;
@end @end
...@@ -17,8 +17,20 @@ ...@@ -17,8 +17,20 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
self.versionLabe.layer.masksToBounds = YES;
self.versionLabe.layer.cornerRadius = 10;
self.versionLabe.layer.borderWidth = 2;
self.versionLabe.layer.borderColor = kMainBlueColor.CGColor;
self.versionLabe.textAlignment = NSTextAlignmentCenter;
self.versionLabe.text = [self getAppVersion];
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
...@@ -34,4 +46,13 @@ ...@@ -34,4 +46,13 @@
} }
*/ */
- (NSString*)getAppVersion {
NSString *ver = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"CFBundleShortVersionString"];
NSString *build = [[[NSBundle mainBundle] infoDictionary]
objectForKey:@"CFBundleVersion"];
return [NSString stringWithFormat:@"Version %@.%@",ver,build];
}
@end @end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment