NSBundle UIScreen

来源:互联网 发布:mac吃土色口红推荐 编辑:程序博客网 时间:2024/06/06 08:26

m

1:获取程序包内部的根目录

[csharp] view plaincopy
  1. NSLog(@"bundlePath:%@",[[NSBundle mainBundle] bundlePath]);  

2:获取某App的系统配置文件的所有值存入 NSDictionary 键值对中

[csharp] view plaincopy
  1. NSDictionary *dicAppInfo = [[NSBundle mainBundle] infoDictionary];  


------------------------------------------------------------------------------NSBundle------------------------------------------------------------------------------




------------------------------------------------------------------------------UIScreen------------------------------------------------------------------------------

1:整个屏幕的大小 {{0, 0}, {320, 480}}

[csharp] view plaincopy
  1. CGRect bounds = [UIScreen mainScreen].bounds;  
  2. NSLog(@"UIScreen bounds: %@", NSStringFromCGRect(bounds));  


2:应用程序窗口大小 {{0, 20}, {320, 460}}

[csharp] view plaincopy
  1. CGRect applicationFrame = [UIScreen mainScreen].applicationFrame;  
  2. NSLog(@"UIScreen applicationFrame: %@", NSStringFromCGRect(applicationFrame)); 

0 0
原创粉丝点击