iTunes U – iPad and iPhone Application Development (SD)
i downloaded all of the content already. It’s great tool to learn xcode, objective-c, and mvc for iOS development.
Posts Tagged ‘ iphone ’
i downloaded all of the content already. It’s great tool to learn xcode, objective-c, and mvc for iOS development.
Next Gen of Flash Authoring tool would allow developers to create native iPhone application.
Read more at the original source
This is a very great news!
When iPhone came out for the first time, I was amazed at how iPhone rotated safari web browser. I wondered how iPhone would rotate it and was not aware that not all iPhone applications are rotatable, but now I know how.
Let’s assume that we already have your own extended UIViewController class. UIViewController class has these two classes for the rotate feature:
1 2 3 4 5 6 7 | -(BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation { } -(void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration { } |
shouldAutorotateToInterfaceOrientation method. You simply just return “YES” so that the viewcontroller rotate its views automatically. The 2nd method “willRotateToInterfaceOrientation” is the one you want to implement.
Let’s say you already had one UIView object with white color background. When you rotated your iPhone or iPhone simulator to landscape orientation, the UIView would be rotated. However, the view wouldn’t fit the screen. To make the view to stretch to the all 4 edges of the screen, I would write something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 | -(void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)orientation duration:(NSTimeInterval)duration { CGRect appFrame; appFrame.origin = CGPointMake(0.0f, 0.0f); if ((orientation == UIInterfaceOrientationLandscapeLeft) || (orientation == UIInterfaceOrientationLandscapeRight)) appFrame.size = CGSizeMake(480.0f, 300.0f); else appFrame.size = CGSizeMake(320.0f, 460.0f); [contentView setFrame:appFrame]; } |
As you can see, every time view gets rotated, you would need to use setFrame method to set the new frame with a new size and new origin.
Coding was 2nd fight. The first fight that I had to deal was to set up provisioning profile correctly so that I can test my app on my iPhone device. I do not have any hair left to pull out. (j/k) Seriously it should not be this difficult to comprehend how to set it up correctly. Follow this and this if you have an error like “ApplicationVerification Failed” when compiling your project and installing your app to iphone device. Those two links give the comprehensive guides to setting up your environment for developing and testing your app on your device.
A note: In iPhone SDK 2.2 there is no “Code Signing Provisioning Profile” column in the property anymore. Instead, it’s merged into Code Signing Identity as shown in the photo. 
I downloaded the wordpresd iPhone app couple days ago and finally started to use it. So far so good