CGRect frame = [[UIScreen mainScreen] bounds]; NSLog(@"frame :%@",frame); 这样输入是nullNSLog(@"frame :%f",frame.size.width); 这样有值[[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height 屏幕的宽和高