Friday, December 20, 2013

How to add a view inside the window-based engineering

Big Brother, brother just learning iphone development. Now watching "Beginning iOS 4 Application Development" book. IDE using Xcode4, but the examples in the book are developed in Xcode3 below. Which prawn can provide a Xcode4 tutorial?
Enter the following topics. I created a window-based application projects. Then there built a UIViewController subclass, then follow the steps on the book, do step by step down. However, the following statement was reported a error.
[Window addSubview: viewController.view]; I looked a bit like saying that this statement is xcode3 in xcode4 which does not support it. So I changed the following statement self.window.rootViewController = self.viewController; but it reported a warning "Incompatible pointer types assigning to 'UIViewController *' from 'viewBasedApp'".
I do not know if I described clearly, prawn encountered the same problem.
Reply:
You look at some examples to https://github.com/erica/iphone-3.0-cookbook- download
Reply:
I suggest you carefully look at their code and configuration, [self.window addSubview: viewController.view] This usage itself should be no problem. I also used xcode4. However, we do not see the book as "Beginning iPhone 4 Development Exploring the iOS SDK".
Reply:
reference to the second floor bruce_wang reply:
suggest you carefully look at their code and configuration, [self.window addSubview: viewController.view] This usage itself should be no problem. I also used xcode4. However, we do not see the book as "Beginning iPhone 4 Development Exploring the iOS SDK".

E-book it? Can send me a copy? My problem has been resolved. Thank you for your help.
Reply:
How to solve, I have encountered this problem

No comments:

Post a Comment