• Stars
    star
    46
  • Rank 613,923 (Top 13 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Neumorphism framework for UIKit.

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.

More Repositories

1

LSSLogger

A Lightweight and simple Swifty Logger.
Swift
5
star
2

AutoCarouselView

Auto Carousel in SwiftUI.
Swift
5
star
3

protobuf-to-swift

Python project to generate Swift files from proto2 files with mustache template.
Python
4
star
4

SwiftUICustomTransition

AppStore like card transition.
Swift
4
star
5

VNRecognizeTextRequestDemo

VNRecognizeTextRequestを使用した画像内の文字列認識(Swift)
Swift
4
star
6

PokeCardDrop

Share PokeCard via AirDrop.
Swift
4
star
7

StickyHeaderTabMenu

Parallax banner design and Sticky tabs.
Swift
4
star
8

SwiftUITemplate

Template repository for SwiftUI projects.
Swift
3
star
9

GitHubReaderApplication

KMM Project.
Kotlin
2
star
10

ios-corelocation-demo

iOS Core Locationのサンプル(Swift4)
Swift
2
star
11

FirestoreDao

FirestoreDao is Cloud Firestore wrapper library.
Swift
2
star
12

SwiftUIComposableArchitecture

The Composable Architecture used in SwiftUI.
Swift
2
star
13

StretchyHeader

スクロールでストレッチするヘッダ(SwiftUI)
Swift
2
star
14

UISampler

iOS UI sample.
Swift
2
star
15

ios-pdfkit-pdfview-demo

iOS PDFViewのデモ(Swift)
Swift
2
star
16

ios-objc-photos-demo

フォトライブラリの画像を複数選択可能な画面のサンプル(Objective-C)
Objective-C
2
star
17

Rel

Repository for RealmSwift technical research.
Swift
1
star
18

Brownie

Swift multi package app with the needle.
Swift
1
star
19

ios-avspeechsynthesizer-demo

AVSpeechSynthesizerのデモ
Swift
1
star
20

ios-gemini-demo

iOS Geminiを利用したアニメーションのサンプル
Swift
1
star
21

ScreenRecordingDemoApp

画面録画をアプリから実行するサンプル(Swift)
Swift
1
star
22

SwiftUICleanMVVM

SwiftUI・Combine frameworkを使用したサンプルアプリ
Swift
1
star
23

RxInfiniteScrollDemo

Implements loading UI and infinite scrolling.
Swift
1
star
24

GuruSearch

デモアプリ(レストラン検索)
1
star
25

ios-logger

iOS カスタムログ(Swift4)
Swift
1
star
26

SwiftTableViewPagination

Swift TableView pagination with async API request.
Swift
1
star
27

MVPUnitTest

MVPUnitTest(iOS)
Swift
1
star
28

iOSRxDemo

A demo project of an iOS using Rx.
Swift
1
star
29

SwiftAccordion

Swift accordion view.
Swift
1
star
30

ios-objc-uialertcontroller-uitextfield-demo

TextFieldを持つAlertを表示するサンプル(Xcode 9.0 / Objective-C)
Objective-C
1
star
31

ios-itunes-search

第十回スキルアップ実践編テスト(Xcode 10.1 / Swift 4.2.1)
Swift
1
star
32

Swifty

iOS Swift samples.
Swift
1
star
33

VisionRectangleDetection

iOS Vision framework sample.
Swift
1
star
34

y-okudera

1
star
35

pokedex-frontend

TypeScript
1
star
36

gRPC

gRPC Server(Mac App) and gRPC Client(iOS App).
Swift
1
star
37

ios-drawer-menu-demo

iOS DrawerMenu+SQLiteDB
Swift
1
star