All Projects → dasdom → DDHTweaks

dasdom / DDHTweaks

Licence: other
Tweak UI elements at run time to find the perfect values

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to DDHTweaks

scss-font-lock
This is a SCSS mixin used to create CSS locks for responsive typography. To make in convenient to use it allows you to use both px and em as units and if anything goes wrong, it will let you know during the compile using scss @warn and also print an error message on top of the text in the application or website.
Stars: ✭ 18 (-33.33%)
Mutual labels:  font-size
react-native-dual
ScrollView, FlatList, SectionList and ListView with dual background
Stars: ✭ 28 (+3.7%)
Mutual labels:  color
ColorPick.js
A simple and minimal jQuery color picker plugin for the modern web.
Stars: ✭ 48 (+77.78%)
Mutual labels:  color
palette
Color palette app for elementary OS
Stars: ✭ 32 (+18.52%)
Mutual labels:  color
ghci-color
colorize ghci output
Stars: ✭ 74 (+174.07%)
Mutual labels:  color
a-color-picker
A color picker for web app
Stars: ✭ 97 (+259.26%)
Mutual labels:  color
texthighlighter
a no dependency typescript npm package for highlighting user selected text
Stars: ✭ 17 (-37.04%)
Mutual labels:  color
color-description
Color-Description turns a technical color representation into a human readable description.
Stars: ✭ 18 (-33.33%)
Mutual labels:  color
colorsys.rs
Lib for modifying colors and converting to other spaces
Stars: ✭ 28 (+3.7%)
Mutual labels:  color
WaveLabelDemo
波浪经过文字,文字改变颜色。Waves pass through words, and words change colours.
Stars: ✭ 58 (+114.81%)
Mutual labels:  color
BuenColors
R package of colors for the Buenrostro Lab
Stars: ✭ 53 (+96.3%)
Mutual labels:  color
color-extractor
Biancoir is website that provide color extraction from an image with quantization algorithm.
Stars: ✭ 12 (-55.56%)
Mutual labels:  color
BoringSSLKeys
Grab your libboringssl keys to decrypt traffic (pcaps)
Stars: ✭ 46 (+70.37%)
Mutual labels:  tweaks
utils.js
👷 🔧 zero dependencies vanilla JavaScript utils.
Stars: ✭ 14 (-48.15%)
Mutual labels:  color
luxpy
Python toolbox for lighting and color science
Stars: ✭ 55 (+103.7%)
Mutual labels:  color
Colorful
CSS colors for use with SwiftUI
Stars: ✭ 23 (-14.81%)
Mutual labels:  color
unblending
Decomposing an input image into layers via "color unblending"
Stars: ✭ 125 (+362.96%)
Mutual labels:  color
LycricsTextView
No description or website provided.
Stars: ✭ 14 (-48.15%)
Mutual labels:  color
elm-color-extra
🎨 Additional color handling for Elm
Stars: ✭ 28 (+3.7%)
Mutual labels:  color
NamedColors.jl
More color names than you ever knew you wanted
Stars: ✭ 24 (-11.11%)
Mutual labels:  color

DDHTweaks

Tweak UI elements at runtime to find the perfect values.

What is it?

Tweaks lets you make changes to your iOS app while it is running. This is especially useful if you are not sure about the right font size, colors or if you want to hide certain functionallities from some of your testers.

Installation

SPM

Add the DDHTweaks package version 1.2.0.

Usage

If you project has a SceneDelegate.swift, replace scene(_:willConnectTo:options:) with the following implementation.

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
  guard let scene = (scene as? UIWindowScene) else { return }
  
  let root = window?.rootViewController
  window = ShakeableWindow(windowScene: scene)
  window?.rootViewController = root
  window?.makeKeyAndVisible()
}

If you don't have a SceneDelegate.swift set the window property in AppDelegate.swift to the following line of code.

var window: UIWindow? = ShakeableWindow(frame: UIScreen.main.bounds)

The tweaks from the gif above are created like this:

override func viewDidLoad() {
  20.tweak("Text/Size", min: 10, max: 40) { tweak in
    print(tweak)
    self.label.font = UIFont.systemFont(ofSize: CGFloat(tweak.currentValue!))
  }
}

override func viewWillAppear(_ animated: Bool) {
  super.viewWillAppear(animated)
  
  label.textColor = UIColor.black.tweak("Text/Color")
  
  view.backgroundColor = UIColor.white.tweak("Background/Color")
  
  label.text = "Hello".tweak("Text/Text")
  
  button.isHidden = !false.tweak("Button/Show")
}

Build and run the App. In the Simulator go to Hardware/Shake Gesture.

If you add an action to a tweak this is run when ever the value is changed.

Supported types for tweaks

  1. Float
  2. Double
  3. Bool
  4. String
  5. UIColor

Author

Dominik Hauser

Twitter: @dasdom

Thanks

Thanks to facebook for the Objective-C version of Tweaks that I used as inspiration.

Licence

MIT Licence. See the LICENCE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].