Neumorphism framework for UIKit.

Overview

IMG_0561

Version Carthage Compatible License Platform

NeumorphismKit is neumorphism framework for UIKit.

Requirements

  • iOS 12.0+
  • Swift 5.1+

Versions

NeumorphismKit version Xcode version
1.0.0 Xcode 11+
1.1.0 Xcode 12+

Installation

CocoaPods

To integrate NeumorphismKit into your Xcode project using CocoaPods, specify it in your Podfile:

platform :ios, '12.0'
use_frameworks!

target '<TargetName>' do
    pod 'NeumorphismKit', '~> 1.0'
end

Then, run the following command:

$ pod install

Carthage

To integrate NeumorphismKit into your Xcode project using Carthage, specify it in your Cartfile:

github "y-okudera/NeumorphismKit" ~> 1.0

Run carthage update to build the framework and drag the built NeumorphismKit.framework into your Xcode project.

Usage

Storyboard

You can start NeumorphismKit on the storyboard.

  1. Set 'NeumorphismButton' to a custom class of UIButton.

Usage_1

  1. Set the same color as the background color of SuperView to the base color of the button.

Usage_2

Code

You can also start NeumorphismKit on code.

let neumorphismButton = NeumorphismButton(frame: .init(x: 0, y: 0, width: 120.0, height: 40.0))
neumorphismButton.baseColor = self.view.backgroundColor ?? .white
neumorphismButton.center = self.view.center
neumorphismButton.setTitle("BUTTON", for: .normal)

let titleColor = UIColor(red: 160 / 255, green: 70 / 255, blue: 255 / 255, alpha: 1.0)
neumorphismButton.setTitleColor(titleColor, for: .normal)

self.view.addSubview(neumorphismButton)

NeumorphismTabBarController

TabBar

When using NeumorphismTabBarController, implement the inherited class.

import NeumorphismKit
import UIKit

class YourTabBarController: NeumorphismTabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
        self.nskDelegate = self
    }

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)

        // If it is an empty string, the title will be hidden.
        let btn1 = NeumorphismTabBarItem(title: "", icon: UIImage(named: "your_tab_img1")!)
        let btn2 = NeumorphismTabBarItem(title: "", icon: UIImage(named: "your_tab_img2")!)
        let btn3 = NeumorphismTabBarItem(title: "", icon: UIImage(named: "your_tab_img3")!)
        let btn4 = NeumorphismTabBarItem(title: "Timeline", icon: UIImage(named: "your_tab_img4")!)
        let btn5 = NeumorphismTabBarItem(title: "Users", icon: UIImage(named: "your_tab_img5")!)

        // Set tuples for viewController and NeumorphismTabBarItem.
        self.setup(viewControllers: [
            (viewController: MainViewController.instantiate(), tabBarItem: btn1),
            (viewController: OtherViewController.instantiate(text: "View1"), tabBarItem: btn2),
            (viewController: OtherViewController.instantiate(text: "View2"), tabBarItem: btn3),
            (viewController: OtherViewController.instantiate(text: "View3"), tabBarItem: btn4),
            (viewController: OtherViewController.instantiate(text: "View4"), tabBarItem: btn5),
        ])
    }
}

extension YourTabBarController: NeumorphismTabBarControllerDelegate {

    // Delegate when switching tabs.
    func finishedSwitchingTab(fromIndex: Int, toIndex: Int) {
        print("fromIndex: \(fromIndex) toIndex: \(toIndex)")
    }
}

Then set YourTabBarController on the storyboard.

Other components can be used as well. See Demo project.

Author

Yuki Okudera, [email protected]

License

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

You might also like...
xTensions is a collection of useful class extensions for UIKit.

xTensions Intro xTensions is a collection of useful class extensions for UIKit. Swift Package Manager Note: Instructions below are for using SwiftPM w

A simple and elegant UIKit for iOS.
A simple and elegant UIKit for iOS.

