Skip to content

Instantly share code, notes, and snippets.

@jdee
Last active August 29, 2015 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdee/f3eeadeb0eaec725edd8 to your computer and use it in GitHub Desktop.
Save jdee/f3eeadeb0eaec725edd8 to your computer and use it in GitHub Desktop.
iOS Knob Control and Violation

The iOS Knob Control and a new project, a framework for iOS called Violation, were both spun out of other large app projects I've been working on. The knob control came first. It resides in its own repo, has an unimaginative name that invites conflicts and is distributed simply as a single .h and .m file pair you can insert into your project.

That effort went well enough, and I was inspired to release some further custom iOS components from the same project. But the way the knob control was released would not scale to many classes, particularly with the introduction of things like base classes and private extensions.

Clearly all these things ought to share a single repo and be collected into a framework or other sort of library. And they needed a common name for purposes of namespacing. And so the Violation framework was born.

The iOS Knob Control will eventually become part of the Violation framework. However, to avoid too much confusion, they will be kept separate for some time. Violation will undergo its first release some time soon. Version 1.3.0 of the iOS Knob Control has been released.

That will be the last release in the ios-knob-control repository, barring fairly urgent bug fixes. Some time afterward, the ViolationKnobControl will join the Violation framework with a deprecation mechanism like an extra header you'll include that will allow you to remove the IOSKnobControl.h and .m from your project, link against Violation.framework, and use the very same code in your app without modification. Eventually, that deprecation mechanism will be removed, and you'll need to rename references to the IOSKnobControl and its associated enumerations.

Until then, the IOSKnobControl is simply included as an external dependency of the Violation demo projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment