Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
e88d599
fix showing tweaks in the simulator when enabled
samsonjs Oct 6, 2014
6c9ba8a
allow disabling in the simulator
samsonjs Oct 7, 2014
6b54b2e
Implement support for storing a dictionary as a tweak
johntmcintosh Nov 5, 2014
7e896a0
Update syntax for import statement
johntmcintosh Nov 6, 2014
d634aee
Add a new FBDictionaryTweakValue macro to the dictionary tweak
johntmcintosh Nov 7, 2014
555b3cc
Add array tweak support
johntmcintosh Nov 11, 2014
512ce6d
Allow UI to be launched with a specific category.
streeter Dec 10, 2014
1daaacc
Support additional types in _Generics
streeter Dec 11, 2014
466c40e
Do not animate the second push
streeter Dec 11, 2014
d3af090
Allow Tweaks to be used from within app extensions, by avoiding disal…
grp Jan 23, 2015
9c6c3b4
Cleanup dictionary implementation and example, and improve documentation
johntmcintosh Jan 24, 2015
93f9473
Improve array tweak documentation
johntmcintosh Jan 24, 2015
8ef42ad
Improve dictionary tweak example
johntmcintosh Jan 24, 2015
d159efa
Improve array example
johntmcintosh Jan 24, 2015
9f6ff57
Cleanup documentation and source formatting
johntmcintosh Jan 24, 2015
2248aa7
Project file cleanup
johntmcintosh Jan 24, 2015
dbd6246
Cleanup formatting
johntmcintosh Jan 24, 2015
fe61e67
Add Tests
johntmcintosh Jan 24, 2015
719e68b
Adjust function formatting
johntmcintosh Jan 24, 2015
e70e425
Update to use iOS disclosure indicator rather than appending a > for …
johntmcintosh Jan 24, 2015
4f4a069
Update array and dictionary tweak documentation
johntmcintosh Jan 24, 2015
c3e4add
Generalize minimum/maximum support into 'possible values'. Unfiy mini…
grp Jan 29, 2015
ea8515f
Minor cleanup for block-based values and dictionary tweaks.
grp Jan 29, 2015
f3ea9b1
fixed compilation errors
Jan 29, 2015
edfad0d
Use notifications rather than querying state to allow Tweaks to be us…
grp Jan 29, 2015
25c31e7
Update podspec for 2.0.0.
grp Mar 20, 2015
1b58019
Update README to show range is fifth parameter
kastiglione Apr 4, 2015
b0a5f8f
Update patent grant: http://fb.me/patents2
grp Apr 10, 2015
2980472
Press done button directly will not update the last modified tweak da…
itouch2 Apr 13, 2015
b1c5148
Override -initWithCoder: in FBTweakShakeWindow so nib-created windows…
nolanw Apr 14, 2015
c85e380
Baseline code assumes that the DATA segment immediately follows the…
DavidCallahan Apr 15, 2015
6da4005
Baseline code assumes that the DATA segment immediately follows the…
DavidCallahan Apr 15, 2015
9763b82
Add NSCoding conformance to FBTweakNumericRange
fastred Apr 20, 2015
0ddf017
Fix a bug with integer tweak showing as float
Apr 21, 2015
9a79094
Add Travis CI
dasmer Apr 22, 2015
3a71bfc
[README.md] Add Travis badge
dasmer Apr 22, 2015
c50e4ad
[.travis.yml] Add newline at end of file
dasmer Apr 22, 2015
c92dbf3
Bump for travis
jamesgpearce Apr 22, 2015
d628caa
Fix Compilation of Tweaks With Stricter UIAlertView Usage Errors
Jun 17, 2015
415c389
Remove extra whitespace added.
Jun 17, 2015
e5f9e68
Remove more inadvertent whitespace.
Jun 17, 2015
56a5478
static_assert when _FBTweakValueInternal() used from C++
Jul 15, 2015
53fe173
Fixng warnings from Implicit retain of 'self' within blocks.
sgoodfriend-pg Aug 6, 2015
4c28a4d
Fix Android build errors
steven-jeram Mar 22, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
language: objective-c
script: xctool test -project FBTweak.xcodeproj -scheme FBTweak -sdk iphonesimulator8.1 -destination "platform=iOS Simulator,OS=8.1,name=iPhone 6"

