Giter VIP home page Giter VIP logo

suifontpicker's Introduction

SUIFontPicker

SUIFontPicker is a small, fast, and easy to use framework for integrating UIKit’s UIFontPickerViewController into your SwiftUI applications.

Installation

SUIFontPicker can be installed via the Swift Package Manager. Simply copy and paste this repo’s URL into your project’s Package.swift file.

https://github.com/SwapnanilDhol/SUIFontPicker

Additionally
If you wish to, you can simply drag the SUIFontPicker.swift file from the Sources folder into your project.

Usage

SUIFontPicker can be presented as a sheet or any other way you’d present a View. For example, you can bind a .sheet modifier to a State variable and present the SUIFontPicker sheet when the State variable switches to true.

The delegates have been wired up and so all you need to do is to call the closure which will return a UIFontDescriptor. You can then convert this into a Font or UIFont using their respective descriptor initializers.

.sheet(isPresented: $isFontPickerPresented) {
        SUIFontPicker { fontDescriptor in
            customFont = UIFont(descriptor: fontDescriptor,
                                size: 18.0)
            //customFont is of type UIFont
            }
        }

Contributing

This framework was made super quickly and without much testing. Please feel free to contribute to this framework to make it better and to clean up the API design.

suifontpicker's People

Contributors

swapnanildhol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.