SainiUtils is used to extend the basic functionality of UIKit elements like UIView,UIButton,UITextfield etc.
SainiUtils basic purpose to reduce your development time by extened the basic functionality of UIKit elements.
SainiUtils is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SainiUtils'
UIView |
---|
1.)sainiCircle |
2.)sainiBlur |
3.)sainiGradientColor |
4.)sainiCornerRadius |
5.)sainiRoundCorners |
6.)sainiShadow |
7.)sainiShadowWithCornerRadius |
8.)sainiShadowWithGradientAndCornerRadius |
9.)sainiGrowAndShrink |
10.)sainiRotate |
11.)sainiStopRotating |
12.)sainiTapToChangeColor |
13.)sainiScreenshot |
14.)sainiAddBorderWithColor |
15.)sainiDrawDashedBorderAroundView |
16.)sainiFadeIn |
17.)sainiFadeOut |
18.)sainiFadeOutInfinite |
19.)sainiFadeInInfinite |
20.)sainiShowLoader |
21.)sainiRemoveLoader |
22.)0sainiRotateByAngle |
23.)sainiDashedLine |
24.)sainiAddTapGesture |
25.)sainiPulsate |
26.)sainiFlash |
27.)sainiShake |
28.)sainiShowToast |
UITextField |
---|
29.)sainiSetLeftPadding |
30.)sainiSetRightPadding |
31.)sainiSetLeftIcon |
32.)sainiSetRightIcon |
UITableView |
---|
33.)sainiSetEmptyMessage |
34.)restore |
Date |
---|
35.)sianiFirstDayOfWeek |
36.)sainiAddWeeks |
37.)sainiWeeksAgo |
38.)sainiAddDays |
39.)sainiDaysAgo |
40.)sainiAddHours |
41.)sainiHoursAgo |
42.)sainiAddMinutes |
43.)sainiMinutesAgo |
44.)sainiStartOfDay |
45.)sainiEndOfDay |
46.)sainiZeroBasedDayOfWeek |
47.)sainiHoursFrom |
48.)sainiDaysBetween |
49.)sainiPercentageOfDay |
50.)sainiNumberOfWeeksInMonth |
51.)sainiFormattedDateString |
let demoLbl = UILabel()
demoLbl.textColor = sainiColorFromHex(hex: "#687f9")
//Image Compression to 10th of original size
let image = sainiCompressImage(image: UIImage(named: "someImage"))
//Assign sainiSignatureView to any UIView class and it will behave as an signatureView
//Assign sainiCardView to any UIView class and it will behave as an CardView
let timeAgoStr = sainiTimesAgo(78789877387)
print(timeAgoStr)
//2 Min ago
rohitsaini91, [email protected]
SainiUtils is available under the MIT license. See the LICENSE file for more info.