[Examples] Fix a couple of examples due to API changes recently #trivial (#267)

* Fix ASDKGram example

* Fix some more examples

* Convert Swift example to 3.0

* Fix VerticalWithinHorizontalScrolling

* Fix some headers

* Fix some more API changes

* Remove semicolons
This commit is contained in:
Michael Schneider
2017-05-15 09:48:45 -07:00
committed by GitHub
parent 9d84b9e635
commit 299df0aa8c
15 changed files with 149 additions and 153 deletions

View File

@@ -108,7 +108,7 @@
CGFloat contentHeight = [[[columnHeights lastObject] firstObject] floatValue];
CGSize contentSize = CGSizeMake(layoutWidth, contentHeight);
return [[ASCollectionLayoutState alloc] initWithElements:elements contentSize:contentSize elementToLayoutArrtibutesMap:attrsMap];
return [[ASCollectionLayoutState alloc] initWithContext:context contentSize:contentSize elementToLayoutAttributesTable:attrsMap];
}
- (CGFloat)_widthForSection:(NSUInteger)section withLayoutWidth:(CGFloat)layoutWidth

View File

@@ -47,7 +47,7 @@ static NSUInteger kNumberOfImages = 14;
_collectionNode = [[ASCollectionNode alloc] initWithLayoutDelegate:layoutDelegate layoutFacilitator:nil];
_collectionNode.dataSource = self;
_collectionNode.delegate = self;
_collectionNode.backgroundColor = [UIColor whiteColor];
_collectionNode.layoutInspector = self;
if (!(self = [super initWithNode:_collectionNode]))
return nil;
@@ -72,7 +72,6 @@ static NSUInteger kNumberOfImages = 14;
{
[super viewDidLoad];
_collectionNode.view.layoutInspector = self;
[_collectionNode.view registerClass:[ImageCollectionViewCell class] forCellWithReuseIdentifier:kReuseIdentifier];
}