-
Notifications
You must be signed in to change notification settings - Fork 0
/
HelperFunctions.h
executable file
·77 lines (45 loc) · 1.78 KB
/
HelperFunctions.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//
// HelperFunctions.h
// Familien Jul
//
// Created by Gurpreet Singh on 23/06/14.
// Copyright (c) 2014 Gurpreet Singh. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HelperFunctions : NSObject
void alert(NSString* Title, NSString* Message);
NSString* DocumentDirectory();
NSString* xibName(NSString* name);
NSArray * listOfFilesAtPath(NSString *path);
UIImage* imageFromView(UIView* view) ;
UIImage* drawImageOverImage(UIImage* fgImage, UIImage* bgImage, CGPoint point);
UIImage* resizeImage(UIImage* originalImage, float _scale);
BOOL saveImageAtPath(UIImage* image, NSString* path);
BOOL isValidEmail(NSString* email);
BOOL isInternetAvaliable();
BOOL isFileExistAtPath(NSString* path);
BOOL deleteFileAtPath(NSString* path);
BOOL isImage(NSString *file);
BOOL isSound(NSString *file);
float scale (CGSize size, BOOL landscape);
float scaleMIN (CGSize size, BOOL landscape);
float scaleMAX (CGSize size, BOOL landscape);
float scaleX (CGSize size, BOOL landscape);
float scaleY (CGSize size, BOOL landscape);
UIColor* RgbToUIColor(float r,float g,float b);
NSString* getUniqueIdentifier();
void userDefaults_setObject(id object, NSString* key);
id userDefaults_getObject(NSString* key);
NSString* getFileNameFromPath(NSString* path);
BOOL isBothStringEqual(NSString* first, NSString* second);
NSUserDefaults* userDefaults();
@end
#pragma mark- customFontCategory
@interface UIFont (customFont)
+ (instancetype)GPHennyPennyFontWithSize:(CGFloat)size;
@end
//-- This category is used to fix orientation problen after clicking.
#pragma mark- UIImage Category
@interface UIImage (fixOrientation)
- (UIImage *)fixOrientation;
@end