Skip to content

Commit

Permalink
Release 1.0.3.
Browse files Browse the repository at this point in the history
  • Loading branch information
shergin committed Mar 27, 2015
1 parent d806801 commit 111786f
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,47 @@
# NSView-MISSINGVisibility
A very tiny library that add `visibility` concept (somethings like property `hidden` but better) for NSView
# NSView+MISSINGVisibility

[![Version](https://img.shields.io/cocoapods/v/NSView+MISSINGVisibility.svg?style=flat)](http://cocoadocs.org/docsets/NSView+MISSINGVisibility)
[![License](https://img.shields.io/cocoapods/l/NSView+MISSINGVisibility.svg?style=flat)](http://cocoadocs.org/docsets/NSView+MISSINGVisibility)
[![Platform](https://img.shields.io/cocoapods/p/NSView+MISSINGVisibility.svg?style=flat)](http://cocoadocs.org/docsets/NSView+MISSINGVisibility)

A very tiny library that add `visibility` concept (somethings like property `hidden` but better) for NSView. It allows easily to show and hide views with animation and passion.

Besides, it allows to avoid using "negative boolean logic" (see ![Code Complete, page 269, Use positive boolean variable names](https://books.google.ru/books?id=I-83BAAAQBAJ&lpg=PA268&ots=4EQ6sGrC4q&dq=Code%20Complete%2C%20%22Use%20positive%20boolean%20variable%20names%22&hl=ru&pg=PA268#v=onepage&q&f=false) for more information).

## Usage

#import "NSView+MISSINGVisibility.h"


NSButton *button = [[NSButton alloc] initWithFrame:buttonFrame];
NSProgressIndicator *indicator = [[NSProgressIndicator alloc] initWithFrame:indicatorFrame];
indicator.hidden = YES;

// And later instead of use `button.hidden = YES;` you can use:

[button setVisible:NO animated:YES];

// And animation will start but property `isVisible` become `NO` synchronously.
// And you will be able access it and control it consistently. Like this:

[indicator setVisible:(!button.isVisible) animated:YES];


## Requirements

Nothing.

## Installation

NSView+MISSINGVisibility is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

pod "NSView+MISSINGVisibility"

## Author

Valentin Shergin, valentin@shergin.com

## License

NSView+MISSINGVisibility is available under the MIT license. See the LICENSE file for more info.

0 comments on commit 111786f

Please sign in to comment.