16 changes: 16 additions & 0 deletions FBTweak.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
18EFE52D189F250700DA6A5D /* FBTweakInlineTestsMRR.m in Sources */ = {isa = PBXBuildFile; fileRef = 18EFE52C189F250700DA6A5D /* FBTweakInlineTestsMRR.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
18EFE536189F38D500DA6A5D /* FBTweakEnabled.h in Headers */ = {isa = PBXBuildFile; fileRef = 18EFE535189F38D500DA6A5D /* FBTweakEnabled.h */; settings = {ATTRIBUTES = (Public, ); }; };
29E9F17B18E35C9C001EAF7D /* MessageUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29E9F17A18E35C9C001EAF7D /* MessageUI.framework */; };
5BACB31E1A12813C00C4F79D /* _FBTweakArrayViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BACB31C1A12813C00C4F79D /* _FBTweakArrayViewController.h */; };
5BACB31F1A12813C00C4F79D /* _FBTweakArrayViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BACB31D1A12813C00C4F79D /* _FBTweakArrayViewController.m */; };
5BE25A521A0AA9D500C97C3E /* _FBTweakDictionaryViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BE25A501A0AA9D500C97C3E /* _FBTweakDictionaryViewController.h */; };
5BE25A531A0AA9D500C97C3E /* _FBTweakDictionaryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5BE25A511A0AA9D500C97C3E /* _FBTweakDictionaryViewController.m */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -88,6 +92,10 @@
18EFE52C189F250700DA6A5D /* FBTweakInlineTestsMRR.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FBTweakInlineTestsMRR.m; sourceTree = "<group>"; };
18EFE535189F38D500DA6A5D /* FBTweakEnabled.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBTweakEnabled.h; sourceTree = "<group>"; };
29E9F17A18E35C9C001EAF7D /* MessageUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MessageUI.framework; path = System/Library/Frameworks/MessageUI.framework; sourceTree = SDKROOT; };
5BACB31C1A12813C00C4F79D /* _FBTweakArrayViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _FBTweakArrayViewController.h; sourceTree = "<group>"; };
5BACB31D1A12813C00C4F79D /* _FBTweakArrayViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _FBTweakArrayViewController.m; sourceTree = "<group>"; };
5BE25A501A0AA9D500C97C3E /* _FBTweakDictionaryViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _FBTweakDictionaryViewController.h; sourceTree = "<group>"; };
5BE25A511A0AA9D500C97C3E /* _FBTweakDictionaryViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.c.objc; path = _FBTweakDictionaryViewController.m; sourceTree = "<group>"; tabWidth = 2; usesTabs = 0; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -211,6 +219,10 @@
18EFE4D8189EEED800DA6A5D /* _FBTweakCollectionViewController.m */,
18EFE4DB189EF75800DA6A5D /* _FBTweakTableViewCell.h */,
18EFE4DC189EF75800DA6A5D /* _FBTweakTableViewCell.m */,
5BE25A501A0AA9D500C97C3E /* _FBTweakDictionaryViewController.h */,
5BE25A511A0AA9D500C97C3E /* _FBTweakDictionaryViewController.m */,
5BACB31C1A12813C00C4F79D /* _FBTweakArrayViewController.h */,
5BACB31D1A12813C00C4F79D /* _FBTweakArrayViewController.m */,
);
name = UI;
sourceTree = "<group>";
Expand Down Expand Up @@ -245,8 +257,10 @@
18EFE4D0189EC70300DA6A5D /* FBTweakInlineInternal.h in Headers */,
18EFE527189F19B300DA6A5D /* FBTweakCategory.h in Headers */,
18EFE4BC189EBC4B00DA6A5D /* FBTweakCollection.h in Headers */,
5BE25A521A0AA9D500C97C3E /* _FBTweakDictionaryViewController.h in Headers */,
18EFE4DD189EF75800DA6A5D /* _FBTweakTableViewCell.h in Headers */,
184A94F018D26871005F2774 /* _FBTweakBindObserver.h in Headers */,
5BACB31E1A12813C00C4F79D /* _FBTweakArrayViewController.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -331,6 +345,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5BE25A531A0AA9D500C97C3E /* _FBTweakDictionaryViewController.m in Sources */,
18EFE4A7189EBA9E00DA6A5D /* FBTweakViewController.m in Sources */,
18EFE4BD189EBC4B00DA6A5D /* FBTweakCollection.m in Sources */,
18EFE4C2189EBEAD00DA6A5D /* FBTweakStore.m in Sources */,
Expand All @@ -340,6 +355,7 @@
18EFE528189F19B300DA6A5D /* FBTweakCategory.m in Sources */,
18EFE4D6189EEBC500DA6A5D /* _FBTweakCategoryViewController.m in Sources */,
18EFE4AF189EBABA00DA6A5D /* FBTweakShakeWindow.m in Sources */,
5BACB31F1A12813C00C4F79D /* _FBTweakArrayViewController.m in Sources */,
18EFE4DA189EEED800DA6A5D /* _FBTweakCollectionViewController.m in Sources */,
184A94F118D26871005F2774 /* _FBTweakBindObserver.m in Sources */,
);
Expand Down
110 changes: 110 additions & 0 deletions FBTweak.xcodeproj/xcshareddata/xcschemes/FBTweak.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0630"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "18EFE46D189EBA4900DA6A5D"
BuildableName = "libFBTweak.a"
BlueprintName = "FBTweak"
ReferencedContainer = "container:FBTweak.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "18EFE47D189EBA4900DA6A5D"
BuildableName = "FBTweakTests.xctest"
BlueprintName = "FBTweakTests"
ReferencedContainer = "container:FBTweak.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "18EFE47D189EBA4900DA6A5D"
BuildableName = "FBTweakTests.xctest"
BlueprintName = "FBTweakTests"
ReferencedContainer = "container:FBTweak.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "18EFE46D189EBA4900DA6A5D"
BuildableName = "libFBTweak.a"
BlueprintName = "FBTweak"
ReferencedContainer = "container:FBTweak.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "18EFE46D189EBA4900DA6A5D"
BuildableName = "libFBTweak.a"
BlueprintName = "FBTweak"
ReferencedContainer = "container:FBTweak.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "18EFE46D189EBA4900DA6A5D"
BuildableName = "libFBTweak.a"
BlueprintName = "FBTweak"
ReferencedContainer = "container:FBTweak.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
56 changes: 48 additions & 8 deletions FBTweak/FBTweak.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,34 @@
*/
typedef id FBTweakValue;

