摘要:
此处我把json数据中的null转换成了@"",防止出现null程序崩掉,可以把下边宏代码复制到pch中,就可以在整个程序中引用了 #define DSStringValue(value)\({id tmp;\if ([value isKindOfClass:[NSNull class]]){\tm 阅读全文
摘要:
num1与num2之间的随机数 -(float)randomFloatBetween:(float)num1 andLargerFloat:(float)num2{ int startVal = num1*10000; int endVal = num2*10000; int randomValue 阅读全文
摘要:
- (NSURLRequest *)addHeaderRequestWithUrl:(NSString *)urlStr{ NSMutableURLRequest *mutableRequest = [[NSMutableURLRequest alloc] initWithURL:[NSURL UR 阅读全文
摘要:
金融类app防止信息在后台中被一些恶意截屏软件进行截屏,对进入后台的app做模糊处理 - (void)applicationWillResignActive:(UIApplication *)application { //进入后台盖上view,实现模糊效果 UIView* view = [[UIV 阅读全文
摘要:
在appdelegate中- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions方法中加入下面代码 NSString *oldUserAg 阅读全文
摘要:
//获取验证码接口+ (NSDictionary *)getPhoneCodeWithPhoneWithParamDict:(NSDictionary *)paramDict vertifyButton:(UIButton *)vertifyButton urlStr:(NSString *)url 阅读全文
摘要:
//json格式字符串转字典+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString { if (jsonString == nil) { return nil; } NSData *jsonData = [jsonStrin 阅读全文
摘要:
+(NSString *)getNewBankNumWitOldBankNum:(NSString *)bankNum{ NSMutableString *mutableStr; if (bankNum.length) { mutableStr = [NSMutableString stringWi 阅读全文
摘要:
+(void)clearCache{ NSHTTPCookie *cookie; NSHTTPCookieStorage *storage = [NSHTTPCookieStorage sharedHTTPCookieStorage]; for (cookie in [storage cookies 阅读全文
摘要:
为了方便阅读,app中的金额需要用,隔开 //数字3个字一个逗号隔开,如:1,000.98+ (NSString *)separatePer3WithNumStr:(NSString *)numStr{ double oldf = [numStr doubleValue]; long long ol 阅读全文