Git Product home page Git Product logo

meterview's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

meterview's Issues

Doesn't compile

I understand this is nine years old (how the heck did 2011 become 9 years ago, i still think 2001 was nine years ago!), and anyway, I am having all sorts of issues when trying to get this to work for modern objc project. Is it possible to make this display as a subview in a storyboard view?

Even the demo project won't work and i am willing to invest in the time to get it to work as i think this is the nicest looking speedometer gauge in objective c. LMGauge isn't as pretty but works out of the box...

Even if it builds, it won't run on the simulator.

Failed to install the requested application
Domain: NSPOSIXErrorDomain
Code: 22
Failure Reason: The bundle identifier of the application could not be determined.
Recovery Suggestion: Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
User Info: {
    bundleURL = "file:///Users/jweinraub/Library/Developer/Xcode/DerivedData/MeterView-djdloospfradzfgzfzgtdhdivraf/Build/Products/Debug-iphonesimulator/meterview.app/";
}
--

First running with the following error:

2016-09-06 11:38:15.080 MeterView[787:345998] *** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3512.60.12/UIApplication.m:3401
2016-09-06 11:38:28.177 MeterView[787:345998] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'
*** First throw call stack:
(0x225b9b0b 0x21d76dff 0x225b99e1 0x22da073b 0x26e3c799 0x26e50811 0x26e39767 0x23c87bf7 0x23c87aa7 0x23c87da5 0x2257b9e7 0x2257b5d7 0x2257993f 0x224c81c9 0x224c7fbd 0x26c07f37 0x26c02435 0xdee67 0x22174873)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

EXC_BAD_ACCESS releasing the object

First of all: great job.
I had some EXC_BAD_ACCESS releasing the object.
I solved with the following code

  • (void)dealloc {
    needleLayer.delegate = nil;
    [needleLayer release];
    [needle_ release];
    [textLabel_ release];

    [super dealloc];
    }

Rescale view issue

Grate work! Thanks for your control.

I have found an issue - a MeterNeedle not rescaled when main MeterView has been rescaled.

I solved with next fix.

in method drawLayer: inContext: for MeterView change

  • CGFloat endX = (1 + self.length) * centerX;
  • CGFloat endX = (1 + self.length) * fmin(centerX,centerY);

and add next method into MeterView

-(void)setFrame:(CGRect)frame
{
[super setFrame:frame];
needleLayer.bounds = CGRectMake(0.0f, 0.0f, frame.size.width, frame.size.height);
needleLayer.position = CGPointMake(needleLayer.bounds.size.width / 2.0, needleLayer.bounds.size.height / 2.0);
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.