//
|
// MRFirsstHead.h
|
// MaoerProject
|
//
|
// Created by eliolu on 2018/8/15.
|
// Copyright © 2018年 eliolu. All rights reserved.
|
//
|
|
//CSGame.bundle路径
|
//正式
|
#define MRwebURL @"https://phalapi.maoergame.com/"
|
#define MRbaseURL @"https://api.maoergame.com/"
|
#define MRbasePURL @"https://api3.maoergame.com/"
|
#define MRtestPURL @"https://payment.maoergame.com/"
|
//测试
|
//#define MRwebURL @"http://phalapi.morzz.com/"
|
//#define MRbaseURL @"http://api.morzz.com/"
|
//#define MRbasePURL @"http://api3.morzz.com/"
|
//#define MRtestPURL @"http://payment.morzz.com/"
|
|
#define KIsiPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
|
|
#define WeakSelf __weak typeof(self) weakSelf = self;
|
#define MRGame_BundlePath [NSBundle bundleWithPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"MRBundle.bundle"]]
|
#define MRGame_UIImageName(A) [UIImage imageNamed:[NSString stringWithFormat:@"MRBundle.bundle/%@",A]]
|
#define MRGame_ScreenWidth [UIScreen mainScreen].bounds.size.width
|
#define MRGame_ScreenHeight [UIScreen mainScreen].bounds.size.height
|
|
//=====================单例==================
|
// @interface
|
#define singleton_interface(className) \
|
+ (className *)shared;
|
|
// @implementation
|
#define singleton_implementation(className) \
|
static className *_instance; \
|
+ (id)allocWithZone:(NSZone *)zone \
|
{ \
|
static dispatch_once_t onceToken; \
|
dispatch_once(&onceToken, ^{ \
|
_instance = [super allocWithZone:zone]; \
|
}); \
|
return _instance; \
|
} \
|
+ (className *)shared \
|
{ \
|
static dispatch_once_t onceToken; \
|
dispatch_once(&onceToken, ^{ \
|
_instance = [[self alloc] init]; \
|
}); \
|
return _instance; \
|
}
|
//========================end==================
|