Repository: ChiefPilot/F3BarGauge
Branch: master
Commit: ce502aa73f77
Files: 17
Total size: 63.9 KB
Directory structure:
gitextract_ddzacrtk/
├── F3BarGaugeDemo/
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── F3BarGauge.h
│ ├── F3BarGauge.m
│ ├── F3BarGaugeDemo-Info.plist
│ ├── F3BarGaugeDemo-Prefix.pch
│ ├── ViewController.h
│ ├── ViewController.m
│ ├── en.lproj/
│ │ ├── InfoPlist.strings
│ │ └── ViewController.xib
│ └── main.m
├── F3BarGaugeDemo.xcodeproj/
│ ├── project.pbxproj
│ ├── project.xcworkspace/
│ │ └── contents.xcworkspacedata
│ └── xcuserdata/
│ └── bradbenson.xcuserdatad/
│ ├── xcdebugger/
│ │ └── Breakpoints.xcbkptlist
│ └── xcschemes/
│ ├── F3BarGaugeDemo.xcscheme
│ └── xcschememanagement.plist
└── README.markdown
================================================
FILE CONTENTS
================================================
================================================
FILE: F3BarGaugeDemo/AppDelegate.h
================================================
//
// AppDelegate.h
// F3BarGaugeDemo
//
// Created by Brad Benson on 12/13/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
@class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;
@end
================================================
FILE: F3BarGaugeDemo/AppDelegate.m
================================================
//
// AppDelegate.m
// F3BarGaugeDemo
//
// Created by Brad Benson on 12/13/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "AppDelegate.h"
#import "ViewController.h"
@implementation AppDelegate
@synthesize window = _window;
@synthesize viewController = _viewController;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
// Override point for customization after application launch.
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
/*
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
*/
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
/*
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
*/
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
/*
Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
*/
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
/*
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
*/
}
- (void)applicationWillTerminate:(UIApplication *)application
{
/*
Called when the application is about to terminate.
Save data if appropriate.
See also applicationDidEnterBackground:.
*/
}
@end
================================================
FILE: F3BarGaugeDemo/F3BarGauge.h
================================================
//
// F3BarGauge.h
//
// Copyright (c) 2011-2014 by Brad Benson
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following
// conditions are met:
// 1. Redistributions of source code must retain the above copyright
// notice this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in
// the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
// OF SUCH DAMAGE.
//
//---> Pick up required headers <-----------------------------------------
#import <UIKit/UIKit.h>
//------------------------------------------------------------------------
//------------------------------------------------------------------------
//------------------| F3BarGauge class definition |---------------------
//------------------------------------------------------------------------
//------------------------------------------------------------------------
@interface F3BarGauge : UIView
@property (readwrite, nonatomic) float value;
@property (readwrite, nonatomic) float warnThreshold;
@property (readwrite, nonatomic) float dangerThreshold;
@property (readwrite, nonatomic) float maxLimit;
@property (readwrite, nonatomic) float minLimit;
@property (readwrite, nonatomic) int numBars;
@property (readonly, nonatomic) float peakValue;
@property (readwrite, nonatomic) BOOL holdPeak;
@property (readwrite, nonatomic) BOOL litEffect;
@property (readwrite, nonatomic) BOOL reverse;
@property (readwrite, strong) UIColor *outerBorderColor;
@property (readwrite, strong) UIColor *innerBorderColor;
@property (readwrite, strong) UIColor *backgroundColor;
@property (readwrite, strong) UIColor *normalBarColor;
@property (readwrite, strong) UIColor *warningBarColor;
@property (readwrite, strong) UIColor *dangerBarColor;
-(void) resetPeak;
@end
================================================
FILE: F3BarGaugeDemo/F3BarGauge.m
================================================
//
// F3BarGauge.m
//
// Copyright (c) 2011-2014 by Brad Benson
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following
// conditions are met:
// 1. Redistributions of source code must retain the above copyright
// notice this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in
// the documentation and/or other materials provided with the
// distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
// OF SUCH DAMAGE.
//
//===[ Required headers ]================================================
// Our stuff
#import "F3BarGauge.h"
//===[ Local definitions/constants/etc ]=================================
static const int BAR_NOT_USED = -1; // Used to indicate that bar/level/peak does not exist
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
//---------------| F3BarGauge class implementation |-------------------
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
//===[ Extention for private-ish stuff ]=================================
@interface F3BarGauge()
{
float _peakValue; // Peak value seen since reset
int _iOnIdx, // Point at which segments are on
_iOffIdx, // Point at which segments are off
_iPeakBarIdx, // Index of peak value segment
_iWarningBarIdx, // Index of first warning segment
_iDangerBarIdx; // Index of first danger segment
}
@end
@implementation F3BarGauge
//===[ Published Methods ]===============================================
//-----------------------------------------------------------------------
// Method: initWithFrame:
// Designated initializer
//
-(instancetype) initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if(self) {
// Assign default values
[self setDefaults];
}
return self;
}
//-----------------------------------------------------------------------
// Method: initWithCoder:
// Initializes the instance when brought from nib, etc.
//
-(instancetype) initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if(self) {
// Assign default values
[self setDefaults];
}
return self;
}
//-----------------------------------------------------------------------
// Method: resetPeak
// Resets peak value.
//
-(void) resetPeak
{
// Reset the value and redraw
_peakValue = -INFINITY;
_iPeakBarIdx = BAR_NOT_USED;
[self setNeedsDisplay];
}
//-----------------------------------------------------------------------
// Method: value setter
//
-(void) setValue:(float)a_value
{
bool fRedraw = false;
// Save value
_value = a_value;
// Point at which bars start lighting up
int iOnIdx = (_value >= _minLimit) ? 0 : _numBars;
if( iOnIdx != _iOnIdx ) {
// Changed - save it
_iOnIdx = iOnIdx;
fRedraw = true;
}
// Point at which bars are no longer lit
int iOffIdx = ((_value - _minLimit) / (_maxLimit - _minLimit)) * _numBars;
if( iOffIdx != _iOffIdx ) {
// Changed - save it
_iOffIdx = iOffIdx;
fRedraw = true;
}
// Are we doing peak?
if( _holdPeak && a_value > _peakValue ) {
// Yes, save the peak bar index
_peakValue = a_value;
_iPeakBarIdx = MIN(_iOffIdx, _numBars - 1);
}
// Redraw the display?
if( fRedraw ) {
// Do it
[self setNeedsDisplay];
}
}
//-----------------------------------------------------------------------
// Method: setNumBars:
// This method sets the number of bars in the display
//
- (void) setNumBars:(int)a_iNumBars
{
// Reset peak value to force it to be updated w/new bar index
_peakValue = -INFINITY;
// Save it, then update the thresholds
_numBars = a_iNumBars;
self.value = _value;
self.warnThreshold = _warnThreshold;
self.dangerThreshold = _dangerThreshold;
}
//-----------------------------------------------------------------------
// Method: setWarnThreshold:
// Sets the level for which bars should be of the warning color
// (dft: yellow)
//
- (void) setWarnThreshold:(float)a_flWarnThreshold
{
// Save it and recompute values
_warnThreshold = a_flWarnThreshold;
_iWarningBarIdx = ( !isnan(a_flWarnThreshold) && a_flWarnThreshold > 0.0f ) ?
(int)( _warnThreshold * (float)_numBars ) :
BAR_NOT_USED;
}
//-----------------------------------------------------------------------
// Method: setDangerThreshold:
// Sets the level for which bars should be of the warning color
// (dft: red).
//
- (void) setDangerThreshold:(float)a_flDangerThreshold
{
// Save it and recompute values
_dangerThreshold = a_flDangerThreshold;
_iDangerBarIdx = ( !isnan(a_flDangerThreshold) && a_flDangerThreshold > 0.0f ) ?
(int)( _dangerThreshold * (float)_numBars ) :
BAR_NOT_USED;
}
//===[ Unpublished Methods ]=============================================
//-----------------------------------------------------------------------
// Method: setDefaults
// Configure default settings for instance
//
-(void) setDefaults
{
// Set view background to clear
self.backgroundColor = [UIColor clearColor];
// Configure limits
_maxLimit = 1.0f;
_minLimit = 0.0f;
_value = 0.0f;
// Set defaults for bar display
_holdPeak = NO;
_numBars = 10;
_iOffIdx = 0;
_iOnIdx = 0;
_iPeakBarIdx = BAR_NOT_USED;
_litEffect = YES;
_reverse = NO;
self.warnThreshold = 0.60f;
self.dangerThreshold = 0.80f;
// Set default colors
_backgroundColor = [UIColor blackColor];
_outerBorderColor = [UIColor grayColor];
_innerBorderColor = [UIColor blackColor];
_normalBarColor = [UIColor greenColor];
_warningBarColor = [UIColor yellowColor];
_dangerBarColor = [UIColor redColor];
// Misc.
self.clearsContextBeforeDrawing = NO;
self.opaque = NO;
}
//-----------------------------------------------------------------------
// Method: drawRect:
// Draw the gauge
//
-(void) drawRect:(CGRect)rect
{
CGContextRef ctx; // Graphics context
CGRect rectBounds, // Bounding rectangle adjusted for multiple of bar size
rectBar; // Rectangle for individual light bar
size_t iBarSize; // Size (width or height) of each LED bar
// How is the bar oriented?
rectBounds = self.bounds;
BOOL fIsVertical = (rectBounds.size.height >= rectBounds.size.width);
if(fIsVertical) {
// Adjust height to be an exact multiple of bar
iBarSize = rectBounds.size.height / _numBars;
rectBounds.size.height = iBarSize * _numBars;
}
else {
// Adjust width to be an exact multiple
iBarSize = rectBounds.size.width / _numBars;
rectBounds.size.width = iBarSize * _numBars;
}
// Compute size of bar
rectBar.size.width = (fIsVertical) ? rectBounds.size.width - 2 : iBarSize;
rectBar.size.height = (fIsVertical) ? iBarSize : rectBounds.size.height - 2;
// Get stuff needed for drawing
ctx = UIGraphicsGetCurrentContext();
CGContextClearRect(ctx, self.bounds);
// Fill background
CGContextSetFillColorWithColor(ctx, _backgroundColor.CGColor);
CGContextFillRect(ctx, rectBounds);
// Draw LED bars
CGContextSetStrokeColorWithColor(ctx, _innerBorderColor.CGColor);
CGContextSetLineWidth(ctx, 1.0);
for( int iX = 0; iX < _numBars; ++iX ) {
// Determine position for this bar
if(_reverse) {
// Top-to-bottom or right-to-left
rectBar.origin.x = (fIsVertical) ? rectBounds.origin.x + 1 : (CGRectGetMaxX(rectBounds) - (iX+1) * iBarSize);
rectBar.origin.y = (fIsVertical) ? (CGRectGetMinY(rectBounds) + iX * iBarSize) : rectBounds.origin.y + 1;
}
else {
// Bottom-to-top or right-to-left
rectBar.origin.x = (fIsVertical) ? rectBounds.origin.x + 1 : (CGRectGetMinX(rectBounds) + iX * iBarSize);
rectBar.origin.y = (fIsVertical) ? (CGRectGetMaxY(rectBounds) - (iX + 1) * iBarSize) : rectBounds.origin.y + 1;
}
// Draw top and bottom borders for bar
CGContextAddRect(ctx, rectBar);
CGContextStrokePath(ctx);
// Determine color of bar
UIColor *clrFill = _normalBarColor;
if( _iDangerBarIdx >= 0 && iX >= _iDangerBarIdx ) {
clrFill = _dangerBarColor;
}
else if( _iWarningBarIdx >= 0 && iX >= _iWarningBarIdx ) {
clrFill = _warningBarColor;
}
// Determine if bar should be lit
BOOL fLit = ((iX >= _iOnIdx && iX < _iOffIdx) || iX == _iPeakBarIdx);
// Fill the interior of the bar
CGContextSaveGState(ctx);
CGRect rectFill = CGRectInset(rectBar, 1.0, 1.0);
CGPathRef clipPath = CGPathCreateWithRect(rectFill, NULL);
CGContextAddPath(ctx, clipPath);
CGContextClip(ctx);
[self drawBar:ctx
withRect:rectFill
andColor:clrFill
lit:fLit];
CGContextRestoreGState(ctx);
CGPathRelease(clipPath);
}
// Draw border around the control
CGContextSetStrokeColorWithColor(ctx, _outerBorderColor.CGColor);
CGContextSetLineWidth(ctx, 2.0);
CGContextAddRect(ctx, CGRectInset(rectBounds, 1, 1));
CGContextStrokePath(ctx);
}
//-----------------------------------------------------------------------
// Method: drawBar::::
// This method draws a bar
//
- (void) drawBar:(CGContextRef)a_ctx
withRect:(CGRect)a_rect
andColor:(UIColor *)a_clr
lit:(BOOL) a_fLit
{
// Is the bar lit?
if(a_fLit) {
// Are we doing radial gradient fills?
if(_litEffect) {
// Yes, set up to draw the bar as a radial gradient
static size_t nu_locations = 2;
static CGFloat locations[] = { 0.0, 0.5 };
CGFloat aComponents[8];
CGColorRef clr = a_clr.CGColor;
// Set up color components from passed UIColor object
if (CGColorGetNumberOfComponents(clr) == 4) {
// Extract the components
//
// Note that iOS 5.0 provides a nicer way to do this i.e.
// [a_clr getRed:&aComponents[0]
// green:&aComponents[1]
// blue:&aComponents[2]
// alpha:&aComponents[3] ];
memcpy(aComponents, CGColorGetComponents(clr), 4*sizeof(CGFloat));
// Calculate dark color of gradient
aComponents[4] = aComponents[0] - ((aComponents[0] > 0.3) ? 0.3 : 0.0);
aComponents[5] = aComponents[1] - ((aComponents[1] > 0.3) ? 0.3 : 0.0);
aComponents[6] = aComponents[2] - ((aComponents[2] > 0.3) ? 0.3 : 0.0);
aComponents[7] = aComponents[3];
}
// Calculate radius needed
CGFloat width = CGRectGetWidth(a_rect);
CGFloat height = CGRectGetHeight(a_rect);
CGFloat radius = sqrt( width * width + height * height );
// Draw the gradient inside the provided rectangle
CGColorSpaceRef myColorspace = CGColorSpaceCreateDeviceRGB();
CGGradientRef myGradient = CGGradientCreateWithColorComponents (myColorspace,
aComponents,
locations,
nu_locations);
CGPoint myStartPoint = { CGRectGetMidX(a_rect), CGRectGetMidY(a_rect) };
CGContextDrawRadialGradient(a_ctx, myGradient, myStartPoint, 0.0, myStartPoint, radius, 0);
CGColorSpaceRelease(myColorspace);
CGGradientRelease(myGradient);
}
else {
// No, solid fill
CGContextSetFillColorWithColor(a_ctx, a_clr.CGColor);
CGContextFillRect(a_ctx, a_rect);
}
}
else {
// No, draw the bar as background color overlayed with a mostly
// ... transparent version of the passed color
CGColorRef fillClr = CGColorCreateCopyWithAlpha(a_clr.CGColor, 0.2f);
CGContextSetFillColorWithColor(a_ctx, _backgroundColor.CGColor);
CGContextFillRect(a_ctx, a_rect);
CGContextSetFillColorWithColor(a_ctx, fillClr);
CGContextFillRect(a_ctx, a_rect);
CGColorRelease(fillClr);
}
}
@end
================================================
FILE: F3BarGaugeDemo/F3BarGaugeDemo-Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFiles</key>
<array/>
<key>CFBundleIdentifier</key>
<string>com.flightiii.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: F3BarGaugeDemo/F3BarGaugeDemo-Prefix.pch
================================================
//
// Prefix header for all source files of the 'F3BarGaugeDemo' target in the 'F3BarGaugeDemo' project
//
#import <Availability.h>
#ifndef __IPHONE_4_0
#warning "This project uses features only available in iOS SDK 4.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
================================================
FILE: F3BarGaugeDemo/ViewController.h
================================================
//
// ViewController.h
// F3BarGaugeDemo
//
// Created by Brad Benson on 12/13/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "F3BarGauge.h"
@interface ViewController : UIViewController
@end
================================================
FILE: F3BarGaugeDemo/ViewController.m
================================================
//
// ViewController.m
// F3BarGaugeDemo
//
// Created by Brad Benson on 12/13/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@property (strong, nonatomic) IBOutlet F3BarGauge *horizontalBar;
@property (strong, nonatomic) IBOutlet F3BarGauge *reversedBar;
@property (strong, nonatomic) IBOutlet F3BarGauge *verticalBar;
@property (strong, nonatomic) IBOutlet F3BarGauge *lcdBar;
@property (strong, nonatomic) IBOutlet F3BarGauge *peakHoldBar;
@property (strong, nonatomic) IBOutlet F3BarGauge *customThresholdBar;
@property (strong, nonatomic) IBOutlet F3BarGauge *customRangeBar;
@property (strong, nonatomic) IBOutlet UISlider *valueSlider;
@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
- (IBAction)didChangeValue:(id)sender;
- (IBAction)didReset:(id)sender;
@end
@implementation ViewController
#pragma mark - View lifecycle
- (void)viewDidLoad
{
[super viewDidLoad];
_reversedBar.reverse = YES;
_customThresholdBar.numBars = 15;
_customThresholdBar.warnThreshold = 0.45;
_customThresholdBar.dangerThreshold = 0.90;
_customThresholdBar.normalBarColor = [UIColor blueColor];
_customThresholdBar.warningBarColor = [UIColor cyanColor];
_customThresholdBar.dangerBarColor = [UIColor magentaColor];
_customThresholdBar.outerBorderColor = [UIColor clearColor];
_customThresholdBar.innerBorderColor = [UIColor clearColor];
_customRangeBar.numBars = 20;
_customRangeBar.minLimit = 0.40;
_customRangeBar.maxLimit = 0.60;
_peakHoldBar.numBars = 10;
_peakHoldBar.holdPeak = YES;
_lcdBar.numBars = 20;
_lcdBar.litEffect = NO;
UIColor *clrBar = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1.0];
_lcdBar.normalBarColor = clrBar;
_lcdBar.warningBarColor = clrBar;
_lcdBar.dangerBarColor = clrBar;
_lcdBar.backgroundColor = [UIColor clearColor];
_lcdBar.outerBorderColor = [UIColor clearColor];
_lcdBar.innerBorderColor = [UIColor clearColor];
}
- (IBAction)didChangeValue:(id)sender {
// Update the text label
_valueLabel.text = [NSString stringWithFormat:@"%0.02f", _valueSlider.value];
// Update the bar gauges
_horizontalBar.value = _valueSlider.value;
_reversedBar.value = _valueSlider.value;
_lcdBar.value = _valueSlider.value;
_verticalBar.value = _valueSlider.value;
_peakHoldBar.value = _valueSlider.value;
_customThresholdBar.value = _valueSlider.value;
_customRangeBar.value = _valueSlider.value;
}
- (IBAction)didReset:(id)sender {
[_peakHoldBar resetPeak];
}
@end
================================================
FILE: F3BarGaugeDemo/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: F3BarGaugeDemo/en.lproj/ViewController.xib
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ViewController">
<connections>
<outlet property="customRangeBar" destination="31" id="33"/>
<outlet property="customThresholdBar" destination="28" id="30"/>
<outlet property="horizontalBar" destination="10" id="14"/>
<outlet property="lcdBar" destination="18" id="22"/>
<outlet property="peakHoldBar" destination="23" id="25"/>
<outlet property="reversedBar" destination="37" id="39"/>
<outlet property="valueLabel" destination="34" id="35"/>
<outlet property="valueSlider" destination="12" id="16"/>
<outlet property="verticalBar" destination="9" id="15"/>
<outlet property="view" destination="6" id="7"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="6">
<rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Flight III Systems Bar Gauge" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="8">
<rect key="frame" x="20" y="27" width="280" height="24"/>
<fontDescription key="fontDescription" type="italicSystem" pointSize="20"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9" customClass="F3BarGauge">
<rect key="frame" x="20" y="61" width="40" height="359"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" constant="40" id="cXM-fS-skK"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="10" customClass="F3BarGauge">
<rect key="frame" x="77" y="80" width="220" height="25"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="03e-D7-71d"/>
</constraints>
</view>
<slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="12">
<rect key="frame" x="75" y="432" width="170" height="29"/>
<constraints>
<constraint firstAttribute="height" constant="28" id="3cc-ob-6iR"/>
</constraints>
<connections>
<action selector="didChangeValue:" destination="-1" eventType="valueChanged" id="17"/>
</connections>
</slider>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Value" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="13">
<rect key="frame" x="20" y="439" width="42" height="14"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Default Horizontal" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="19">
<rect key="frame" x="77" y="61" width="117" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="28" customClass="F3BarGauge">
<rect key="frame" x="77" y="184" width="220" height="25"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="cS5-P0-dIN"/>
</constraints>
</view>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Custom Thresholds & Colors" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="29">
<rect key="frame" x="77" y="165" width="186" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="37" customClass="F3BarGauge">
<rect key="frame" x="77" y="132" width="220" height="25"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="VgS-fu-EJw"/>
</constraints>
</view>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Reversed (right-to-left)" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="38">
<rect key="frame" x="77" y="113" width="150" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="31" customClass="F3BarGauge">
<rect key="frame" x="77" y="236" width="220" height="25"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="y5O-OA-Cbq"/>
</constraints>
</view>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Custom Range (.4 - .6)" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="32">
<rect key="frame" x="77" y="217" width="147" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="23" customClass="F3BarGauge">
<rect key="frame" x="77" y="288" width="150" height="25"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="25" id="kJX-ZR-Sol"/>
</constraints>
</view>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="Peak Hold" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="24">
<rect key="frame" x="77" y="269" width="66" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="LCD-ish Look" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="20">
<rect key="frame" x="77" y="329" width="88" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="26">
<rect key="frame" x="231" y="286" width="66" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="66" id="dxn-c2-nlI"/>
</constraints>
<state key="normal" title="Reset">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="didReset:" destination="-1" eventType="touchUpInside" id="27"/>
</connections>
</button>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" text="" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="34">
<rect key="frame" x="252" y="430" width="45" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="45" id="8w5-EV-NSM"/>
<constraint firstAttribute="height" constant="30" id="kAi-Xj-gth"/>
</constraints>
<fontDescription key="fontDescription" name="DBLCDTempBlack" family="DB LCD Temp" pointSize="19"/>
<color key="textColor" red="0.0" green="1" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="36">
<rect key="frame" x="77" y="348" width="220" height="40"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="18" customClass="F3BarGauge">
<rect key="frame" x="10" y="5" width="200" height="30"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</view>
</subviews>
<color key="backgroundColor" red="0.50163379779999995" green="0.73209770770000004" blue="0.85550860969999998" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="18" firstAttribute="top" secondItem="36" secondAttribute="top" constant="5" id="1vx-U2-9EF"/>
<constraint firstItem="18" firstAttribute="leading" secondItem="36" secondAttribute="leading" constant="10" id="6wh-L4-QOm"/>
<constraint firstAttribute="trailing" secondItem="18" secondAttribute="trailing" constant="10" id="C31-3A-IIu"/>
<constraint firstAttribute="height" constant="40" id="r15-di-Dub"/>
<constraint firstAttribute="bottom" secondItem="18" secondAttribute="bottom" constant="5" id="sVj-2n-A3V"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="0.1015425702" green="0.1015425702" blue="0.1015425702" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="34" firstAttribute="leading" secondItem="12" secondAttribute="trailing" constant="9" id="02W-PP-X37"/>
<constraint firstItem="24" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="48x-t8-9Vc"/>
<constraint firstItem="28" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="5ZK-nT-9hE"/>
<constraint firstAttribute="trailing" secondItem="36" secondAttribute="trailing" constant="23" id="6PU-G1-2OW"/>
<constraint firstAttribute="bottom" secondItem="13" secondAttribute="bottom" constant="27" id="7kd-J6-PSo"/>
<constraint firstItem="10" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="7oT-8O-ePj"/>
<constraint firstAttribute="trailing" secondItem="10" secondAttribute="trailing" constant="23" id="Apq-CX-uu0"/>
<constraint firstItem="8" firstAttribute="top" secondItem="6" secondAttribute="top" constant="27" id="BKz-4k-SUC"/>
<constraint firstItem="31" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="CJy-6y-ObV"/>
<constraint firstItem="36" firstAttribute="top" secondItem="20" secondAttribute="bottom" constant="2" id="DSE-rQ-Al8"/>
<constraint firstItem="37" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="GZ0-xY-Nzn"/>
<constraint firstAttribute="bottom" secondItem="12" secondAttribute="bottom" constant="20" id="Isq-vg-gRU"/>
<constraint firstItem="38" firstAttribute="top" secondItem="10" secondAttribute="bottom" constant="8" id="J80-hL-27H"/>
<constraint firstItem="24" firstAttribute="top" secondItem="31" secondAttribute="bottom" constant="8" id="K75-jy-QfM"/>
<constraint firstItem="19" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="KZJ-ef-qUz"/>
<constraint firstItem="26" firstAttribute="leading" secondItem="23" secondAttribute="trailing" constant="4" id="Khi-lQ-ftk"/>
<constraint firstItem="32" firstAttribute="top" secondItem="28" secondAttribute="bottom" constant="8" id="P96-gV-Yir"/>
<constraint firstAttribute="trailing" secondItem="34" secondAttribute="trailing" constant="23" id="Pp9-0K-MVq"/>
<constraint firstItem="32" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="QqH-DT-zKN"/>
<constraint firstItem="29" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="R1f-5p-3Kv"/>
<constraint firstItem="31" firstAttribute="top" secondItem="32" secondAttribute="bottom" constant="2" id="TzV-gE-5JD"/>
<constraint firstAttribute="trailing" secondItem="26" secondAttribute="trailing" constant="23" id="Wo5-nz-KRJ"/>
<constraint firstAttribute="trailing" secondItem="8" secondAttribute="trailing" constant="20" id="WuJ-nB-J81"/>
<constraint firstItem="23" firstAttribute="top" secondItem="24" secondAttribute="bottom" constant="2" id="XYH-Cr-3rT"/>
<constraint firstAttribute="trailing" secondItem="37" secondAttribute="trailing" constant="23" id="aXZ-qy-zR2"/>
<constraint firstItem="8" firstAttribute="leading" secondItem="6" secondAttribute="leading" constant="20" id="bDV-kB-xKp"/>
<constraint firstItem="13" firstAttribute="top" secondItem="9" secondAttribute="bottom" constant="19" id="bna-nV-FBt"/>
<constraint firstAttribute="trailing" secondItem="28" secondAttribute="trailing" constant="23" id="d1b-YD-Saa"/>
<constraint firstAttribute="trailing" secondItem="31" secondAttribute="trailing" constant="23" id="en0-tl-arz"/>
<constraint firstItem="20" firstAttribute="top" secondItem="23" secondAttribute="bottom" constant="16" id="fHj-xE-Jmm"/>
<constraint firstItem="19" firstAttribute="top" secondItem="9" secondAttribute="top" id="fZ1-AC-s2D"/>
<constraint firstItem="26" firstAttribute="centerY" secondItem="23" secondAttribute="centerY" id="fba-IN-exQ"/>
<constraint firstItem="29" firstAttribute="top" secondItem="37" secondAttribute="bottom" constant="8" id="gy7-de-Qx4"/>
<constraint firstItem="38" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="h3e-0u-OcD"/>
<constraint firstItem="36" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="htN-gx-Sdx"/>
<constraint firstItem="12" firstAttribute="leading" secondItem="13" secondAttribute="trailing" constant="15" id="iuZ-Tu-2YF"/>
<constraint firstItem="28" firstAttribute="top" secondItem="29" secondAttribute="bottom" constant="2" id="lH1-gy-fhd"/>
<constraint firstItem="9" firstAttribute="top" secondItem="8" secondAttribute="bottom" constant="10" id="lN3-KY-d5E"/>
<constraint firstItem="9" firstAttribute="leading" secondItem="6" secondAttribute="leading" constant="20" id="pcZ-Os-QRD"/>
<constraint firstItem="23" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="rHC-C9-hj4"/>
<constraint firstAttribute="bottom" secondItem="34" secondAttribute="bottom" constant="20" id="rxT-FF-kSa"/>
<constraint firstItem="13" firstAttribute="leading" secondItem="6" secondAttribute="leading" constant="20" id="uDp-bM-zjt"/>
<constraint firstItem="10" firstAttribute="top" secondItem="19" secondAttribute="bottom" constant="2" id="vMe-NF-f4a"/>
<constraint firstItem="12" firstAttribute="centerY" secondItem="13" secondAttribute="centerY" id="wWW-Te-mJM"/>
<constraint firstItem="37" firstAttribute="top" secondItem="38" secondAttribute="bottom" constant="2" id="wsN-Vz-Idm"/>
<constraint firstItem="20" firstAttribute="leading" secondItem="9" secondAttribute="trailing" constant="17" id="zS2-yg-cvR"/>
</constraints>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics" statusBarStyle="lightContent"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
</view>
</objects>
</document>
================================================
FILE: F3BarGaugeDemo/main.m
================================================
//
// main.m
// F3BarGaugeDemo
//
// Created by Brad Benson on 12/13/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: F3BarGaugeDemo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
C68DA36E1497B71B00437005 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C68DA36D1497B71B00437005 /* UIKit.framework */; };
C68DA3701497B71B00437005 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C68DA36F1497B71B00437005 /* Foundation.framework */; };
C68DA3721497B71B00437005 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C68DA3711497B71B00437005 /* CoreGraphics.framework */; };
C68DA3781497B71B00437005 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = C68DA3761497B71B00437005 /* InfoPlist.strings */; };
C68DA37A1497B71B00437005 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C68DA3791497B71B00437005 /* main.m */; };
C68DA37E1497B71B00437005 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = C68DA37D1497B71B00437005 /* AppDelegate.m */; };
C68DA3811497B71B00437005 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C68DA3801497B71B00437005 /* ViewController.m */; };
C68DA3841497B71B00437005 /* ViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = C68DA3821497B71B00437005 /* ViewController.xib */; };
C68DA3911497B79000437005 /* F3BarGauge.m in Sources */ = {isa = PBXBuildFile; fileRef = C68DA3901497B79000437005 /* F3BarGauge.m */; };
C6E5F05A188F04B0006D1593 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C6E5F059188F04B0006D1593 /* Default-568h@2x.png */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
C68DA3691497B71B00437005 /* F3BarGaugeDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = F3BarGaugeDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
C68DA36D1497B71B00437005 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
C68DA36F1497B71B00437005 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
C68DA3711497B71B00437005 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
C68DA3751497B71B00437005 /* F3BarGaugeDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "F3BarGaugeDemo-Info.plist"; sourceTree = "<group>"; };
C68DA3771497B71B00437005 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
C68DA3791497B71B00437005 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
C68DA37B1497B71B00437005 /* F3BarGaugeDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "F3BarGaugeDemo-Prefix.pch"; sourceTree = "<group>"; };
C68DA37C1497B71B00437005 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
C68DA37D1497B71B00437005 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
C68DA37F1497B71B00437005 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
C68DA3801497B71B00437005 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
C68DA3831497B71B00437005 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/ViewController.xib; sourceTree = "<group>"; };
C68DA38F1497B79000437005 /* F3BarGauge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = F3BarGauge.h; sourceTree = "<group>"; };
C68DA3901497B79000437005 /* F3BarGauge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = F3BarGauge.m; sourceTree = "<group>"; };
C6E5F059188F04B0006D1593 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
C68DA3661497B71B00437005 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
C68DA36E1497B71B00437005 /* UIKit.framework in Frameworks */,
C68DA3701497B71B00437005 /* Foundation.framework in Frameworks */,
C68DA3721497B71B00437005 /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
C68DA35E1497B71B00437005 = {
isa = PBXGroup;
children = (
C6E5F059188F04B0006D1593 /* Default-568h@2x.png */,
C68DA38A1497B73D00437005 /* BarGauge */,
C68DA3731497B71B00437005 /* F3BarGaugeDemo */,
C68DA36C1497B71B00437005 /* Frameworks */,
C68DA36A1497B71B00437005 /* Products */,
);
sourceTree = "<group>";
};
C68DA36A1497B71B00437005 /* Products */ = {
isa = PBXGroup;
children = (
C68DA3691497B71B00437005 /* F3BarGaugeDemo.app */,
);
name = Products;
sourceTree = "<group>";
};
C68DA36C1497B71B00437005 /* Frameworks */ = {
isa = PBXGroup;
children = (
C68DA36D1497B71B00437005 /* UIKit.framework */,
C68DA36F1497B71B00437005 /* Foundation.framework */,
C68DA3711497B71B00437005 /* CoreGraphics.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
C68DA3731497B71B00437005 /* F3BarGaugeDemo */ = {
isa = PBXGroup;
children = (
C68DA37C1497B71B00437005 /* AppDelegate.h */,
C68DA37D1497B71B00437005 /* AppDelegate.m */,
C68DA37F1497B71B00437005 /* ViewController.h */,
C68DA3801497B71B00437005 /* ViewController.m */,
C68DA3821497B71B00437005 /* ViewController.xib */,
C68DA3741497B71B00437005 /* Supporting Files */,
);
path = F3BarGaugeDemo;
sourceTree = "<group>";
};
C68DA3741497B71B00437005 /* Supporting Files */ = {
isa = PBXGroup;
children = (
C68DA3751497B71B00437005 /* F3BarGaugeDemo-Info.plist */,
C68DA3761497B71B00437005 /* InfoPlist.strings */,
C68DA3791497B71B00437005 /* main.m */,
C68DA37B1497B71B00437005 /* F3BarGaugeDemo-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
C68DA38A1497B73D00437005 /* BarGauge */ = {
isa = PBXGroup;
children = (
C68DA38F1497B79000437005 /* F3BarGauge.h */,
C68DA3901497B79000437005 /* F3BarGauge.m */,
);
name = BarGauge;
path = F3BarGaugeDemo;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
C68DA3681497B71B00437005 /* F3BarGaugeDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = C68DA3871497B71B00437005 /* Build configuration list for PBXNativeTarget "F3BarGaugeDemo" */;
buildPhases = (
C68DA3651497B71B00437005 /* Sources */,
C68DA3661497B71B00437005 /* Frameworks */,
C68DA3671497B71B00437005 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = F3BarGaugeDemo;
productName = F3BarGaugeDemo;
productReference = C68DA3691497B71B00437005 /* F3BarGaugeDemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
C68DA3601497B71B00437005 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0420;
};
buildConfigurationList = C68DA3631497B71B00437005 /* Build configuration list for PBXProject "F3BarGaugeDemo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = C68DA35E1497B71B00437005;
productRefGroup = C68DA36A1497B71B00437005 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
C68DA3681497B71B00437005 /* F3BarGaugeDemo */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
C68DA3671497B71B00437005 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C68DA3781497B71B00437005 /* InfoPlist.strings in Resources */,
C68DA3841497B71B00437005 /* ViewController.xib in Resources */,
C6E5F05A188F04B0006D1593 /* Default-568h@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
C68DA3651497B71B00437005 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C68DA37A1497B71B00437005 /* main.m in Sources */,
C68DA37E1497B71B00437005 /* AppDelegate.m in Sources */,
C68DA3811497B71B00437005 /* ViewController.m in Sources */,
C68DA3911497B79000437005 /* F3BarGauge.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
C68DA3761497B71B00437005 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
C68DA3771497B71B00437005 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
C68DA3821497B71B00437005 /* ViewController.xib */ = {
isa = PBXVariantGroup;
children = (
C68DA3831497B71B00437005 /* en */,
);
name = ViewController.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
C68DA3851497B71B00437005 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
SDKROOT = iphoneos;
};
name = Debug;
};
C68DA3861497B71B00437005 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 5.0;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
C68DA3881497B71B00437005 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "F3BarGaugeDemo/F3BarGaugeDemo-Prefix.pch";
INFOPLIST_FILE = "F3BarGaugeDemo/F3BarGaugeDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
C68DA3891497B71B00437005 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "F3BarGaugeDemo/F3BarGaugeDemo-Prefix.pch";
INFOPLIST_FILE = "F3BarGaugeDemo/F3BarGaugeDemo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 6.0;
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C68DA3631497B71B00437005 /* Build configuration list for PBXProject "F3BarGaugeDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C68DA3851497B71B00437005 /* Debug */,
C68DA3861497B71B00437005 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C68DA3871497B71B00437005 /* Build configuration list for PBXNativeTarget "F3BarGaugeDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C68DA3881497B71B00437005 /* Debug */,
C68DA3891497B71B00437005 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = C68DA3601497B71B00437005 /* Project object */;
}
================================================
FILE: F3BarGaugeDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:F3BarGaugeDemo.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: F3BarGaugeDemo.xcodeproj/xcuserdata/bradbenson.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "1.0">
<FileBreakpoints>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "F3BarGaugeDemo/F3BarGauge.m"
timestampString = "345499585.107942"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "345"
endingLineNumber = "345"
landmarkName = "-drawRect:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "F3BarGaugeDemo/F3BarGauge.m"
timestampString = "345499585.107942"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "160"
endingLineNumber = "160"
landmarkName = "-setValue:"
landmarkType = "5">
</FileBreakpoint>
</FileBreakpoints>
</Bucket>
================================================
FILE: F3BarGaugeDemo.xcodeproj/xcuserdata/bradbenson.xcuserdatad/xcschemes/F3BarGaugeDemo.xcscheme
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C68DA3681497B71B00437005"
BuildableName = "F3BarGaugeDemo.app"
BlueprintName = "F3BarGaugeDemo"
ReferencedContainer = "container:F3BarGaugeDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C68DA3681497B71B00437005"
BuildableName = "F3BarGaugeDemo.app"
BlueprintName = "F3BarGaugeDemo"
ReferencedContainer = "container:F3BarGaugeDemo.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">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C68DA3681497B71B00437005"
BuildableName = "F3BarGaugeDemo.app"
BlueprintName = "F3BarGaugeDemo"
ReferencedContainer = "container:F3BarGaugeDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C68DA3681497B71B00437005"
BuildableName = "F3BarGaugeDemo.app"
BlueprintName = "F3BarGaugeDemo"
ReferencedContainer = "container:F3BarGaugeDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
================================================
FILE: F3BarGaugeDemo.xcodeproj/xcuserdata/bradbenson.xcuserdatad/xcschemes/xcschememanagement.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>F3BarGaugeDemo.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>C68DA3681497B71B00437005</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
================================================
FILE: README.markdown
================================================
F3BarGauge
==========
Welcome!
--------
This demo contains the LED bar gauge control for iOS. It has been
tested on iOS 6.x and 7.x on iTouch, iPhone, and iPad devices.

If you find this control of use (or find bugs), I'd love to hear
from you! Drop a note to brad@flightiii.com with questions, comments,
or dissenting opinions.
Background
----------
This control is intended to replicate/simulate the level indicator
on an audio mixing board. These indicators are usually
segmented/stacked LEDs, with several colors to indicate thresholds.
This control replicates that look, using Quartz drawing primitives,
and auto-adjusts to horizontal or vertical orientation. Additionally,
the colors, number of bars, peak hold, and other items are easily
customized.
Usage
-----
Adding this control to your XCode project is straightforward :
1. Add the F3BarGauge.h and F3BarGauge.m files to your project
2. Add a new blank subview to the nib, sized and positioned to
match what the bar gauge should look like.
3. In the properties inspector for this subview, change the
class to "F3BarGauge"
4. Add an outlet to represent the bar gauge
5. Update your code to set the value property as appropriate.
For more information have a look at the demo code, which
has multiple examples including a version that customizes the
with an LCD-style appearance.
License
-------
Copyright (c) 2011-2014 by Brad Benson
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following
conditions are met:
1. Redistributions of source code must retain the above copyright
notice this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
gitextract_ddzacrtk/ ├── F3BarGaugeDemo/ │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── F3BarGauge.h │ ├── F3BarGauge.m │ ├── F3BarGaugeDemo-Info.plist │ ├── F3BarGaugeDemo-Prefix.pch │ ├── ViewController.h │ ├── ViewController.m │ ├── en.lproj/ │ │ ├── InfoPlist.strings │ │ └── ViewController.xib │ └── main.m ├── F3BarGaugeDemo.xcodeproj/ │ ├── project.pbxproj │ ├── project.xcworkspace/ │ │ └── contents.xcworkspacedata │ └── xcuserdata/ │ └── bradbenson.xcuserdatad/ │ ├── xcdebugger/ │ │ └── Breakpoints.xcbkptlist │ └── xcschemes/ │ ├── F3BarGaugeDemo.xcscheme │ └── xcschememanagement.plist └── README.markdown
Condensed preview — 17 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (71K chars).
[
{
"path": "F3BarGaugeDemo/AppDelegate.h",
"chars": 378,
"preview": "//\n// AppDelegate.h\n// F3BarGaugeDemo\n//\n// Created by Brad Benson on 12/13/11.\n// Copyright (c) 2011 __MyCompanyNam"
},
{
"path": "F3BarGaugeDemo/AppDelegate.m",
"chars": 2422,
"preview": "//\n// AppDelegate.m\n// F3BarGaugeDemo\n//\n// Created by Brad Benson on 12/13/11.\n// Copyright (c) 2011 __MyCompanyNam"
},
{
"path": "F3BarGaugeDemo/F3BarGauge.h",
"chars": 2924,
"preview": "//\n// F3BarGauge.h\n//\n// Copyright (c) 2011-2014 by Brad Benson\n// All rights reserved.\n// \n// Redistribution and u"
},
{
"path": "F3BarGaugeDemo/F3BarGauge.m",
"chars": 14074,
"preview": "//\n// F3BarGauge.m\n//\n// Copyright (c) 2011-2014 by Brad Benson\n// All rights reserved.\n//\n// Redistribution and use"
},
{
"path": "F3BarGaugeDemo/F3BarGaugeDemo-Info.plist",
"chars": 1286,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "F3BarGaugeDemo/F3BarGaugeDemo-Prefix.pch",
"chars": 327,
"preview": "//\n// Prefix header for all source files of the 'F3BarGaugeDemo' target in the 'F3BarGaugeDemo' project\n//\n\n#import <Ava"
},
{
"path": "F3BarGaugeDemo/ViewController.h",
"chars": 252,
"preview": "//\n// ViewController.h\n// F3BarGaugeDemo\n//\n// Created by Brad Benson on 12/13/11.\n// Copyright (c) 2011 __MyCompany"
},
{
"path": "F3BarGaugeDemo/ViewController.m",
"chars": 2564,
"preview": "//\n// ViewController.m\n// F3BarGaugeDemo\n//\n// Created by Brad Benson on 12/13/11.\n// Copyright (c) 2011 __MyCompany"
},
{
"path": "F3BarGaugeDemo/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "F3BarGaugeDemo/en.lproj/ViewController.xib",
"chars": 20004,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "F3BarGaugeDemo/main.m",
"chars": 344,
"preview": "//\n// main.m\n// F3BarGaugeDemo\n//\n// Created by Brad Benson on 12/13/11.\n// Copyright (c) 2011 __MyCompanyName__. Al"
},
{
"path": "F3BarGaugeDemo.xcodeproj/project.pbxproj",
"chars": 13020,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "F3BarGaugeDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 159,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:F3BarGaugeDemo."
},
{
"path": "F3BarGaugeDemo.xcodeproj/xcuserdata/bradbenson.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist",
"chars": 1168,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Bucket\n type = \"1\"\n version = \"1.0\">\n <FileBreakpoints>\n <FileBreakpo"
},
{
"path": "F3BarGaugeDemo.xcodeproj/xcuserdata/bradbenson.xcuserdatad/xcschemes/F3BarGaugeDemo.xcscheme",
"chars": 3188,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n version = \"1.3\">\n <BuildAction\n parallelizeBuildables = \"YES\"\n "
},
{
"path": "F3BarGaugeDemo.xcodeproj/xcuserdata/bradbenson.xcuserdatad/xcschemes/xcschememanagement.plist",
"chars": 486,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "README.markdown",
"chars": 2822,
"preview": "F3BarGauge\n==========\n\nWelcome!\n--------\nThis demo contains the LED bar gauge control for iOS. It has been\ntested on i"
}
]
About this extraction
This page contains the full source code of the ChiefPilot/F3BarGauge GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 17 files (63.9 KB), approximately 17.5k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.