cocoaTouch/otherSrc/CommodityFunctions.m
changeset 3513 f589230fa21b
parent 3495 a6b4f351d400
equal deleted inserted replaced
3512:6a8b5f313190 3513:f589230fa21b
    91 
    91 
    92 BOOL rotationManager (UIInterfaceOrientation interfaceOrientation) {
    92 BOOL rotationManager (UIInterfaceOrientation interfaceOrientation) {
    93     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    93     if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
    94         return YES;
    94         return YES;
    95     else
    95     else
    96         return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
    96         return (interfaceOrientation == UIInterfaceOrientationLandscapeRight) ||
    97 
    97                (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);  
    98 }
    98 }
    99 
    99 
   100 NSInteger randomPort () {
   100 NSInteger randomPort () {
   101     srandom(time(NULL));
   101     srandom(time(NULL));
   102     return (random() % 64511) + 1024;
   102     return (random() % 64511) + 1024;