phoenix13

导航

 

1.获得屏幕尺寸

    CGRect screenBounds=[[UIScreen mainScreen] bounds];
int screenwWidth=screenBounds.size.width;
int screenHeight=screenBounds.size.height;


2.获得时间

    NSDate *nowDate = [NSDate date];// 获取本地时间
NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
[formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; // 格式化时间NSDate
NSString *stringFromDate = [formatter stringFromDate:nowDate];//转换成字符串并格式化时间格式。
return stringFromDate;

 

3.

在320*480的屏幕上:

(1)navigationbar的高度:65

(2)键盘高度:215

posted on 2012-02-09 11:17  phoenix13  阅读(234)  评论(0编辑  收藏  举报