HamsterUIKit A simple and elegant UIKit(Chart) for iOS, written in Swift. 📊 Curve and bar Charts. 💡 Protocols are designed based on UIKit(UITableVie

📐 Declarative UIKit in 10 lines of code.
📐 Declarative UIKit in 10 lines of code.

Withable 📐 Declarative UIKit in 10 lines of code. See corresponding article at Declarative UIKit with 10 lines of code A simple extension instead of

🧩 Easy scrollable layouts in UIKit
🧩 Easy scrollable layouts in UIKit

Easy scrollable layouts in UIKit Create complex scrollable layout using UIViewControllers or plain UIViews and simplify your code! ScrollStackControll

Protocol oriented, type safe, scalable design system foundation swift framework for iOS.
Protocol oriented, type safe, scalable design system foundation swift framework for iOS.

Doric: Design System Foundation Design System foundation written in Swift. Protocol oriented, type safe, scalable framework for iOS. Features Requirem

A child view controller framework that makes setting up your parent controllers as easy as pie.
A child view controller framework that makes setting up your parent controllers as easy as pie.

Description Family is a child view controller framework that makes setting up your parent controllers as easy as pie. With a simple yet powerful publi

Material, a UI/UX framework for creating beautiful iOS applications
Material, a UI/UX framework for creating beautiful iOS applications

Material Welcome to Material, a UI/UX framework for creating beautiful applications. Material's animation system has been completely reworked to take

Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.
Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.

kishikawakatsumi/SpreadsheetView has moved! It is being actively maintained at bannzai/SpreadsheetView. This fork was created when the project was mov

A framework that provides CurtainController. CurtainController is a container view controller that implements a content-curtain interface. You can find a similar implementation in applications like Apple Maps, Find My, Stocks, etc. Someone calls it
Releases(1.1.0)
Owner
y-okudera
iOS developer
y-okudera
Swift extensions for UIKit.framework.

XUIKit Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installation XUIKit is a

FITZ 0 Oct 22, 2021
Easily use UIKit views in your SwiftUI applications. Create Xcode Previews for UIView elements

SwiftUIKitView Easily use UIKit views in SwiftUI. Convert UIView to SwiftUI View Create Xcode Previews from UIView elements SwiftUI functional updatin

Antoine van der Lee 682 Dec 29, 2022
Make ComposableArchitecture work with UIKit

ComposableUIKit The ComposableArchitecture (TCA) library provides a way of structuring Swift code with the Redux-pattern. It is highly optimized for S

Manuel Maly 11 Nov 5, 2022
Combine publisher bridges for UIKit

Combine publisher bridges for UIKit

Combine Community 1.3k Jan 1, 2023
Convenient domain specific language for writing programmatic UI built over UIKit and more.

XYKit Swifty and convenient domain specific language for creating programmatic UI in a more declarative way and more than that. Built on top of UIKit

Denis Goloborodko 1 Nov 5, 2021
🎸🎸🎸 Common categories for daily development. Such as UIKit, Foundation, QuartzCore, Accelerate, OpenCV and more.

?????? Common categories for daily development. Such as UIKit, Foundation, QuartzCore, Accelerate, OpenCV and more.

77。 423 Jan 4, 2023
Example Catalyst app that is shown in a UIKit popover underneath an NSStatusItem

CatalystStatusItemPopoverExample Example Catalyst app that is shown in a UIKit popover underneath an NSStatusItem. References How to use macOS Specifi

Tom Irving 9 Sep 8, 2022
Create descriptive UIKit screens, faster!

Columbina's DeclarativeUIKit Create descriptive UIKit screens, faster! Get rid of constraints manipulation and use declarative language to create your

Columbina 2 Dec 12, 2021
Application to test MVVM architecture with Combine and UIKit librarys.

Application to test MVVM architecture with Combine and UIKit librarys.

Jose Javier Escudero Gómez 0 Dec 14, 2021
🎨 View instance initializing sugar for Swift & UIKit

?? View instance initializing sugar for Swift & UIKit

Yongjun Lee 11 Dec 1, 2022