刚刚开始学习ios,用ios编程第四版在学习,但是按照书上的代码运行后的矩形只能显示一部分,还请大神帮分析
@implementation AppDelegate
-
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
CGRect firstFrame = self.window.bounds; 这里是设置第一图层占满整个根图层,但是显示只显示4分之1矩形
MMXHypnosisView *firstView=[[MMXHypnosisView alloc]initWithFrame:firstFrame];
firstView.backgroundColor= [UIColor redColor];
[self.window addSubview:firstView];
// Override point for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[UIViewController alloc]init];
[self.window makeKeyAndVisible];
return YES;
}