Skip to content

This Repo is going to help Developers in IOS development and it's short and descriptive this will be fun.

License

Notifications You must be signed in to change notification settings

zainanjum100/ZainFrameWork

Repository files navigation

ZainFramework

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Xcode 10 or later Mac OS X Mojave

Installation

ZainFramework is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ZainFramework'

Usage

TableView Extention

Handling an empty UITableView. Print a friendly message.

func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
          if numberOfItems == 0{
              tableView.setEmptyMessage("We could not found any posts")
          }
        return numberOfItems.count
    }

TableView Loading Extention

\\Use anywhere you want in tableview
\\this loading is a refreshControl so no need to write all the old code :)

tableView.beginRefreshing()
tableView.endRefreshing()

ImageVIew Download image from url and cache image

let urlString = "https://www.google.com/"
ImageView.cacheImage(urlString: urlString)

\\you can change the url and enjoy

SomeStandard Extentions for UIView are added to make things easier in Storyboard

alt demo image

Most Important ViewController Extentions

\\Activity Indicator Extention
\\Use inside of a ViewController function
self.startActivityIndicator()
self.stopActivityIndicator()

self.showAlert(text: "Replace Text here")

self.showLoadingAlert(text: "Replace Text here")

\\a bit tricky extention but if you get it your code will be a lot easier
\\modern code

let viewController = StandardVC.instantiate() \\Class name must be same in 
pushVC(viewController)

alt text

\\old code

let viewController = storyboard?.instantiateViewController(withIdentifier: "StandardVC")
self.navigationController?.pushViewController(viewController, animated: true)

\\new code
self.dismissVC()
\\old code
self.navigationController?.dismiss(animated: true, completion: nil)


Author

zainanjum100, [email protected]

License

ZainFramework is available under the MIT license. See the LICENSE file for more info.

About

This Repo is going to help Developers in IOS development and it's short and descriptive this will be fun.

Resources

License

Stars

Watchers

Forks

Packages

No packages published