GithubHelp home page GithubHelp logo

atomton / atmhud Goto Github PK

View Code? Open in Web Editor NEW
496.0 21.0 91.0 265 KB

Library for the creation of HUDs in iPhone applications.

License: BSD 3-Clause "New" or "Revised" License

Objective-C 100.00%

atmhud's Introduction

ATMHud - Library for the creation of HUDs in iPhone applications

I once needed a HUD for one of my iPhone apps, but was unhappy with the currently available libraries on the internet. Therefore, I decided to create my own library. I've released it as a static library last year, but a lot of people wanted to see the source, so here it is.

-- Marcel [email protected]

Requirements

  • iOS 4.0 or above
  • QuartzCore.framework
  • AudioToolbox.framework (only if you want to use sounds)

Features

  • Autorotation support
  • Fixed or dynamic size
  • Multiple accessories
  • Automation
  • Animations
  • Delegation
  • Block user interaction
  • Enable superview interaction
  • Retina display support
  • Selectable accessory position
  • Queueing of multiple HUDs
  • Custom positioning or auto-centering
  • Customizable appearance
  • Sound effects

Installation & Usage

Just have a look at the sample project, everything is included there.

License

ATMHud is licensed under BSD, have a look at the appropriate file for more information.

Contributions

  • Beta testers: @jonsterling @thermogl @GiloTM @phollow @Thyraz @saschalein @EdwinBrett @rbfigueira @abrrow @choise
  • @ChrisNTR for porting this to MonoTouch
  • @C418 for his awesome music as seen in the release video
  • and anyone else I forgot.

atmhud's People

Contributors

atomton avatar myell0w avatar steipete avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

atmhud's Issues

show in center of parent view

  • (void)show {
    UIView *sv = [self.view superview];
    self.view.center = CGPointMake(self.view.center.x, sv.bounds.origin.y + sv.bounds.size.height / 2);

    [__view show];
    }

Activity view not showing up on iOS 5

The activity indicator component of ATMHud is not showing up when running on iOS 5.

Any help, suggestions or workarounds?

Thank you very much,
Felix

Screenshots in Readme.md?

Can you include screenshots to demo the functionality of the HUD in your readme/project page?

Thanks,
Paul Solt

Add additional buttons and catch any button click

I couldn't find any method/property by which I can add multiple buttons. And there isn't any delegate method or callBack block that will work when any button is clicked.

For example I want to add "hud" only with "OK" button and catch it's click. Or "hud" with "yes", "no" buttons but catch "no" button's click.

How can I solve this problem? Or I need to write some additional codes for my purposes?

Bug when changing content too fast

bug: http://cl.ly/3G1z1w3i1l0x3q200n46
workaround: http://cl.ly/2O251T1C0F0Y0C0n101k

If content is changed in the same runloop, the animations somehow freak out and only crap is displayed (too small, image totally offset, etc...

my current (hacky) fix is to change stuff in the next runloop.

RunAfterDelay(0.0, ^{
[self.progressHUD setActivity:NO];
[self.progressHUD setCaption:message];
[self.progressHUD setImage:[[UIImage imageNamed:@"x"] imageTintedWithColor:[UIColor whiteColor]]];
[self.progressHUD update];
[self.progressHUD hideAfter:5.0];
});

it's created with following function...

if (!self.progressHUD) {
self.progressHUD = [PSATMHud make];
[self.navigationController.view addSubview:self.progressHUD.view];
[self.progressHUD setActivity:YES];
[self.progressHUD setCaption: _(@"PushRequestingToken")];
[self.progressHUD show];
}

ATMHud crashes when i set build configuration to Release

with such a console error:

Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [0 0; 4.07206e-10 nan]'

it's getting SIGABRT in line 418 in ATMHudView.m :

imageLayer.bounds = CGRectMake(0, 0, imageRect.size.width, imageRect.size.height);

hideafter: doesn't reset when a new hud is called

I am not sure if it's a bug or a feature, but I changed the hideAfter method with this:

  • (void)hideAfter:(NSTimeInterval)delay {
    [NSObject cancelPreviousPerformRequestsWithTarget:self
    selector:@selector(hide)
    object:nil];

    [self performSelector:@selector(hide) withObject:nil afterDelay:delay];
    }

This way, when a new hud is shown it will stay the time specified even though there was another hud showing up before.

Documentation on Main Page Readme

Hello,

It would be nice to show a few small code excerpts on your readme. It'll be easier for someone just browsing your sample project to get an idea of how it works without additional steps.

Answering or showing the intent of the library for someone new is helpful. Here are some of my questions, that aren't apparent from the web documentation.

  1. How do I create a simple message hud?
  2. How do I cleanup the hud after I'm done?
  3. How do I perform a complex message display?

Thanks,
Paul Solt

First HudView QueueItem not centered on iPad

In first ATMHudQueueItem in the queue displayed via the ATMHudView is not displayed in the center of the view when used on an the iPad. The subsequent items display in the center of the screen.

Erroring when view releases

When I try to add a ATMHud to a view inside of a navigation view on the 2nd page, and then return to the subsequent page (thereby releasing the previous object) I am getting some sort of memory fault when I select "back". I'm adding it in the viewDidLoad, and have tried a lot of combinations for releasing it at the end. Always getting errors and I'm not sure what needs fixing.

Retain cycle is preventing the hud from ever being deallocated

ATMHudView retains its parent ATMHud object when initWithFrame:andController: is called. But ATMHud also retains the ATMHudView. Therefore a retain cycle and nothing can ever get deallocated.

The faulty line is this, in ATMHudView.h:

@property (nonatomic, retain) ATMHud *p;

That needs to change to assign and then in [ATMHudView dealloc], p should not be released.

NSLog info

Is it possible to remove the nslog lines in alloc and dealloc in the release version? It's very annoying if you use pod install this project into my own project.

Thanks~

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.