Latest 0.2.1
Homepage https://github.com/maciekish/WeightedWordCloud
License MIT
Platforms ios 7.0, requires ARC
Authors

Version
License
Platform

Works with any Objective-C project, including app extensions like today widgets and Apple Watch (WatchKit) apps.

alt text

Example usage with WatchKit

Import the header

#import <WeightedWordCloud/HITWeightedWordCloud.h>

Create and configure a HITWeightedWordCloud object. You can do this in (void)awakeWithContext:(id)context

self.wordCloud = [HITWeightedWordCloud.alloc initWithSize:CGSizeMake(CGRectGetWidth(self.contentFrame), CGRectGetHeight(self.contentFrame)];
self.wordCloud.textColor = UIColor.whiteColor;
self.wordCloud.scale = WKInterfaceDevice.currentDevice.screenScale;

Set data and render a word cloud. The dictionary key is your word and the value is the weight. The weight controls the font size of the words in the rendered cloud.

NSDictionary *wordsDictionary = @{@"Very important": @500,
                                  @"Still important": @400,
                                  @"Less important": @100,
                                  @"Not important at all": @0};
[self.imageView setImage:[self.wordCloud imageWithWords:wordsDictionary]];

See the header file for more options.

Requirements

  • Xcode 6.3.1
  • ARC

Installation

WeightedWordCloud is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'WeightedWordCloud', '0.1.0'

Author

Maciej Swic, [email protected]

License

WeightedWordCloud is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "WeightedWordCloud",
    "version": "0.2.1",
    "summary": "A simple word cloud renderer in Objective-C.",
    "description": "                       Renders word/tag clouds. Supports weighted words.n                       No dependencies, works with app extensions and the Apple Watch (WatchKit).n",
    "homepage": "https://github.com/maciekish/WeightedWordCloud",
    "screenshots": "https://raw.githubusercontent.com/maciekish/WeightedWordCloud/master/Screenshot.png",
    "license": "MIT",
    "authors": {
        "Maciej Swic": "[email protected].name"
    },
    "source": {
        "git": "https://github.com/maciekish/WeightedWordCloud.git",
        "tag": "0.2.1"
    },
    "social_media_url": "https://twitter.com/maciekish",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Classes/**/*",
    "public_header_files": "Classes/**/*.h"
}

Pin It on Pinterest

Share This