Latest 0.0.2
Homepage https://github.com/rockbarato/MagicCarpetView
License MIT
Platforms ios 6.0, requires ARC
Authors

License
CocoaPods Platform
Language
CocoaPods Tag

Installation

Instead of adding the source files directly to your project, you may want to consider using CocoaPods to manage your dependencies. Follow the instructions on the CocoaPods site to install the gem, and specify MagicCarpetView as a dependency in your Podfile with

pod 'MagicCarpetView'

But if you want to do it the old fashioned way, just add MagicCarpetView.h/m files to your project.

Usage

First, you need to create a subclass of MagicCarpetView.

Then import your new view in your controller’s header file:

#import "CardView.h"

When setup is complete, init your custom view and add stack anywhere.

- (void)viewDidLoad {
    [super viewDidLoad];

    self.view.backgroundColor = [UIColor purpleColor];

    CardView *cardView = [[CardView alloc] initWithFrame:CGRectMake(0, 333, 320, 158)];
    cardView.backgroundColor = [UIColor greenColor];
    cardView.contentView.backgroundColor = [UIColor blueColor];
    cardView.margin = 0.8; // Default is 1.0

    [self.view addSubview:cardView];
}

Requirements

  • ARC
  • iOS 6.0 and above

Collaboration

Feel free to collaborate with ideas, issues and/or pull requests.

License

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

Latest podspec

{
    "name": "MagicCarpetView",
    "version": "0.0.2",
    "summary": "UIView subclass that can allow you to load XIB files in your storyboard maintaining the aspect ratio",
    "description": "                   UIView subclass that can allow you to load XIB files in your storyboard maintaining the aspect ratio.nn                   Also you have some properties like `margin` and `aspectRatio` to control the view itselfn",
    "homepage": "https://github.com/rockbarato/MagicCarpetView",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "Felix Ayala": "[email protected]"
    },
    "social_media_url": "http://twitter.com/rockbarato",
    "platforms": {
        "ios": "6.0"
    },
    "source": {
        "git": "https://github.com/rockbarato/MagicCarpetView.git",
        "tag": "0.0.2"
    },
    "source_files": "MagicCarpetView/MagicCarpetView.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This