Skip to content

Fetch contact list easy and quickly just with single protocol

Notifications You must be signed in to change notification settings

nindipuri/PhoneContac_iOS_Swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

PhoneContac_iOS_Swift

Fetch contact list with filter(mail, phone number) easy and quickly just with single protocol.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

  • Xcode 10+
  • Swift 4.2+

Usage

##Create Enum for filter

enum ContactsFilter {
    case none
    case mail 
    case phoneNumber 
}

Adopt protocol to your viewcontrolerr to recieve list

class ViewController: UIViewController,PhoneContactProtocol {
  
}

implement function to get list

 func setFilter(contacts: [ContactModel]) {
        for c in contacts {
            print(c.name)
        }
    }

Call funtion

self.fetchContacts(filter: .phoneNumber)

Authors

  • Narinder Singh - -

About

Fetch contact list easy and quickly just with single protocol

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages