Set of iOS controls with useful IBInspectable properties. Written on Swift.

Overview

DCKit

Version License Platform

[Not maintained anymore]

I switched to Flutter, so I don't maintain the library anymore.


DCKit is a set of @IBDesignable iOS controls (buttons, text fields, text views, labels, circle views, hairline views etc.), which have useful @IBInspectable properties. They allows you to build a nice screens, see a result directly on Xcode Interface Builder.

Written on Swift.

Preview

DCKit preview

Installation

Cocoapods

CocoaPods recommended to use DCKit.

  1. Add pod record to your Podfile:
  • Swift 4.2 and above: pod 'DCKit'
  • Swift 3 and Swift 4: pod 'DCKit', '<= 1.0.11'
  • Swift 2.3: pod 'DCKit', :git => 'https://github.com/agordeev/DCKit.git', :branch => 'swift23'
  • Swift 2.2 and below: pod 'DCKit', '<= 1.0.4'
  1. Add use_frameworks! keyword to your Podfile. The library is written on Swift, so this is a mandatory.
  2. Install the pod(s) by running pod install.

Source files

  1. Download the latest code version or add the repository as a git submodule to your git-tracked project.
  2. Drag and drop the Classes directory from the archive in your project navigator. Make sure to select Copy items when asked if you extracted the code archive outside of your project.

How to use

  1. Add a control (e.g. UIButton) onto storyboard: Add a control (e.g. UIButton) onto storyboard
  2. Change the button's class to DCBorderedButton. Also change module to DCKit if you've installed the library via CocoaPods. You'll notice a border appeared around the button: Change the button's class to DCBorderedButton
  3. Now you're able to customize the button from IB directly: Now you're able to customize the button from IB directly

Please download the latest code version and run DCKitSample.xcodeproj to test out all the features it offers.

Documentation

Basically, all of the classes are pretty straightforward and don't worth describing. Most of them you can see in the demo project.

I'll describe a few of them here though.

DCHairlineView

Very useful control, I widely use it in my projects as a separator between views.

DCMandatoryTextField

Base text field for all the mandatory text fields. Highlights the text field if the entered value is false.

By default it considers the empty value as invalid. You can override this behaviour by subclassing this class and overriding isValid method.

DCMandatoryEmailTextField

This field is also checks if the entered value is a valid email address. It uses a regexp taken from here: http://stackoverflow.com/questions/5428304/email-validation-on-textfield-in-iphone-sdk

Requirements

  • Xcode 6 or above
  • iOS 8 or above
  • Swift 2.0 and above

Author

Andrey Gordeev

License

This project is under MIT license. For more information, see LICENSE file.

You might also like...
Material design components for iOS written in Swift
Material design components for iOS written in Swift

MaterialKit NOTE: This project is unmaintained. Material design components (inspired by Google Material Design) for iOS written in Swift Please feel f

An easy to use FAQ view for iOS written in Swift
An easy to use FAQ view for iOS written in Swift

FAQView An easy to use FAQ view for iOS written in Swift. This view is a subclass of UIView. Setup with CocoaPods If you are using CocoaPods add this

🏞 A simple iOS photo and video browser with optional grid view, captions and selections written in Swift5.0
🏞 A simple iOS photo and video browser with optional grid view, captions and selections written in Swift5.0

Introduction 🏞 MediaBrowser can display one or more images or videos by providing either UIImage objects, PHAsset objects, or URLs to library assets,

Cool Animated music indicator view written in Swift
Cool Animated music indicator view written in Swift

Cool Animated music indicator view written in Swift. ESTMusicIndicator is an implementation of NAKPlaybackIndicatorView in Swift for iOS 8. 本人著作的书籍《La

Whole, half or floating point ratings control written in Swift
Whole, half or floating point ratings control written in Swift

FloatRatingView A simple rating view for iOS written in Swift! Supports whole, half or floating point values. I couldn't find anything that easily set

A UITextView subclass that adds support for multiline placeholder written in Swift.
A UITextView subclass that adds support for multiline placeholder written in Swift.

KMPlaceholderTextView A UITextView subclass that adds support for multiline placeholder written in Swift. Usage You can set the value of the placehold

Highly customizable Action Sheet Controller with Assets Preview written in Swift
Highly customizable Action Sheet Controller with Assets Preview written in Swift

PPAssetsActionController Play with me ▶️ 🖐 If you want to play with me, just tap here and enjoy! 🎩 🕴 Show me 🎪 Try me 📲 The easiest way to try me

Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift
Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift

SKPhotoBrowser Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift features Display one or more images by providi

🔍 Awesome fully customize search view like Pinterest written in Swift 5.0 + Realm support!
🔍 Awesome fully customize search view like Pinterest written in Swift 5.0 + Realm support!

YNSearch + Realm Support Updates See CHANGELOG for details Intoduction 🔍 Awesome search view, written in Swift 5.0, appears search view like Pinteres

Comments
  • Rendering Error while using DCBorderedButton

    Rendering Error while using DCBorderedButton

    Main.storyboard: error: IB Designables: Failed to render and update auto layout status for UIViewController (4It-P9-vtY): dlopen(DCKit.framework, 1): no suitable image found. Did find: DCKit.framework: mach-o, but wrong architecture

    opened by adampiotrowiczdev 0
  • Fix broken headings in Markdown files

    Fix broken headings in Markdown files

    GitHub changed the way Markdown headings are parsed, so this change fixes it.

    See bryant1410/readmesfix for more information.

    Tackles bryant1410/readmesfix#1

    opened by bryant1410 0
  • Correct the spelling of CocoaPods in README

    Correct the spelling of CocoaPods in README

    This pull requests corrects the spelling of CocoaPods 🤓 https://github.com/CocoaPods/shared_resources/tree/master/media

    opened by ReadmeCritic 0
  • xcode 12 problem

    xcode 12 problem

    after updating to xcode 12 dckit no longer work and buttons inherit dckit are shown as red alerts in story board. also i'm unable to modify buttons from the right button option bar.

    opened by Anon-Mars 1
Owner
Andrey Gordeev
Freelance iOS/Android Developer
Andrey Gordeev
A swift PropertyWrapper to provide automatic NSView/UIView invalidation when the properties value changes.

A swift PropertyWrapper to provide automatic NSView/UIView invalidation when the properties value changes. It duplicates the @Invalidating propertyWrapper for build targets prior to macOS 12 and iOS 15.

Darren Ford 8 Oct 15, 2021
UIView and CGRect extension that adds properties to manipulate them efficiently

Geometry Geometry is a UIView and CGRect extension that lets you work with view and rect geometry easier. It adds the following properties to UIView:

Tuomas Artman 92 Sep 7, 2022
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.

LoadingShimmer An easy way to add a shimmering effect to any view with just single line of code. It is useful as an unobtrusive loading indicator. Thi

Jogendra 1.4k Jan 4, 2023
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

Alexandre Garrefa 0 Nov 28, 2021
This Project is extremely useful for beginners who want to learn only SwiftUI.

This Project is extremely useful for beginners who want to learn only SwiftUI.In this project have used navigation between views, SignIn page view, Sign Up page view, Tab Bar view,

Jumman 0 Dec 31, 2021
A set of frameworks making iOS development more fun

A set of frameworks making iOS development more fun, developed by N8ive Apps Frameworks InterfaceKit AuthKit CoreKit (in progress) NetworkKit (in prog

N8ive apps 18 Oct 12, 2018
A set of UIKit helpers that simplify the usage of UIKit view's and controller's in SwiftUI.

A set of UIKit helpers that simplify the usage of UIKit view's and controller's in SwiftUI. Many of these helpers are useful even in a pure UIKit project.

SwiftUI+ 6 Oct 28, 2022
A custom UIControl which functions like UISlider where you can set multiple intervals with different step values for each interval.

MultiStepSlider A custom UIControl which functions like UISlider where you can set multiple intervals with different step values for each interval. Th

Susmita Horrow 25 Apr 28, 2022
A message bar for iOS written in Swift.

Dodo, a message bar for iOS / Swift This is a UI widget for showing text messages in iOS apps. It is useful for showing short messages to the user, so

Evgenii Neumerzhitckii 874 Dec 13, 2022
An easy to use FAQ view for iOS written in Swift

FAQView An easy to use FAQ view for iOS written in Swift. This view is a subclass of UIView. Setup with CocoaPods If you are using CocoaPods add this

Mukesh Thawani 467 Dec 5, 2022