I started to read the the Objc-C for Absolute Beginners book and got to the first iPhone programming part. It was designed for Xcode 3 and I am trying to implement it for 4. It says to type in the instance variables and the 2 methods, then open up IB. I jumped to IB first in the book and built the buttons and labels because I know I can just control click drag the IBOutlets and IBActions to the .h from the .xib
The book told me to to call the project 'RandomNumber' and to write out the methods in the 'RandomNumberViewController.m' where we would link them. But when I control drag buttons to the window in the RNVC .xib in the interface builder they fill the whole window area, weird thing happen? the Label snaps all the way to the left too? The program also created the RandomNumberAppDelegate.h and .m files and I can see the standard Window in the .xib file.
Is the book out dated? Should I be using the AppDelegate instead of the custom class I created 'RandomNumberViewControler' to link all the labels and buttons, or does it matter?
When I click on the .xib file in Xcode4 I can see the standard iPhone window to work with. So why is the book telling me to do everything in a custom class?
Thanks,
-Lars
-Lars
The book told me to to call the project 'RandomNumber' and to write out the methods in the 'RandomNumberViewController.m' where we would link them. But when I control drag buttons to the window in the RNVC .xib in the interface builder they fill the whole window area, weird thing happen? the Label snaps all the way to the left too? The program also created the RandomNumberAppDelegate.h and .m files and I can see the standard Window in the .xib file.
Is the book out dated? Should I be using the AppDelegate instead of the custom class I created 'RandomNumberViewControler' to link all the labels and buttons, or does it matter?
When I click on the .xib file in Xcode4 I can see the standard iPhone window to work with. So why is the book telling me to do everything in a custom class?
Thanks,
-Lars
-Lars