All Projects → hasnine → iOSUtilitiesSource

hasnine / iOSUtilitiesSource

Licence: other
IOS Utilities Library for Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to iOSUtilitiesSource

PowerPreference
💾 A Powerful library to control and simplify the usage of shared preference in Android.
Stars: ✭ 95 (+106.52%)
Mutual labels:  preferences, shared-preferences
TTInputVisibilityController
Lightweight controller to keep your inputs visible when the keyboard is presented.
Stars: ✭ 21 (-54.35%)
Mutual labels:  keyboard, textfield
hotscript
HotScript - Revolutionizing how Windows works.
Stars: ✭ 29 (-36.96%)
Mutual labels:  keyboard, key
Loafjet
🚀 Loafjet is a lightweight custom framework used to add Loafs, Dash Board, Popup Card, and Loading indicator in your Swift project
Stars: ✭ 63 (+36.96%)
Mutual labels:  toast, toast-message
Tkkeyboardcontrol
TKKeyboardControl adds keyboard awareness and scrolling dismissal (like iMessages app) to any view with only 1 line of code for Swift.
Stars: ✭ 110 (+139.13%)
Mutual labels:  keyboard, textfield
JDToaster
🍞 Toasty iOS alerts
Stars: ✭ 25 (-45.65%)
Mutual labels:  toast, toast-message
rustyvibes
A Rust CLI that makes mechanical keyboard sound effects on every key press
Stars: ✭ 56 (+21.74%)
Mutual labels:  keyboard, key
QuickWebKit
A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。
Stars: ✭ 29 (-36.96%)
Mutual labels:  toast, pod
FormToolbar
Simple, movable and powerful toolbar for UITextField and UITextView.
Stars: ✭ 85 (+84.78%)
Mutual labels:  keyboard, textfield
Numericaltextentry
An iOS library for beautiful number entry fields. iPad friendly. Written in Swift.
Stars: ✭ 16 (-65.22%)
Mutual labels:  keyboard, pod
ComposableSweetToast
Jetpack Compose, Custom Toast, Solid Principles, Kotlin
Stars: ✭ 60 (+30.43%)
Mutual labels:  toast, toast-message
Keyboardavoidanceswiftui
How to move SwiftUI view up when keyboard appears https://www.vadimbulavin.com/how-to-move-swiftui-view-when-keyboard-covers-text-field/
Stars: ✭ 198 (+330.43%)
Mutual labels:  keyboard, textfield
SimpleToast
SimpleToast is a simple, lightweight, flexible and easy to use library to show toasts / popup notifications inside iOS or MacOS applications in SwiftUI. Because of the flexibility to show any content it is also possible to use the library for showing simple modals.
Stars: ✭ 131 (+184.78%)
Mutual labels:  toast, swift5
AnyImageKit
A toolbox for pick/edit/capture photo or video. Written in Swift.
Stars: ✭ 580 (+1160.87%)
Mutual labels:  gif, swift5
RTL-Toast
Android Toast For RTL Applications
Stars: ✭ 16 (-65.22%)
Mutual labels:  toast, toast-message
FN-key-lock
A Script/Program to simulate hardware F key lock on F1-F12 keys with custom controls and visible lock notifications.
Stars: ✭ 25 (-45.65%)
Mutual labels:  keyboard, key
PagedLists
Paginated UITableView and UICollectionViews for iOS.
Stars: ✭ 69 (+50%)
Mutual labels:  pod, swift5
bs5-utils
A JavaScript utility package for Bootstrap 5 components.
Stars: ✭ 26 (-43.48%)
Mutual labels:  toast, toast-message
Cool ui
用flutter实现一些我认为好看的UI控件,有Popover,仿Weui的Toast,自定义键盘
Stars: ✭ 349 (+658.7%)
Mutual labels:  keyboard, toast
Keyboardtextfield
KeyboardTextField is a lightweight, simple, non-invasive keyboard accompanying input box! Write in Swift!
Stars: ✭ 170 (+269.57%)
Mutual labels:  keyboard, textfield

iOSUtilitiesSource

All types of swift utilities and necessary settings included in this library.

  • Local data save in preferences
  • Internet check
  • Date convertion
  • String check
  • Alert dialog extension
  • Button round
  • View round
  • Floating textField
  • Hide keyboard when tapped around
  • Toast message show
  • SimpleGradientView
  • GIF image loader
  • Keyboard show/hide with view up/down
  • Alert toast with image(Success, Info, Custom, Error)
  • Rating view

Pod Setup

