PrettyBorder is a SwiftUI package for managing an customized border and background at any kind of view.

Overview

PrettyBorder

Description

PrettyBorder is a SwiftUI package for managing an customized border and background at any kind of view.


Preview of end result

Default implementation Customized Parameters

Parameters

Parameters are:

This parameter keeps track of view itself is enabled or not

- isEnabled : Binding
    

   

Those are used for customizing the border

- borderCornerRadius: CGFloat
- borderStrokeColor: Color
- borderLineWidth : CGFloat

Color customization for view itself is enabled or not

- disabledColor: Color
- enabledColor: Color

Those are used for giving padding around view itself and border

- paddingFromLeft: CGFloat
- paddingFromTop: CGFloat
- paddingFromRight: CGFloat 
- paddingFromBottom: CGFloat 

Usage

struct ContentView: View {
   
  @State private var isEnabled = false
   
   var body: some View {
       Text("Pretty Border is Awesome!")
           .onTapGesture {
               isEnabled.toggle()
           }
           .modifier(PrettyBorder(isEnabled: $isEnabled,
           borderCornerRadius: nil, borderStrokeColor: nil,
           borderLineWidth: nil, disabledColor: nil, 
           enabledColor: nil, paddingFromLeft: nil,
           paddingFromTop: nil, paddingFromRight: nil, 
           paddingFromBottom: nil))
   }
}

or

struct ContentView: View {

    @State private var isEnabled = false

    var body: some View {
        Text("Pretty Border is Awesome!")
            .onTapGesture {
            isEnabled.toggle()
        }
            .modifier(PrettyBorder(isEnabled: $isEnabled,
            borderCornerRadius: 50, 
            borderStrokeColor: .gray, borderLineWidth: 4,
            disabledColor: .red, enabledColor: .green, 
            paddingFromLeft: 5, 
            paddingFromTop: 30, paddingFromRight: 50, 
            paddingFromBottom: 10))
    }
}
You might also like...
Small color quantizer for bitmaps without any dependencies or use of frameworks

MicroColorQuantizer This package currently offers a very simple color quantizer

Create an '.icns' file from any image

createicns Create an '.icns' file from any image. Usage This command line tool makes it incredibly simple to create an '.icns' icon file from an image

Patch out the GPU checks for any x86-64 macOS Unreal Engine-based game
Patch out the GPU checks for any x86-64 macOS Unreal Engine-based game

UnrealGPUPatcher Download here Patch out the GPU checks for any x86-64 macOS Unreal Engine-based game, particularly ARK: Survival Evolved. Requirement

A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below.
A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below.

MCScratchImageView GIF Showcase Requirments iOS 8.0+ Xcode 7.2+ Swift 4.0 Installation CocoaPods pod "MCScratchImageView" Manually Just drag MCScratch

DGLoading - A loading view that is shown at center of the current view
DGLoading - A loading view that is shown at center of the current view

DGLoading A loading view that is shown at center of the current view. Requiremen

URLImage is a package that holds an easy way of showing images from an URL.
URLImage is a package that holds an easy way of showing images from an URL.

URLImage Overview URLImage is a package that holds an easy way of showing images from an URL. Usually this processes should take the following process

🎨 Mondrian is lightweight Swift package that provides a universal basis for your design system's color palette.

🧑‍🎨 Mondrian Mondrian provides a universal basis on which to build your design system's color palette right from your codebase. With support for all

DittoSwift - Swift package for the DittoSwift framework

DittoSwift Swift package for the DittoSwift framework. See the Ditto iOS Install

PerFolderResourcesPublishPlugin - Per-folder resources plugin for the Publish package

Per-folder resources for Publish A Publish plugin that copies per-folder resourc

Owner
Ahmet Giray Uçar
iOS Developer
Ahmet Giray Uçar
SwiftUI iOS app which applies CoreML Video Matting (background removal) model to the front camera stream

CoreML Camera Video Matting This is a simple iOS app which applies Video Matting (background removal) model to the front camera stream. Video Matting

Dmitry Voitekh 17 Dec 29, 2022
Random image and background color with swift

Random-image-and-background-color Hello, this is my first project. Frankly, I got this idea from the "IOS Academy" page, but: color scale for the back

imhalid 2 Apr 12, 2022
Scrolling the image as a background in Swift

Scrolling the image as a background!

Aleksandr Bychkovskiy 0 Nov 7, 2021
This package integrates a UIImagePickerController into a SwiftUI app.

This Swift Package integrates a UIImagePickerController into a SwiftUI app and allows a user to select, scale and position an image to be cropped and saved as a conatct's photo, similar to the stock iOS Contacts app.

Rillieux 58 Dec 26, 2022
A complete Mac App: drag an image file to the top section and the bottom section will show you the text of any QRCodes in the image.

QRDecode A complete Mac App: drag an image file to the top section and the bottom section will show you the text of any QRCodes in the image. QRDecode

David Phillip Oster 2 Oct 28, 2022
A free, multiplatform SDK for real-time facial motion capture using blendshapes, and rigid head pose in 3D space from any RGB camera, photo, or video.

mocap4face by Facemoji mocap4face by Facemoji is a free, multiplatform SDK for real-time facial motion capture based on Facial Action Coding System or

Facemoji 592 Jan 1, 2023
ZImageCropper is a simplest way to crop image to any shapes you like.

ZImageCropper ZImageCropper is a simplest way to crop image to any shapes you like. Example To run the example project, clone the repo, and run pod in

Mohammad Zaid Pathan 219 Dec 17, 2022
Rudimentary implementation of a uncompressed PNG encoder in Swift without any dependencies

MicroPNG This package currently offers a very minimal PNG encoder for uncompressed RGB and RGBA PNG files. It does not rely on any frameworks and shou

Robert Bruinier 2 Sep 11, 2021
iOS Framework that makes it easy to preview images on any UIImageView.

AZImagePreview iOS Framework that makes it easy to preview images on any UIImageView. Screenshots Installation: Cocoa Pods: pod 'AZImagePreview' Swift

Antonio Zaitoun 25 Dec 11, 2022
Pipable is an iOS library to implement Picture in Picture for any UIView.

Pipable Pipable is an iOS library to implement Picture in Picture for any UIView. This is done just by conforming to a protocol. The "Audio, AirPlay a

Emma Cold 11 Nov 3, 2022