| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- //
- // RAUtils.h
- // RedAnt ERP Mobile
- //
- // Created by Ray on 9/17/15.
- // Copyright (c) 2015 United Software Applications, Inc. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- //typedef struct {
- //
- // NSString* id;
- //
- // float height;
- //
- //
- //}MyTestStruct;
- typedef void (^add_to_cart_Handler)(void);
- @interface RAUtils : NSObject
- +(NSString*) FloatFormat:(float)value;
- +(UIViewController*) getViewController:(UIView*) view;
- + (CGRect)relativeFrameForScreenWithView:(UIView *)v;
- +(NSDictionary*) error_json :(int)code err_msg:(NSString*)msg;
- +(void) message_alert :(NSString*) msg title:(NSString*) title controller:(UIViewController*) vc;
- +(void) alert_view :(NSString*) msg title:(NSString*) title ;
- +(UIAlertView * ) waiting_alert :(NSString*) msg title:(NSString*) title;
- + (float)fileSizeForDir:(NSString*)path;//计算文件夹下文件的总大小;
- +(void) deletefiles :(NSString*) path;
- +(UIColor*) strColor:(NSString*) color;
- +(NSDictionary*) string2dict:(NSString*) str;
- +(NSString*) dict2string:(NSDictionary*) dict;
- +(NSString*) arr2string:(NSArray *) arr separator:(NSString*)separator trim:(bool) btrim;
- +(NSString*) base64en:(NSString*) string;
- +(NSString*) base64de:(NSString*) string;
- +(NSDictionary*) device_info;
- +(NSDictionary*) error_dict:(NSError*)error;
- + (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)size;
- +(UIImage*)img_compress:(UIImage*)image kbsize:(float) size;
- +(NSString* )current_date;
- +(NSMutableArray*)dictionary2array:(NSDictionary*)json count_fields:(NSString*) count_fields item_mark:(NSString*) item_mark items_mark:(NSString* )items_mark;
- +(void) add_recent_model:(NSDictionary*) model;
- + (long long) freeDiskSpaceInMegaBytes;
- +(NSArray*) string2arr:(NSString*) string separator:(NSString*)separator;
- +(void) add_to_cart:(UIViewController*) vc selectorholder:(id)holder selector:(SEL)addtocart;
- @end
|