This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by http://www.gitignore.io | |
### Xcode ### | |
build | |
*.xcodeproj/* | |
!*.xcodeproj/project.pbxproj | |
!*.xcworkspace/contents.xcworkspacedata | |
### Objective-C ### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// In Terminal | |
vim Podfile | |
// In Podfile | |
platform :ios, '7.0' | |
pod 'Canvas' | |
// Back to Terminal | |
pod install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.buttonLike.image = [[UIImage imageNamed:@"button-like"] imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSString *link = [NSString stringWithFormat:@"http://canvaspod.io"]; | |
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: link]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.navigationController.navigationBar.topItem.title = @""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@property (nonatomic, strong) NSArray *sections; | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
// Cell Sections in Array | |
self.sections = @[ | |
@{@"identifier": @"firstCell"}, | |
@{@"identifier": @"secondCell"}, | |
@{@"identifier": @"thirdCell"}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidAppear:(BOOL)animated { | |
[self.collectionView scrollToItemAtIndexPath:[NSIndexPath indexPathForRow:self.indexInt inSection:0] | |
atScrollPosition:UICollectionViewScrollPositionCenteredHorizontally | |
animated:YES]; | |
} |