I'm trying to implement iPad app in iPhone, The steps i followed are
- Copied the existing
.xibof first view controller and renamed it toname_iPhone.xib Enabled size class and auto layouts for
name_iPhone.xibKept the size for view as
Inferred
Now i am printing the screen width(self.view.frame) in log.
NSLog(@"View Frame : %@",NSStringFromCGRect(self.view.frame));
The result is
View frame : {{0, 0}, {600, 600}} //this is the results regardless of any device i run
Actually the log should print the device(in which i am running the app) dimensions, But it always prints 600*600 regardless of device in which app is running. How to automatically resize the root view of a controller according to device dimensions. Please help me finding the solution.
0 comments:
Post a Comment