// // SGDefineInfo.h // SGFramework // // Created by an chen on 12-9-17. // Copyright 2012年 __MyCompanyName__. All rights reserved. // /* * 释放 */ #define SG_RELEASE(x)\ if(x!=nil)\ {\ [x release];\ x = nil;\ } #define IS_IPHONE_5 ( fabs( ( double )[ [ UIScreen mainScreen ] bounds ].size.height - ( double )568 ) < DBL_EPSILON ) #define GATEWAY_DELAYER 20 /* if(x!=nil)\ {\ if( [x retainCount] > 0 )\ {\ [x release];\ x = nil;\ }\ } */ // // CGRect rect = [title.text boundingRectWithSize:CGSizeMake(title.frame.size.width, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin|NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName: title.font} context:nil]; // /**/ /* * 转换str */ #define DATA(X) [X dataUsingEncoding:NSUTF8StringEncoding] #define DocumentsPath [NSHomeDirectory() stringByAppendingString:@"/Docunents/"] #define IS_IPHONE_7 [[[UIDevice currentDevice] systemVersion] floatValue] >= 7 #define IS_IPHONE_6 [[[UIDevice currentDevice] systemVersion] floatValue] >= 6 #define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue] #define IOS_20 20 #define UpOrientation [[UIApplication sharedApplication] statusBarOrientation] == UIDeviceOrientationPortrait || [[UIApplication sharedApplication] statusBarOrientation] == UIDeviceOrientationPortraitUpsideDown #define LandOrientation [[UIApplication sharedApplication] statusBarOrientation]==UIDeviceOrientationLandscapeLeft || [[UIApplication sharedApplication] statusBarOrientation] == UIDeviceOrientationLandscapeRight #define RGBACOLOR(r,g,b,a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)] //edit an.chen #define SERVER @"http://niuniuapi.0791ts.cn/" #define SERVERNew @"http://ylyxservice3.0791ts.cn/config/" #define SERVERtest @"https://www.tsysjw.com/niuniu/updata_json.txt" #define SERVERShop @"http://ylyx.0791ts.cn/version_shop.json" #define SERVERNewtest @"http://ylyxservice2.0791ts.cn/config/" #define SERVERNewtwo @"http://ylyx.0791ts.cn/version_shop.json" #define appstore @"0" // 1 appstore 0 企业签 //#define SERVER @"http://117.21.209.145:8080/" //http://geezer.wicp.net:46877/ http://117.21.210.12/ http://aqxtest.appletrees.com.cn/ //http://cc.tshuixin.com.cn/pay/ http://m.jxpph.com/json/ //http://geezer.wicp.net:46877/ http://117.21.210.12/ http://geezer.wicp.net:56221/ http://117.21.209.145:8080/ #define SERVERTwo @"http://bookstore.eobook.com/post/" #define SERVERSUB @"http://ylyxservice2.0791ts.cn" #define RGB(r,g,b) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1] #ifdef DEBUG # define DLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); #else # define DLog(...) #endif #define DocumentsPath [NSHomeDirectory() stringByAppendingString:@"/Docunents/"] //-fno-objc-arc 关闭arc /* chao */ #define DEVW [[UIScreen mainScreen] bounds].size.width #define DEVH [[UIScreen mainScreen] bounds].size.height #define VDEVW self.view.frame.size.width #define VDEVH self.view.frame.size.height #define NavBarBackImage 1000 #define NavBarSubviews 2000 #define EndCellTag 5000 #define DownVCBT 7000 #define RootItemBT 3000 #define OrderTag 4000 #define PublicTag 10000//public tag #define PublicTagTwo 20000000//publictwo tag #define PublicTagThree 30000// #define PublicTagfour 40000// #define PublicTagfive 50000// #define PublicTagsix 60000// #define PublicTagseven 70000// #define PublicTageight 80000// #define Max_ZView 99999 #define iosversion 1 #define gameversion 1 #define gamehallname @"进贤聚友棋牌" static NSString *kAuthScope = @"snsapi_message,snsapi_userinfo,snsapi_friend,snsapi_contact"; static NSString *kAuthOpenID = @"wx586a9b321e56efb7"; static NSString *kAuthState = @"wechat_sdk"; static NSString *Appsecret = @"b2792724b9565be23e8f5ba548f117cf"; static NSString *kMessageAction = @"dotalist"; #define webPathtcp [[NSBundle mainBundle] pathForResource:@"web" ofType:nil] /* chao */