/**
@abstract Represents a range of values for a numeric tweak.
@discussion Use this for the -possibleValues on a tweak.
*/
@interface FBTweakNumericRange : NSObject <NSCoding>

/**
@abstract Creates a new numeric range.
@discussion This is the designated initializer.
@param minimumValue The minimum value of the range.
@param maximumValue The maximum value of the range.
*/
- (instancetype)initWithMinimumValue:(FBTweakValue)minimumValue maximumValue:(FBTweakValue)maximumValue;

/**
@abstract The minimum value of the range.
@discussion Will always have a value.
*/
@property (nonatomic, strong, readwrite) FBTweakValue minimumValue;

/**
@abstract The maximum value of the range.
@discussion Will always have a value.
*/
@property (nonatomic, strong, readwrite) FBTweakValue maximumValue;

@end

/**
@abstract Represents a unique, named tweak.
@discussion A tweak contains a persistent, editable value.
Expand All @@ -28,6 +56,7 @@ typedef id FBTweakValue;
/**
@abstract Creates a new tweak model.
@discussion This is the designated initializer.
@param identifier The identifier for the tweak. Required.
*/
- (instancetype)initWithIdentifier:(NSString *)identifier;

Expand Down Expand Up @@ -59,34 +88,45 @@ typedef id FBTweakValue;

/**
@abstract The current value of the tweak. Can be nil.
@discussion Changes will be propagated to disk. Enforces minimum
and maximum values when changed. Must not be set on actions.
@discussion Changes will be propagated to disk. Enforces within
possible values when changed. Must not be set on actions.
*/
@property (nonatomic, strong, readwrite) FBTweakValue currentValue;

/**
@abstract The possible values of the tweak.
@discussion Optional. If nil, any value is allowed. If an
FBTweakNumericRange, represents a range of numeric values.
If an array or dictionary, contains all of the allowed values.
Should not be set on tweaks representing actions.
*/
@property (nonatomic, strong, readwrite) id possibleValues;

/**
@abstract The minimum value of the tweak.
@discussion Optional. If nil, there is no minimum.
@discussion Optional. If nil, there is no minimum. Numeric only.
Should not be set on tweaks representing actions.
*/
@property (nonatomic, strong, readwrite) FBTweakValue minimumValue;

/**
@abstract The maximum value of the tweak.
@discussion Optional. If nil, there is no maximum.
@discussion Optional. If nil, there is no maximum. Numeric only.
Should not be set on tweaks representing actions.
*/
@property (nonatomic, strong, readwrite) FBTweakValue maximumValue;

/**
@abstract The step value of the tweak.
@discussion Optional. If nil, the step value is calculated of miniumum and maxium.
@abstract The step value of the tweak.
@discussion Optional. If nil, the step value is calculated from
the miniumum and maxium values. Only used for numeric tweaks.
*/
@property (nonatomic, strong, readwrite) FBTweakValue stepValue;

/**
@abstract The decimal precision value of the tweak.
@discussion Optional. If nil, the precision value is calculated of the step value.
@abstract The decimal precision value of the tweak.
@discussion Optional. If nil, the precision value is calculated from
the step value. Only used for numeric tweaks.
*/
@property (nonatomic, strong, readwrite) FBTweakValue precisionValue;

Expand Down
Loading