Skip to content
This repository was archived by the owner on Feb 2, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions examples/ASCollectionView/Sample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
objects = {

/* Begin PBXBuildFile section */
9B92C8811BC17D3000EE46B2 /* SupplementaryNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92C8801BC17D3000EE46B2 /* SupplementaryNode.m */; settings = {ASSET_TAGS = (); }; };
9BA2CEA11BB2579C00D18414 /* Launchboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9BA2CEA01BB2579C00D18414 /* Launchboard.storyboard */; settings = {ASSET_TAGS = (); }; };
9B92C8811BC17D3000EE46B2 /* SupplementaryNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B92C8801BC17D3000EE46B2 /* SupplementaryNode.m */; };
9BA2CEA11BB2579C00D18414 /* Launchboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9BA2CEA01BB2579C00D18414 /* Launchboard.storyboard */; };
AC3C4A641A11F47200143C57 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AC3C4A631A11F47200143C57 /* main.m */; };
AC3C4A671A11F47200143C57 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AC3C4A661A11F47200143C57 /* AppDelegate.m */; };
AC3C4A6A1A11F47200143C57 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC3C4A691A11F47200143C57 /* ViewController.m */; };
Expand Down Expand Up @@ -120,6 +120,7 @@
AC3C4A5B1A11F47200143C57 /* Frameworks */,
AC3C4A5C1A11F47200143C57 /* Resources */,
A6902C454C7661D0D277AC62 /* Copy Pods Resources */,
EC37EEC9933F5786936BFE7C /* Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -190,6 +191,21 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
EC37EEC9933F5786936BFE7C /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
F868CFBB21824CC9521B6588 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
24 changes: 22 additions & 2 deletions examples/ASCollectionView/Sample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,32 @@

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[ViewController alloc] init];
self.window.rootViewController = [[UINavigationController alloc] init];

[self pushNewViewControllerAnimated:NO];

[self.window makeKeyAndVisible];

return YES;
}

- (void)pushNewViewControllerAnimated:(BOOL)animated
{
UINavigationController *navController = (UINavigationController *)self.window.rootViewController;

UIViewController *viewController = [[ViewController alloc] init];
viewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Push Another Copy" style:UIBarButtonItemStylePlain target:self action:@selector(pushNewViewController)];

[navController pushViewController:viewController animated:animated];
}

- (void)pushNewViewController
{
[self pushNewViewControllerAnimated:YES];
}

@end
7 changes: 7 additions & 0 deletions examples/ASCollectionView/Sample/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ - (instancetype)init
[_collectionView registerSupplementaryNodeOfKind:UICollectionElementKindSectionHeader];
[_collectionView registerSupplementaryNodeOfKind:UICollectionElementKindSectionFooter];

self.navigationItem.leftItemsSupplementBackButton = YES;
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh target:self action:@selector(reloadTapped)];

return self;
}

Expand All @@ -64,6 +67,10 @@ - (BOOL)prefersStatusBarHidden
return YES;
}

- (void)reloadTapped
{
[_collectionView reloadData];
}

#pragma mark -
#pragma mark ASCollectionView data source.
Expand Down
16 changes: 16 additions & 0 deletions examples/ASTableViewStressTest/Sample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
05E2127E19D4DB510098F589 /* Frameworks */,
05E2127F19D4DB510098F589 /* Resources */,
F012A6F39E0149F18F564F50 /* Copy Pods Resources */,
E671F9E92DFB9088485E493B /* Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -189,6 +190,21 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
E671F9E92DFB9088485E493B /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
F012A6F39E0149F18F564F50 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
23 changes: 21 additions & 2 deletions examples/ASTableViewStressTest/Sample/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,28 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
self.window.rootViewController = [[ViewController alloc] init];
self.window.rootViewController = [[UINavigationController alloc] init];

[self pushNewViewControllerAnimated:NO];

[self.window makeKeyAndVisible];

return YES;
}

@end
- (void)pushNewViewControllerAnimated:(BOOL)animated
{
UINavigationController *navController = (UINavigationController *)self.window.rootViewController;

UIViewController *viewController = [[ViewController alloc] init];
viewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Push Another Copy" style:UIBarButtonItemStylePlain target:self action:@selector(pushNewViewController)];

[navController pushViewController:viewController animated:animated];
}

- (void)pushNewViewController
{
[self pushNewViewControllerAnimated:YES];
}

@end
2 changes: 1 addition & 1 deletion examples/ASTableViewStressTest/Sample/ViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#define NumberOfSections 10
#define NumberOfRowsPerSection 20
#define NumberOfReloadIterations 500
#define NumberOfReloadIterations 50

@interface ViewController () <ASTableViewDataSource, ASTableViewDelegate>
{
Expand Down