Tweak UI elements at run time to find the perfect values
Swift Objective-C
Switch branches/tags
Nothing to show
Clone or download
Latest commit 36d9c9a Dec 6, 2016
Failed to load latest commit information.
DDHTweaks Move files to framework Dec 3, 2016
DDHTweaksDemo.xcodeproj Better demo Dec 4, 2016
DDHTweaksDemo Added another example Dec 5, 2016
.gitignore Added gitignore Feb 1, 2015
LICENCE Create LICENCE Feb 1, 2015 Update Dec 5, 2016

Carthage compatible


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.



Add this to your Cartfile:

github "dasdom/DDHTweaks"


Add DDHTweaks.swift and DDHTweakUserInterface.swift to your project.


The tweaks from the gif above are created like this:

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

override func viewWillAppear(_ animated: Bool) {
  label.textColor ="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. Navigate to Main View and change the font size. Touch Done.

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


Dominik Hauser @dasdom

Twitter: @dasdom


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


MIT Licence. See the LICENCE file for details.