<commit_before>#FWTPopoverView

![FWTPopoverView screenshot](http://grab.by/hc1q)

FWTPopoverView is a pretty flexible custom view that helps when you need to show a popover with a pointing arrow. The idea behind is to expose a very simple and basic API and make easier to extend by accessing its custom objects/blocks entrypoints. FWTPopoverView is pure CG code, so no need to add assets and resolution independent for free.

##Requirements
* XCode 4.4.1 or higher
* iOS 5.0

##Features
FWTPopoverView has very few properties but uses several custom objects.
If you want to adjust/change the appearance of the background you change properties inside the background custom object, the same happens with animations and so on.
On the other side, if you're happy with the default style, you only need to set the contentSize and add your content to the contentView property.

There are two optional blocks executed when the popover is presented/dismissed. 

This project is not yet ARC-ready.

##How to use it: initializing

Generally you don't initialize FWTPopoverView with a frame instead you set the contentSize and then call:

* **presentFromRect: inView: permittedArrowDirection: animated:**

The FWTPopoverView, as default behaviour, check if there's any intersection with the superview and if yes it adjusts its frame position to fit inside the superview bounds. You can change this by setting **adjustPositionInSuperviewEnabled** to NO.

##How to use it: configure

####FWTPopoverBackgroundHelper 
This class needs a quick introduction: the popover image is a runtime image generated by a CAShapeLayer subclass. The layer is not directly added to the view hierarchy instead is rendered in a separate context and then the resulting image is used. The image is stretchable and use a very small chunk of memory.
As with every CAShapeLayer you have access to all shape style properties (clearly they're not animatable this time). The cornerRadius property is used as a property for the path. 

* **drawPathBlock** this block is executed just before return the image. It's a good point to customize or add more drawing stuff to your context <commit_msg>Add new section to README<commit_after>#FWTPopoverView

![FWTPopoverView screenshot](http://grab.by/hc1q)

FWTPopoverView is a pretty flexible custom view that helps when you need to show a popover with a pointing arrow. The idea behind is to expose a very simple and basic API and make easier to extend by accessing its custom objects/blocks entrypoints. FWTPopoverView is pure CG code, so no need to add assets and resolution independent for free.

##Requirements
* XCode 4.4.1 or higher
* iOS 5.0

##Features
FWTPopoverView has very few properties but uses several custom objects.
If you want to adjust/change the appearance of the background you change properties inside the background custom object, the same happens with animations and so on.
On the other side, if you're happy with the default style, you only need to set the contentSize and add your content to the contentView property.

There are two optional blocks executed when the popover is presented/dismissed. 

This project is not yet ARC-ready.

##Benefits over UIPopoverController
* Block based API
* Appearance/dismiss animations are easy to customise through animation blocks
* Clean API to present/dismiss more than one popover either sequentially or at once
* No minimum size restrictions for the popover content
* Works on the iPhone as well as on the iPad

##How to use it: initializing

Generally you don't initialize FWTPopoverView with a frame instead you set the contentSize and then call:

* **presentFromRect: inView: permittedArrowDirection: animated:**

The FWTPopoverView, as default behaviour, check if there's any intersection with the superview and if yes it adjusts its frame position to fit inside the superview bounds. You can change this by setting **adjustPositionInSuperviewEnabled** to NO.

##How to use it: configure

####FWTPopoverBackgroundHelper 
This class needs a quick introduction: the popover image is a runtime image generated by a CAShapeLayer subclass. The layer is not directly added to the view hierarchy instead is rendered in a separate context and then the resulting image is used. The image is stretchable and use a very small chunk of memory.
As with every CAShapeLayer you have access to all shape style properties (clearly they're not animatable this time). The cornerRadius property is used as a property for the path. 

* **drawPathBlock** this block is executed just before return the image. It's a good point to customize or add more drawing stuff to your context 
{'fraction_non_alphanumeric': 0.03904227782571182, 'fraction_numerical': 0.0025884383088869713, 'mean_word_length': 4.803504380475594, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '585017', 'n_tokens_mistral': 1146, 'n_tokens_neox': 1105, 'n_words': 696}