View gist:11280811
# Created by http://www.gitignore.io | |
### Xcode ### | |
build | |
*.xcodeproj/* | |
!*.xcodeproj/project.pbxproj | |
!*.xcworkspace/contents.xcworkspacedata | |
### Objective-C ### |
View gist:7938364
// In Terminal | |
vim Podfile | |
// In Podfile | |
platform :ios, '7.0' | |
pod 'Canvas' | |
// Back to Terminal | |
pod install |
View gist:7887323
UITabBarController *tabBarView = (UITabBarController *)self.window.rootViewController; | |
UITabBarItem *item0 = [tabBarView.tabBar.items objectAtIndex:0]; | |
item0.image = [[UIImage imageNamed:@"icon-chat"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; | |
item0.selectedImage = [UIImage imageNamed:@"myImage"]; |
View gist:7887303
self.buttonLike.image = [[UIImage imageNamed:@"button-like"] imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal]; |
View gist:7887283
// Hide Navigation Bar | |
[self.navigationController.navigationBar setBackgroundImage:[UIImage new] | |
forBarMetrics:UIBarMetricsDefault]; | |
self.navigationController.navigationBar.shadowImage = [UIImage new]; | |
self.navigationController.navigationBar.translucent = YES; | |
self.navigationController.view.backgroundColor = [UIColor clearColor]; |
View gist:7887257
NSString *link = [NSString stringWithFormat:@"http://canvaspod.io"]; | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: link]]; |
View gist:7887250
self.navigationController.navigationBar.topItem.title = @""; |
View gist:7887238
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { | |
if ([[segue identifier] isEqualToString:@"dialogScene"]) { | |
self.data = 1; | |
ViewController *controller = [segue destinationViewController]; | |
controller.data = self.data; | |
} | |
} | |
// In destinationViewController.h |
View CollectionViewController.m
@property (nonatomic, strong) NSArray *sections; | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Cell Sections in Array | |
self.sections = @[ | |
@{@"identifier": @"firstCell"}, | |
@{@"identifier": @"secondCell"}, | |
@{@"identifier": @"thirdCell"}, |
View CollectionViewController.m
- (void)viewDidAppear:(BOOL)animated { | |
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:self.indexInt inSection:0] | |
atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally | |
animated:YES]; | |
} |