| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- //
- // 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;
- +(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;
- +(NSArray*) string2arr:(NSString*) string separator:(NSString*)separator;
- +(void) add_to_cart:(UIViewController*) vc selector:(SEL)aSelector;
- @end
|