CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

MagicCarpetView 0.0.2

MagicCarpetView 0.0.2

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Jun 2015

Maintained by Felix Ayala.



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.