Just add this line in your pod file:

 pod 'iOSUtilitiesSource', :git => 'https://github.com/hasnine/iOSUtilitiesSource.git'

Usage

First import library to your ViewController

#import iOSUtilitiesSource 
  • For data save in preferences:

Save your data in preferences with line:

PreferencesUtils.saveStringData(data: "YOUR_DATA", dataName: "YOUR_KEY")

and for get this saved data :

PreferencesUtils.getSavedStringData(dataName: "YOUR_KEY")
  • Navigation bar color change:

*With code:

  UINavigationBar.appearance().barTintColor = .black
  UINavigationBar.appearance().tintColor = .white
  UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white]
  UINavigationBar.appearance().isTranslucent = false

*With library:

  NavigationBarColorChange.changeNavigationBarColor(barTintColor: .black, tintColor: .white,forgroundColor: UIColor, isTranslucent: true)
  • Date formatter:

*Input date format : "yyyy-MM-dd HH:mm:ss" *OutPut Date format: "EEEE, MMM dd hh:mm a"

*Date format with code:

 public static func getDisplayableDateStringForPosts(inputDateString: String) -> String?{
    let dateFormatterInput = DateFormatter()
    dateFormatterInput.dateFormat = "yyyy-MM-dd HH:mm:ss"
    
    let dateFormatterOutput = DateFormatter()
    dateFormatterOutput.dateFormat = "EEEE, MMM dd hh:mm a"
    
    if let date = dateFormatterInput.date(from: inputDateString) {
        return (dateFormatterOutput.string(from: date))
    } else {
        return nil
    }
}

*With library:

Utilities.getDisplayableDateStringForPosts(inputDateString: yyyy-MM-dd HH:mm:ss)
  • Floating TextField plceholder

Add

   IuFloatingTextFiledPlaceHolder 

class in your textfield's custom class from storyboard.

Output:

  • Hide keyboard when tapped around

Add this line in viewDidLoad:

hideKeyboardWhenTappedAround()
  • Toast Message

Add this line in your code, where you want to show your message:

showToast(message: "YOUR_MESSAGE")
  • SimpleGradientView :

    • Add view in your storyboard

    • From Story board Attributes inspector - set first , mid and End color

    • Provide direction value to change Gradient angle

  • GIF Image loader

    • Import 'iOSUtilitiesSource' in your class to use GifImage .

    • Drag your image in project folder

    • Gif image needed to be placed in folder instead of image asset.

    • Add UIimageView_Storybord_reference(name: "YOUR_GIF_NAME") in viewWillAppear / in your required method.

    • Keyboard show/hide with view up/down

    Add this line in your viewDidLoad():

    iOSKeyboardShared.shared.keyBoardShowHide(view: self.view)
    
  • Alert toast View :

Example :

 self.noticeTop("Test Notice", autoClear: true, autoClearTime: 5)
 self.noticeError("Test Notice", autoClear: true, autoClearTime: 5)
 self.noticeSuccess("Test Notice", autoClear: true, autoClearTime: 5)
 self.noticeInfo("Test Notice")
 self.noticeError("Test Notice")
 self.noticeOnlyText("Test Notice")
 self.clearAllNotice()

Output:

  • Rating View :

    Add StarRatingView class in storyboards in any specific view as following image below:

    Example code:

    override func viewDidLoad() {
    super.viewDidLoad()
    
    startView.didFinishTouchingStarRating = { rating in
       if rating == 4.0{
           self.startView.text = "Status : Favoulas"
       }else if rating == 3{
           self.startView.text = "Status : Good"
       }else{
           self.startView.text = "Status : Moderate"
       }
    }
    // Do not change rating when touched
    // Use if you need just to show the stars without getting user's input
    startView.settings.updateOnTouch = false
    // Show only fully filled stars
    startView.settings.fillMode = .full
    // Other fill modes: .half, .precise
    // Change the size of the stars
    startView.settings.starSize = 30
    
    // Set the distance between stars
    startView.settings.starMargin = 5
    
    // Set the color of a filled star
    startView.settings.filledColor = UIColor.orange
    
    // Set the border color of an empty star
    startView.settings.emptyBorderColor = UIColor.orange
    
    // Set the border color of a filled star
    startView.settings.filledBorderColor = UIColor.orange
    // Set image for the filled star
    //cosmosView.settings.filledImage = UIImage(named: "GoldStarFilled")
    // Set image for the empty star
    //cosmosView.settings.emptyImage = UIImage(named: "GoldStarEmpty")
    startView.textSize = 10
    }
    

    Output:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].