Skip to content

Posts from the ‘Dev Tips’ Category

22
Jan

Force iOS Screen Orientation to Only Landscape or Picture

If you want to force / limit screen orientation for an iOS application go to your project -> Info section and remove the orientations you do not want from Supported Interface Orientations option.

21
Jan

OpenGL Wrong Orientation with Xcode 4.6 and iOS 6

If your windows of your OpenGL app has a wrong orientation try replacing the following code (from YourProgramAppDelegate.m):

from:

- (void) applicationDidFinishLaunching:(UIApplication *)application
{
    [window addSubview:viewController.view];
}

to:

- (void) applicationDidFinishLaunching:(UIApplication *)application
{
    [window setRootViewController:viewController];
}
21
Jan

Add multiple delegate protocols in view

If you want to add more than one delegate you will add them in the same place and it will be comma separated:

@interface MyAppViewController : UIViewController<UIAccelerometerDelegate, UITextFieldDelegate>
21
Jan

Code Sign error: Provisioning profile ‘YYYXXDFRTSSA’ can’t be found

If you get the following error trying to rebuild an old Xcode project:

Code Sign error: Provisioning profile YYYXXDFRTSSA can’t be found

then, to solve the problem look into ProjectName.xcodeproj directory for a file:

project.pbxproj

Edit project.pbxproj and remove your provision profile string (for example in our case YYYXXDFRTSSA) and just let a blank string instead ( “” ).

16
Jan

Change Xcode Storyboard / XIB display format from 4 inch to 3.5 inch form factor

If you want to change Xcode’s Storyboard / XIB display format from 4 inch to 3.5 inch form factor to display view on older iPhone / iPad instead of iPhone 5 click on the following button (first from the left):

change xib storyboard format 4 inch 3.5 inch