depicus

  just another nerd on the interweb…



  • home
  • gallery
  • play page
  • privacy
  • support
  • videos
  • what is depicus

Posts Tagged ‘Bug’

XIB iPad orientation in landscape problem and solution

Wednesday, January 26th, 2011



If you want to show a secondary nib file you may have noticed that it shows fine in portrait mode but from startup not in landscape mode.

This is what I use to fix this. Seems like a fudge but it works, I call this after creating the view.

vSettings is a UIView and backGroundSettings is a UIImageView.

View Code OBJC
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
- (void) animateFlipInView:(NSString *)theNib;
{
    UIInterfaceOrientation toInterfaceOrientation = self.interfaceOrientation;
    NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:theNib owner:self options:nil];
    vSettings = [nibObjects objectAtIndex:0];
    [self.view addSubview:vSettings];
    if (iPadCheck)
    {
        if ((toInterfaceOrientation == UIDeviceOrientationLandscapeLeft) || 
			(toInterfaceOrientation == UIDeviceOrientationLandscapeRight)) 
        {
            CGRect contentRect = CGRectMake(0,0,1024,768);
            vSettings.bounds = contentRect;
            CGRect myFrame = vSettings.frame;
            myFrame.origin.x = 0.0;
            myFrame.origin.y = 0.0;
            vSettings.frame = myFrame;
            UIImage *image;
			image = [UIImage imageNamed: @"Default-Landscape.png"];
            [backGroundSettings setImage:image];
		}
    }
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:1.0];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
    [UIView commitAnimations];
}

Tags: Apple, Bug, iPad, NIB, XIB
Posted in Software Development | Comments Off

How to repair multiple entries in “Open With” menu on OSX

Sunday, January 23rd, 2011



Ever open the “Open With” and seen multiple entries for the same program ? Here is how to fix this problem.

Open the Terminal and paste in this code

View Code OBJC
1
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user

Then reboot and voila….

Tags: Bug, Menu
Posted in OS X | Comments Off

  • how i pay the bills

  • depicus in africa

    depicus in africa
  • my charity page

    JustGiving - Sponsor me now!
  • friends

    • Agency Manager
    • AllClear Travel
    • Climbing Tikes
    • Globe Bloggers
    • Marchday
    • The Travel Toad
  • gallery

    IMG_3072 IMG_3003 Ferrari Bisley Developments Ltd
  • videos

    Vimeo

    YouTube
  • twitter

    • No public Twitter messages.
  • recent comments

    • john coull: correction to above, its www.oakley-ukstore.com
    • john coull: they are at it again. adverts on facebook . they are being hosted by enotch.com on ip address...
    • steve: The site are selling £120+ Oakley sun glasses for £13.00 I think its safe to say they may be either...
    • rob: have received a pair of glasses not what ive ordered they are now telling me the ones ive ordered are out of...
    • phil: hi i have purchased some (stupidly),not arrived yet, will they arrive/will they be fake/plz help

Copyright © - depicus | Entries (RSS) | Comments (RSS)

WordPress theme butchered and amended by me.