Skip to content

A Contacts App, create and manage contacts. Organized alphabetically or add to a favorites section for convenient browsing.

Notifications You must be signed in to change notification settings

Juan-Ceballos/Contacts-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contacts-App

Overview

Contacts-App allows users to create, browse, favorite and edit contacts.

Features

Create Contacts

CreateContact

Contact Details, Edit/Favorite

DetailContact

Browse Contacts

Normal Mode Not Afraid of the Dark...Mode
Contacts ContactsDark

Code Block

Create Contact Add to Core Data

public func createFavoriteContact(contact: Contact, isFavorite: Bool, isOriginal: Bool) -> Contact {
    
    let contactFavorite = Contact(entity: Contact.entity(), insertInto: context)
    contactFavorite.firstName = contact.firstName
    contactFavorite.lastName = contact.lastName
    contactFavorite.fullName = "\(contact.firstName ?? "") \(contact.lastName ?? "")"
    contactFavorite.email = contact.email
    contactFavorite.street = contact.street
    contactFavorite.poNumber = contact.poNumber
    contactFavorite.dateCreated = Date()
    contactFavorite.apt = contact.apt
    contactFavorite.city = contact.city
    contactFavorite.state = contact.state
    contactFavorite.zipCode = contact.zipCode
    contactFavorite.isFavorite = isFavorite
    contactFavorite.isOriginal = isOriginal
    contactFavorite.refFav = contact.refFav
    contactFavorite.refOrig = contact.refOrig
            
    do {
        try context.save()
    } catch {
        print("error saving to context, creating user: \(error)")
    }
    
    return contact
}

Installation

Clone

  • Clone this repo to your local machine using https://github.com/Juan-Ceballos/Contacts-App.git

Built With

  • XCode

  • Swift

  • MapKit

  • Core Data

  • Diffable DataSource / Compositional Collection View

Collaborators

Juan Ceballos

Juan

About

A Contacts App, create and manage contacts. Organized alphabetically or add to a favorites section for convenient browsing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages